Skip to content

Commit

Permalink
[FIX]product_replenishment_cost:uom convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-adhoc committed Jul 3, 2024
1 parent d954e69 commit a7d24a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion product_replenishment_cost/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'Replenishment Cost',
'version': "16.0.1.4.0",
'version': "16.0.1.5.0",
'author': "ADHOC SA, Odoo Community Association (OCA)",
'license': 'AGPL-3',
'category': 'Products',
Expand Down
3 changes: 0 additions & 3 deletions product_replenishment_cost/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ def _compute_replenishment_cost(self):
replenishment_cost_rule.compute_rule(
replenishment_base_cost_on_currency, rec)

if rec.uom_po_id != rec.uom_id and rec.uom_id.category_id == rec.uom_po_id.category_id and rec.uom_po_id.factor_inv != 0:
replenishment_cost = replenishment_cost * (rec.uom_id.factor_inv/rec.uom_po_id.factor_inv)

rec.update({
'replenishment_base_cost_on_currency':
replenishment_base_cost_on_currency,
Expand Down
10 changes: 2 additions & 8 deletions product_replenishment_cost/views/product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@
<label for="replenishment_base_cost_on_currency" string="/"/>
<field name="replenishment_base_cost_on_currency" class="oe_inline" widget="monetary" options="{'currency_field': 'currency_id','field_digits': True}"/>
</div>
<field name="replenishment_cost_rule_id" string="Cost Rule" context="{'default_product_id': active_id}"/>
<label for="replenishment_cost"/>
<div name="replenishment_cost_uom">
<field name="replenishment_cost" class="oe_inline" string="Replenishment Cost" widget="monetary" options="{'currency_field': 'currency_id','field_digits': True}"/>
<span groups="uom.group_uom" > por
<field name="uom_name" class="oe_inline"/>
</span>
</div>
<field name="replenishment_cost_rule_id" string="Cost Rule" context="{'default_product_id': active_id}"/>
<field name="replenishment_cost" string="Replenishment Cost" widget="monetary" options="{'currency_field': 'currency_id','field_digits': True}"/>
</group>
<group name="accounting_cost" string="Accounting Cost">
<label for="standard_price" groups="base.group_user" string="Accounting Cost"/>
Expand Down

0 comments on commit a7d24a3

Please sign in to comment.