31
31
'country_id': fields.many2one(
34
help="NOT USED by OpenERP to modify pricelist computation (only " \
35
"with external connected applications)"
34
help="NOT USED by OpenERP to modify pricelist computation (only "
35
"with external connected applications)"),
37
36
'partner_cat_id': fields.many2one(
38
37
'res.partner.category',
40
help="NOT USED by OpenERP to modify pricelist computation (only " \
41
"with external connected applications)"
39
help="NOT USED by OpenERP to modify pricelist computation (only "
40
"with external connected applications)"),
45
43
def write(self, cr, uid, ids, vals, context=None):
46
44
if 'country_id' in vals or 'partner_cat_id' in vals:
47
45
vals['to_update'] = True
48
return super(PricelistBuilder, self).write(cr, uid, ids,
49
vals, context=context)
46
return super(PricelistBuilder, self).write(
47
cr, uid, ids, vals, context=context)
51
49
def _get_hashkey(self, cr, uid, item_tpl, builder, context=None):
52
keys = super(PricelistBuilder, self)._get_hashkey(cr, uid, item_tpl,
53
builder, context=context)
50
keys = super(PricelistBuilder, self)._get_hashkey(
51
cr, uid, item_tpl, builder, context=context)
54
52
# key generation for start_date and end_date fields
55
53
# are managed by _get_hashkey parent method
56
54
# because there are in the same level than
65
63
def _prepare_item_vals(self, cr, uid, item_tpl, builder, context=None):
66
vals = super(PricelistBuilder, self)._prepare_item_vals(cr, uid,
67
item_tpl, builder, context=context)
64
vals = super(PricelistBuilder, self)._prepare_item_vals(
65
cr, uid, item_tpl, builder, context=context)
68
66
if item_tpl.start_date:
69
67
vals['start_date'] = item_tpl.start_date
70
68
if item_tpl.end_date:
80
78
_inherit = "abstract.pricelist.item"
83
'start_date': fields.date('Start date',
84
help="NOT USED by OpenERP to modify pricelist computation (only " \
85
"with external connected applications)"
87
'end_date': fields.date('End date',
88
help="NOT USED by OpenERP to modify pricelist computation (only " \
89
"with external connected applications)"
81
'start_date': fields.date(
83
help="NOT USED by OpenERP to modify pricelist computation (only "
84
"with external connected applications)"),
85
'end_date': fields.date(
87
help="NOT USED by OpenERP to modify pricelist computation (only "
88
"with external connected applications)"),
99
97
'country_id': fields.many2one(
102
help="NOT USED by OpenERP to modify pricelist computation"
100
help="NOT USED by OpenERP to modify pricelist computation"),
104
101
'partner_cat_id': fields.many2one(
105
102
'res.partner.category',
106
103
'Partner Categ.',
107
help="NOT USED by OpenERP to modify pricelist computation"
104
help="NOT USED by OpenERP to modify pricelist computation"),
112
108
class PricelistItemTemplate(orm.Model):
113
109
_inherit = ['abstract.pricelist.item', 'pricelist.item.template']
114
_name = 'pricelist.item.template'
b'\\ No newline at end of file'
110
_name = 'pricelist.item.template'