MIG stock_landed_cost_average WIP for 13.0

This commit is contained in:
Bhoomi
2019-08-29 19:41:01 -04:00
parent 4475038166
commit 893c730c63
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
{
'name': 'Landed Costs Average',
'summary': 'Use Landed Costs on Average Cost inventory.',
'version': '12.0.1.0.0',
'version': '13.0.1.0.0',
'author': "Hibou Corp. <hello@hibou.io>",
'category': 'Warehouse',
'license': 'AGPL-3',

View File

@@ -33,7 +33,6 @@ class LandedCost(models.Model):
raise UserError(_('The selected picking does not contain any move that would be impacted by landed costs. Landed costs are only possible for products configured in real time valuation with real price costing method. Please make sure it is the case, or you selected the correct picking'))
return lines
@api.multi
def button_validate(self):
"""
Override to directly set new standard_price on product if average costed.
@@ -53,6 +52,7 @@ class LandedCost(models.Model):
'date': cost.date,
'ref': cost.name,
'line_ids': [],
'type': 'entry',
}
for line in cost.valuation_adjustment_lines.filtered(lambda line: line.move_id):
# Prorate the value at what's still in stock