~eoc/openobject-addons/eoc-extra-addons-quotation_report

« back to all changes in this revision

Viewing changes to product_special_price/product.py

  • Committer: Mariano Ruiz
  • Date: 2013-07-06 17:28:50 UTC
  • Revision ID: mrsarm@gmail.com-20130706172850-z3zhsacgthflvxiz
[IMP] Add fixed product_special_price module

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- encoding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
#    OpenERP, Open Source Management Solution
 
5
#    Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
 
6
#                       Raimon Esteve <resteve@zikzakmedia.com>
 
7
#    $Id$
 
8
#
 
9
#    This program is free software: you can redistribute it and/or modify
 
10
#    it under the terms of the GNU Affero General Public License as published by
 
11
#    the Free Software Foundation, either version 3 of the License, or
 
12
#    (at your option) any later version.
 
13
#
 
14
#    This program is distributed in the hope that it will be useful,
 
15
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
#    GNU Affero General Public License for more details.
 
18
#
 
19
#    You should have received a copy of the GNU Affero General Public License
 
20
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
#
 
22
##############################################################################
 
23
 
 
24
from osv import fields, osv
 
25
import decimal_precision as dp
 
26
 
 
27
class product_product(osv.osv):
 
28
    _inherit = 'product.product'
 
29
 
 
30
    _columns = {
 
31
        'special_price': fields.float('Special Price', digits_compute=dp.get_precision('Sale Price')),
 
32
    }
 
33
 
 
34
product_product()