Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]product_replenishment_cost:uom convertion #642

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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