Skip to content

Commit

Permalink
[IMP] product_replenishment_cost: replenishment_cost_last_update adju…
Browse files Browse the repository at this point in the history
…stment
  • Loading branch information
vib-adhoc committed Jan 31, 2023
1 parent a108eb3 commit 9fc2535
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion product_replenishment_cost/__manifest__.py
@@ -1,6 +1,6 @@
{
'name': 'Replenishment Cost',
'version': "15.0.1.1.0",
'version': "15.0.1.2.0",
'author': "ADHOC SA, Odoo Community Association (OCA)",
'license': 'AGPL-3',
'category': 'Products',
Expand Down
6 changes: 6 additions & 0 deletions product_replenishment_cost/models/product_template.py
Expand Up @@ -136,8 +136,14 @@ def _update_cost_from_replenishment_cost(self):
return True

@api.depends(
'replenishment_cost_type',
'replenishment_base_cost',
'replenishment_base_cost_currency_id',
'supplier_price',
'supplier_currency_id',
'replenishment_cost_rule_id.item_ids.sequence',
'replenishment_cost_rule_id.item_ids.percentage_amount',
'replenishment_cost_rule_id.item_ids.fixed_amount',
)
def _compute_replenishment_cost_last_update(self):
self.replenishment_cost_last_update = fields.Datetime.now()
Expand Down
Expand Up @@ -11,7 +11,7 @@
<field name="supplier_currency_id" invisible="1"/>
<group name="replenishment_cost" string="Replenishment Cost">
<field name="replenishment_cost_type"/>
<field name="replenishment_cost_last_update" string="Last Update" readonly="1" attrs="{'invisible':[('replenishment_cost_type', '!=', 'manual')]}"/>
<field name="replenishment_cost_last_update" string="Last Update" readonly="1"/>
<label for="replenishment_base_cost" string="Base Cost"/>
<div name="replenishment_base_cost" class="o_row">
<field name="supplier_price" widget="monetary" options="{'currency_field': 'supplier_currency_id','field_digits': True}" attrs="{'invisible':[('replenishment_cost_type', 'not in', ['supplier_price', 'last_supplier_price'])]}"/>
Expand Down

0 comments on commit 9fc2535

Please sign in to comment.