Merge lp:~openerp-dev/openobject-addons/6.0-opw-576501-han into lp:openobject-addons/6.0

Proposed by Hardik Ansodariya (OpenERP)
Status: Rejected
Rejected by: Naresh(OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-576501-han
Merge into: lp:openobject-addons/6.0
Diff against target: 143 lines (+64/-38)
3 files modified
purchase/report/order.rml (+23/-23)
purchase/report/request_quotation.rml (+15/-15)
sale/sale.py (+26/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-576501-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Disapprove
Review via email: mp+113338@code.launchpad.net

Description of the change

Hello,

I have fixed the issue of "Table header is not translated on subsequent pages of Purchase Order and Request For Quotation report".

Steps:
* Create a customer test and set his language to the loaded translation (e.g Dutch).
* Create a purchase order for customer test
* Create enough purchase order lines so the report will span more than one page
* Print the Request for Quotation report.

On this report, the table headers on the second page will be in english although those on the first page are in Dutch.

Referencing Maintenance Case: 576501

Kindly review it.

Thanks

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

The merge proposal is formed combining fixes from 2 cases where as its not intended in the description.

Thanks,
Naresh

review: Disapprove

Unmerged revisions

5236. By Hardik Ansodariya (OpenERP)

[FIX] Purchase:Table header is not translated on subsequent pages of Purchase Order and Request For Quotation report (Maintenance Case: 576501)

5235. By Hardik Ansodariya (OpenERP)

[FIX] sale: Backport from the lp:~openerp-dev/openobject-addons/6.1-opw-574049-rgo into lp:openobject-addons/6.1 (Maintanence Case:575908)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/report/order.rml'
2--- purchase/report/order.rml 2011-05-26 08:47:40 +0000
3+++ purchase/report/order.rml 2012-07-04 06:41:22 +0000
4@@ -131,31 +131,31 @@
5 <story>
6 <pto>
7 <pto_header>
8- <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
9- <tr>
10- <td>
11- <para style="terp_tblheader_General">Description</para>
12- </td>
13- <td>
14- <para style="terp_tblheader_General">Taxes</para>
15- </td>
16- <td>
17- <para style="terp_tblheader_General">Date Req.</para>
18- </td>
19- <td>
20- <para style="terp_tblheader_General_Right">Qty</para>
21- </td>
22- <td>
23- <para style="terp_tblheader_General_Right">Unit Price</para>
24- </td>
25- <td>
26- <para style="terp_tblheader_General_Right">Net Price</para>
27- </td>
28- </tr>
29- </blockTable>
30- </pto_header>
31 <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
32 <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
33+ <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
34+ <tr>
35+ <td>
36+ <para style="terp_tblheader_General">Description</para>
37+ </td>
38+ <td>
39+ <para style="terp_tblheader_General">Taxes</para>
40+ </td>
41+ <td>
42+ <para style="terp_tblheader_General">Date Req.</para>
43+ </td>
44+ <td>
45+ <para style="terp_tblheader_General_Right">Qty</para>
46+ </td>
47+ <td>
48+ <para style="terp_tblheader_General_Right">Unit Price</para>
49+ </td>
50+ <td>
51+ <para style="terp_tblheader_General_Right">Net Price</para>
52+ </td>
53+ </tr>
54+ </blockTable>
55+ </pto_header>
56 <para style="terp_default_9">
57 <font color="white"> </font>
58 </para>
59
60=== modified file 'purchase/report/request_quotation.rml'
61--- purchase/report/request_quotation.rml 2011-09-08 11:19:51 +0000
62+++ purchase/report/request_quotation.rml 2012-07-04 06:41:22 +0000
63@@ -71,22 +71,22 @@
64 <story>
65 <pto>
66 <pto_header>
67- <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
68- <tr>
69- <td>
70- <para style="terp_tblheader_Details">Description</para>
71- </td>
72- <td>
73- <para style="terp_tblheader_Details_Centre">Expected Date</para>
74- </td>
75- <td>
76- <para style="terp_tblheader_Details_Centre">Qty</para>
77- </td>
78- </tr>
79- </blockTable>
80- </pto_header>
81 <para style="terp_default_9">[[repeatIn(objects,'order')]]</para>
82 <para style="terp_default_9">[[ setLang(order.partner_id.lang) ]]</para>
83+ <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
84+ <tr>
85+ <td>
86+ <para style="terp_tblheader_Details">Description</para>
87+ </td>
88+ <td>
89+ <para style="terp_tblheader_Details_Centre">Expected Date</para>
90+ </td>
91+ <td>
92+ <para style="terp_tblheader_Details_Centre">Qty</para>
93+ </td>
94+ </tr>
95+ </blockTable>
96+ </pto_header>
97 <blockTable colWidths="250.0,59.0,221.0" style="Table_Address_Detail">
98 <tr>
99 <td>
100@@ -180,4 +180,4 @@
101 <para style="terp_default_9">[[ user.signature or '' ]]</para>
102 </pto>
103 </story>
104-</document>
105\ No newline at end of file
106+</document>
107
108=== modified file 'sale/sale.py'
109--- sale/sale.py 2012-06-29 14:14:29 +0000
110+++ sale/sale.py 2012-07-04 06:41:22 +0000
111@@ -811,6 +811,32 @@
112 return False
113 sale_order()
114
115+class procurement_order(osv.osv):
116+ _inherit = 'procurement.order'
117+
118+ def _quantity_compute_get(self, cr, uid, proc, context=None):
119+ """ Computes only quantity of product that were Delivered and also computes the quantity of returned products.
120+ @param proc: Current procurement.
121+ @return: Quantity or False.
122+ """
123+ if proc.product_id.type == 'product' and proc.move_id:
124+ move_obj = self.pool.get('stock.move')
125+ sale_id = proc.move_id.picking_id.sale_id.id
126+ picking_ids = self.pool.get('stock.picking').search(cr, uid, [('sale_id', '=', sale_id), ('state', '=', 'done'), ('type', '=', 'out')], context=context)
127+ returned_picking_ids = self.pool.get('stock.picking').search(cr, uid, [('sale_id', '=', sale_id), ('state', '=', 'done'), ('type', '=', 'in')], context=context)
128+ qty_uos = 0
129+ for returned_picking_id in returned_picking_ids:
130+ move_ids = move_obj.search(cr, uid, [('picking_id', '=', returned_picking_id)], context=context)
131+ qty_uos = move_obj.browse(cr, uid, move_ids, context=context)[0].product_uos_qty
132+ qty_uos = -qty_uos
133+ for picking_id in picking_ids:
134+ move_ids = move_obj.search(cr, uid, [('picking_id', '=', picking_id)], context=context)
135+ qty_uos = move_obj.browse(cr, uid, move_ids, context=context)[0].product_uos_qty
136+ return qty_uos
137+ return False
138+
139+procurement_order()
140+
141 # TODO add a field price_unit_uos
142 # - update it on change product and unit price
143 # - use it in report if there is a uos