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
=== modified file 'purchase/report/order.rml'
--- purchase/report/order.rml 2011-05-26 08:47:40 +0000
+++ purchase/report/order.rml 2012-07-04 06:41:22 +0000
@@ -131,31 +131,31 @@
131 <story>131 <story>
132 <pto>132 <pto>
133 <pto_header>133 <pto_header>
134 <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
135 <tr>
136 <td>
137 <para style="terp_tblheader_General">Description</para>
138 </td>
139 <td>
140 <para style="terp_tblheader_General">Taxes</para>
141 </td>
142 <td>
143 <para style="terp_tblheader_General">Date Req.</para>
144 </td>
145 <td>
146 <para style="terp_tblheader_General_Right">Qty</para>
147 </td>
148 <td>
149 <para style="terp_tblheader_General_Right">Unit Price</para>
150 </td>
151 <td>
152 <para style="terp_tblheader_General_Right">Net Price</para>
153 </td>
154 </tr>
155 </blockTable>
156 </pto_header>
157 <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>134 <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
158 <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>135 <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
136 <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
137 <tr>
138 <td>
139 <para style="terp_tblheader_General">Description</para>
140 </td>
141 <td>
142 <para style="terp_tblheader_General">Taxes</para>
143 </td>
144 <td>
145 <para style="terp_tblheader_General">Date Req.</para>
146 </td>
147 <td>
148 <para style="terp_tblheader_General_Right">Qty</para>
149 </td>
150 <td>
151 <para style="terp_tblheader_General_Right">Unit Price</para>
152 </td>
153 <td>
154 <para style="terp_tblheader_General_Right">Net Price</para>
155 </td>
156 </tr>
157 </blockTable>
158 </pto_header>
159 <para style="terp_default_9">159 <para style="terp_default_9">
160 <font color="white"> </font>160 <font color="white"> </font>
161 </para>161 </para>
162162
=== modified file 'purchase/report/request_quotation.rml'
--- purchase/report/request_quotation.rml 2011-09-08 11:19:51 +0000
+++ purchase/report/request_quotation.rml 2012-07-04 06:41:22 +0000
@@ -71,22 +71,22 @@
71 <story>71 <story>
72 <pto>72 <pto>
73 <pto_header>73 <pto_header>
74 <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
75 <tr>
76 <td>
77 <para style="terp_tblheader_Details">Description</para>
78 </td>
79 <td>
80 <para style="terp_tblheader_Details_Centre">Expected Date</para>
81 </td>
82 <td>
83 <para style="terp_tblheader_Details_Centre">Qty</para>
84 </td>
85 </tr>
86 </blockTable>
87 </pto_header>
88 <para style="terp_default_9">[[repeatIn(objects,'order')]]</para>74 <para style="terp_default_9">[[repeatIn(objects,'order')]]</para>
89 <para style="terp_default_9">[[ setLang(order.partner_id.lang) ]]</para>75 <para style="terp_default_9">[[ setLang(order.partner_id.lang) ]]</para>
76 <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
77 <tr>
78 <td>
79 <para style="terp_tblheader_Details">Description</para>
80 </td>
81 <td>
82 <para style="terp_tblheader_Details_Centre">Expected Date</para>
83 </td>
84 <td>
85 <para style="terp_tblheader_Details_Centre">Qty</para>
86 </td>
87 </tr>
88 </blockTable>
89 </pto_header>
90 <blockTable colWidths="250.0,59.0,221.0" style="Table_Address_Detail">90 <blockTable colWidths="250.0,59.0,221.0" style="Table_Address_Detail">
91 <tr>91 <tr>
92 <td>92 <td>
@@ -180,4 +180,4 @@
180 <para style="terp_default_9">[[ user.signature or '' ]]</para>180 <para style="terp_default_9">[[ user.signature or '' ]]</para>
181 </pto>181 </pto>
182 </story>182 </story>
183</document>
184\ No newline at end of file183\ No newline at end of file
184</document>
185185
=== modified file 'sale/sale.py'
--- sale/sale.py 2012-06-29 14:14:29 +0000
+++ sale/sale.py 2012-07-04 06:41:22 +0000
@@ -811,6 +811,32 @@
811 return False811 return False
812sale_order()812sale_order()
813813
814class procurement_order(osv.osv):
815 _inherit = 'procurement.order'
816
817 def _quantity_compute_get(self, cr, uid, proc, context=None):
818 """ Computes only quantity of product that were Delivered and also computes the quantity of returned products.
819 @param proc: Current procurement.
820 @return: Quantity or False.
821 """
822 if proc.product_id.type == 'product' and proc.move_id:
823 move_obj = self.pool.get('stock.move')
824 sale_id = proc.move_id.picking_id.sale_id.id
825 picking_ids = self.pool.get('stock.picking').search(cr, uid, [('sale_id', '=', sale_id), ('state', '=', 'done'), ('type', '=', 'out')], context=context)
826 returned_picking_ids = self.pool.get('stock.picking').search(cr, uid, [('sale_id', '=', sale_id), ('state', '=', 'done'), ('type', '=', 'in')], context=context)
827 qty_uos = 0
828 for returned_picking_id in returned_picking_ids:
829 move_ids = move_obj.search(cr, uid, [('picking_id', '=', returned_picking_id)], context=context)
830 qty_uos = move_obj.browse(cr, uid, move_ids, context=context)[0].product_uos_qty
831 qty_uos = -qty_uos
832 for picking_id in picking_ids:
833 move_ids = move_obj.search(cr, uid, [('picking_id', '=', picking_id)], context=context)
834 qty_uos = move_obj.browse(cr, uid, move_ids, context=context)[0].product_uos_qty
835 return qty_uos
836 return False
837
838procurement_order()
839
814# TODO add a field price_unit_uos840# TODO add a field price_unit_uos
815# - update it on change product and unit price841# - update it on change product and unit price
816# - use it in report if there is a uos842# - use it in report if there is a uos