Merge lp:~openerp-dev/openobject-addons/trunk-bug-1089229-rmu into lp:openobject-addons

Proposed by Ravish(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1089229-rmu
Merge into: lp:openobject-addons
Diff against target: 37 lines (+5/-2)
2 files modified
sale/report/sale_order.py (+3/-0)
sale/report/sale_order.rml (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1089229-rmu
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+143237@code.launchpad.net

Description of the change

Hello,

I have solved the issue of "Sales using Secondary UoM show incorrect unit price Edit".
As per asked total is rounded up, is 10 rather then 9.98 for bug example.
Thanks

To post a comment you must log in.
8505. By Ravish(OpenERP)

update with latest branch

8506. By Ravish(OpenERP)

update with latest trunk

Unmerged revisions

8506. By Ravish(OpenERP)

update with latest trunk

8505. By Ravish(OpenERP)

update with latest branch

8504. By Ravish(OpenERP)

Sales using Secondary UoM show incorrect unit price Edit

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/report/sale_order.py'
2--- sale/report/sale_order.py 2012-12-06 14:56:32 +0000
3+++ sale/report/sale_order.py 2013-01-18 06:34:22 +0000
4@@ -28,7 +28,10 @@
5 super(order, self).__init__(cr, uid, name, context=context)
6 self.localcontext.update({
7 'time': time,
8+ 'get_price_objects': self._get_price_objects,
9 })
10+ def _get_price_objects(self, price,qty):
11+ return round((float(price)*qty))
12
13 report_sxw.report_sxw('report.sale.order', 'sale.order', 'addons/sale/report/sale_order.rml', parser=order, header="external")
14
15
16=== modified file 'sale/report/sale_order.rml'
17--- sale/report/sale_order.rml 2012-12-21 16:48:08 +0000
18+++ sale/report/sale_order.rml 2013-01-18 06:34:22 +0000
19@@ -272,13 +272,13 @@
20 <para style="terp_default_Right_9">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>
21 </td>
22 <td>
23- <para style="terp_default_Right_9">[[ formatLang(line.price_unit , digits=get_digits(dp='Product Price'))]]</para>
24+ <para style="terp_default_Right_9">[[ formatLang(line.product_uos and (line.price_unit * line.product_uom_qty / line.product_uos_qty) or line.price_unit , digits=get_digits(dp='Product Price'))]]</para>
25 </td>
26 <td>
27 <para style="terp_default_Centre_9">[[ formatLang(line.discount, digits=get_digits(dp='Discount'))]]</para>
28 </td>
29 <td>
30- <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] </para>
31+ <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal and get_price_objects(formatLang((line.price_unit * line.product_uom_qty / line.product_uos_qty)),line.product_uos_qty) or line.price_subtotal ,digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id)]]</para>
32 </td>
33 </tr>
34 </blockTable>
35
36=== modified file 'sale/report/sale_order.sxw'
37Binary files sale/report/sale_order.sxw 2012-12-09 17:56:41 +0000 and sale/report/sale_order.sxw 2013-01-18 06:34:22 +0000 differ

Subscribers

People subscribed via source and target branches

to all changes: