Skip to content
Snippets Groups Projects
Commit 93cc51a1 authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[FIX] product: fix default values for pricelist

Bad migration to new api... All values was resetted ith 'forumla'.
Why not formula as default value directly in product.pricelist.item ???
parent f2db00d7
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,10 @@ class Pricelist(models.Model):
return self.env.user.company_id.currency_id.id
def _get_default_item_ids(self):
return [[0, False, {'compute_price': 'formula'}]]
ProductPricelistItem = self.env['product.pricelist.item']
vals = ProductPricelistItem.default_get(ProductPricelistItem._fields.keys())
vals.update(compute_price='formula')
return [[0, False, vals]]
name = fields.Char('Pricelist Name', required=True, translate=True)
active = fields.Boolean('Active', default=True, help="If unchecked, it will allow you to hide the pricelist without removing it.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment