forked from Yaltik/golem
overwrite copy methode to support price_line_ids
This commit is contained in:
parent
78164bd55c
commit
2463a121d0
@ -25,6 +25,14 @@ class GolemActivity(models.Model):
|
|||||||
|
|
||||||
price_line_ids = fields.One2many('golem.activity.price.line',
|
price_line_ids = fields.One2many('golem.activity.price.line',
|
||||||
'activity_id', string='Price lines')
|
'activity_id', string='Price lines')
|
||||||
|
@api.multi
|
||||||
|
def copy(self, default=None):
|
||||||
|
""" Copy price_line_ids """
|
||||||
|
self.ensure_one()
|
||||||
|
default = default or {}
|
||||||
|
ids = self.price_line_ids.ids
|
||||||
|
default['price_line_ids'] = [(6, False, ids)]
|
||||||
|
return super(GolemActivity, self).copy(default)
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def reset_price_combinations(self):
|
def reset_price_combinations(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user