Skip to content

Commit

Permalink
Merge PR #60 into 11.0
Browse files Browse the repository at this point in the history
Signed-off-by jbeficent
  • Loading branch information
OCA-git-bot committed Jul 7, 2019
2 parents 3f9421a + 5e47c8e commit 25aac83
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mrp_bom_structure_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "MRP BoM Structure Report",
"version": "11.0.1.1.0",
"version": "11.0.1.2.0",
"author": "Odoo SA, Eficent, Odoo Community Association (OCA)",
"website": "https://www.github.com/OCA/manufacture-reporting",
"category": "Manufacture Reporting",
Expand Down
6 changes: 3 additions & 3 deletions mrp_bom_structure_report/i18n/mrp_bom_structure_report.pot
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ msgid "No data available."
msgstr ""

#. module: mrp_bom_structure_report
#: code:addons/mrp_bom_structure_report/reports/mrp_report_bom_structure.py:310
#: code:addons/mrp_bom_structure_report/reports/mrp_report_bom_structure.py:311
#: model:ir.ui.view,arch_db:mrp_bom_structure_report.report_mrp_bom_line
#, python-format
msgid "Operations"
Expand Down Expand Up @@ -193,8 +193,8 @@ msgid "Variant:"
msgstr ""

#. module: mrp_bom_structure_report
#: code:addons/mrp_bom_structure_report/reports/mrp_report_bom_structure.py:313
#: code:addons/mrp_bom_structure_report/reports/mrp_report_bom_structure.py:323
#: code:addons/mrp_bom_structure_report/reports/mrp_report_bom_structure.py:314
#: code:addons/mrp_bom_structure_report/reports/mrp_report_bom_structure.py:324
#, python-format
msgid "minutes"
msgstr ""
Expand Down
3 changes: 2 additions & 1 deletion mrp_bom_structure_report/reports/mrp_report_bom_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def _get_price(self, bom, factor):
if line.child_bom_id:
qty = line.product_uom_id._compute_quantity(
line.product_qty * factor,
line.child_bom_id.product_uom_id)
line.child_bom_id.product_uom_id
) / line.child_bom_id.product_qty
sub_price = self._get_price(line.child_bom_id, qty)
price += sub_price
else:
Expand Down
14 changes: 7 additions & 7 deletions mrp_bom_structure_report/reports/mrp_report_bom_structure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<th>Product</th>
<th>BoM</th>
<th class="text-right">Quantity</th>
<th class="text-left" groups="uom.group_uom">Unit of Measure</th>
<th class="text-left" groups="product.group_uom">Unit of Measure</th>
<th t-if="data['report_structure'] != 'bom_cost'" class="o_mrp_prod_cost text-right" title="This is the cost defined on the product.">Product Cost</th>
<th t-if="data['report_structure'] != 'bom_structure'" class="o_mrp_bom_cost text-right" title="This is the cost based on the BoM of the product. It is computed by summing the costs of the components and operations needed to build the product.">BoM Cost</th>
<th t-if="data['report_type'] == 'html' and data['has_attachments']" class="o_mrp_has_attachments" title="Files attached to the product">Attachments</th>
Expand All @@ -40,7 +40,7 @@
<span><a href="#" t-if="data['report_type'] == 'html'" t-att-data-res-id="data['bom'].id" t-att-data-model="'mrp.bom'" class="o_mrp_bom_action"><t t-esc="data['code']"/></a><t t-else="" t-esc="data['code']"/></span>
</td>
<td class="text-right"><span><t t-esc="data['bom_qty']" t-options='{"widget": "float", "decimal_precision": "Product Unit of Measure"}'/></span></td>
<td groups="uom.group_uom"><span><t t-esc="data['bom'].product_uom_id.name"/></span></td>
<td groups="product.group_uom"><span><t t-esc="data['bom'].product_uom_id.name"/></span></td>
<td t-if="data['report_structure'] != 'bom_cost'" class="o_mrp_prod_cost text-right">
<span><t t-esc="data['price']" t-options='{"widget": "monetary", "display_currency": currency}'/></span>
</td>
Expand All @@ -63,7 +63,7 @@
<td></td>
<td></td>
<td class="text-right"><span><strong>Unit Cost</strong></span></td>
<td groups="uom.group_uom"></td>
<td groups="product.group_uom"></td>
<td t-if="data['report_structure'] != 'bom_cost'" class="o_mrp_prod_cost text-right">
<span><t t-esc="data['price']/data['bom_qty']" t-options='{"widget": "monetary", "display_currency": currency}'/></span>
</td>
Expand Down Expand Up @@ -106,7 +106,7 @@
</span>
</td>
<td class="text-right"><span><t t-esc="l['prod_qty']" t-options='{"widget": "float", "decimal_precision": "Product Unit of Measure"}'/></span></td>
<td groups="uom.group_uom"><span><t t-esc="l['prod_uom']"/></span></td>
<td groups="product.group_uom"><span><t t-esc="l['prod_uom']"/></span></td>
<td class="o_mrp_prod_cost text-right">
<span t-esc="l['prod_cost']" t-options='{"widget": "monetary", "display_currency": currency}'/>
</td>
Expand Down Expand Up @@ -134,7 +134,7 @@
<td class="text-right">
<span t-esc="data['operations_time']" t-options='{"widget": "float_time"}'/>
</td>
<td groups="uom.group_uom"><span>Minutes</span></td>
<td groups="product.group_uom"><span>Minutes</span></td>
<td class="o_mrp_prod_cost">
</td>
<td class="o_mrp_bom_cost text-right">
Expand All @@ -158,7 +158,7 @@
<td class="text-right">
<span t-esc="op['duration_expected']" t-options='{"widget": "float_time"}'/>
</td>
<td groups="uom.group_uom"><span>Minutes</span></td>
<td groups="product.group_uom"><span>Minutes</span></td>
<td class="o_mrp_prod_cost"></td>
<td class="o_mrp_bom_cost text-right">
<span t-esc="op['total']" t-options='{"widget": "monetary", "display_currency": currency}'/>
Expand Down Expand Up @@ -192,7 +192,7 @@
<t t-if="l['type'] == 'bom'" t-esc="l['quantity']" t-options='{"widget": "float", "decimal_precision": "Product Unit of Measure"}'/>
</span>
</td>
<td groups="uom.group_uom"><span><t t-esc="l['uom']"/></span></td>
<td groups="product.group_uom"><span><t t-esc="l['uom']"/></span></td>
<td t-if="data['report_structure'] != 'bom_cost'" class="o_mrp_prod_cost text-right">
<span t-if="'prod_cost' in l" t-esc="l['prod_cost']" t-options='{"widget": "monetary", "display_currency": currency}'/>
</td>
Expand Down

0 comments on commit 25aac83

Please sign in to comment.