~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_partner/product.py

  • Committer: matthieu.choplin at msf
  • Date: 2012-08-30 07:48:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: matthieu.choplin@geneva.msf.org-20120830074800-l442bu42mt0yzutn
[uf-1374]- change the write and create by an _sql_constraint on the financing contract check dates

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from osv import osv
24
24
from osv import fields
25
25
 
26
 
import decimal_precision as dp
27
 
 
28
26
 
29
27
class product_supplierinfo(osv.osv):
30
28
    _name = 'product.supplierinfo'
65
63
        'company_id': fields.many2one('res.company','Company',select=1),
66
64
        'sequence_bis': fields.function(_get_order_id, method=True, type="integer", help="Assigns the priority to the list of product supplier.", string="Ranking"),
67
65
        'check_manufacturer': fields.function(_get_manu_price_dates, method=True, type="boolean", string="Manufacturer", multi="compt_f"),
68
 
        'get_first_price': fields.function(_get_manu_price_dates, method=True, type="float", string="Indicative Price", digits_compute=dp.get_precision('Purchase Price Computation'), multi="compt_f"),
 
66
        'get_first_price': fields.function(_get_manu_price_dates, method=True, type="float", string="Indicative Price", multi="compt_f"),
69
67
        'get_first_currency': fields.function(_get_manu_price_dates, method=True, type="many2one", relation="res.currency", string="Currency", multi="compt_f"),
70
68
        'get_till_date': fields.function(_get_manu_price_dates, method=True, type="date", string="Valid till date", multi="compt_f"),
71
 
        'get_from_date': fields.function(_get_manu_price_dates, method=True, type="date", string="Valid from date", multi="compt_f"),
72
 
        'active': fields.boolean('Active', help="If the active field is set to False, it allows to hide the the supplier info without removing it."),
 
69
        'get_from_date': fields.function(_get_manu_price_dates, method=True, type="date", string="Valid form date", multi="compt_f"),
73
70
    }
74
71
    
75
72
    _defaults = {
76
73
        'company_id': lambda obj, cr, uid, context: obj.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id,
77
 
        'active': True,
78
74
    }
79
75
 
80
76
product_supplierinfo()