Hardik Ansodariya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-578591-han into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
Related bugs:
Bug #1042741 in OpenERP Addons: "common_report_header _get_filter"
https://bugs.launchpad.net/openobject-addons/+bug/1042741
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-578591-han/+merge/122229
Hello,
Fixed the issue of Translation terms in common report header.
Report in other language than english.
If we choose a "period" filter, the report is printed but the periods names are
displayed as black squares.
With reference of maintenance case: 578591
Kindly review it.
Regards,
Hardik
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-578591-han/+merge/122229
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-578591-han.
=== modified file 'account/report/common_report_header.py'
--- account/report/common_report_header.py 2011-01-14 00:11:01 +0000
+++ account/report/common_report_header.py 2012-08-31 10:24:24 +0000
@@ -94,10 +94,10 @@
def _get_filter(self, data):
if data.get('form', False) and data['form'].get('filter', False):
if data['form']['filter'] == 'filter_date':
- return _('Date')
+ return 'Date'
elif data['form']['filter'] == 'filter_period':
- return _('Periods')
- return _('No Filter')
+ return 'Periods'
+ return 'No Filter'
def _sum_debit_period(self, period_id, journal_id=None):
journals = journal_id or self.journal_ids
=== modified file 'purchase/report/order.rml'
--- purchase/report/order.rml 2011-05-26 08:47:40 +0000
+++ purchase/report/order.rml 2012-08-31 10:24:24 +0000
@@ -131,31 +131,31 @@
<story>
<pto>
<pto_header>
- <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
- <tr>
- <td>
- <para style="terp_tblheader_General">Description</para>
- </td>
- <td>
- <para style="terp_tblheader_General">Taxes</para>
- </td>
- <td>
- <para style="terp_tblheader_General">Date Req.</para>
- </td>
- <td>
- <para style="terp_tblheader_General_Right">Qty</para>
- </td>
- <td>
- <para style="terp_tblheader_General_Right">Unit Price</para>
- </td>
- <td>
- <para style="terp_tblheader_General_Right">Net Price</para>
- </td>
- </tr>
- </blockTable>
- </pto_header>
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
+ <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
+ <tr>
+ <td>
+ <para style="terp_tblheader_General">Description</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General">Taxes</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General">Date Req.</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">Qty</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">Unit Price</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">Net Price</para>
+ </td>
+ </tr>
+ </blockTable>
+ </pto_header>
<para style="terp_default_9">
<font color="white"> </font>
</para>
=== 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-08-31 10:24:24 +0000
@@ -71,22 +71,22 @@
<story>
<pto>
<pto_header>
- <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
- <tr>
- <td>
- <para style="terp_tblheader_Details">Description</para>
- </td>
- <td>
- <para style="terp_tblheader_Details_Centre">Expected Date</para>
- </td>
- <td>
- <para style="terp_tblheader_Details_Centre">Qty</para>
- </td>
- </tr>
- </blockTable>
- </pto_header>
<para style="terp_default_9">[[repeatIn(objects,'order')]]</para>
<para style="terp_default_9">[[ setLang(order.partner_id.lang) ]]</para>
+ <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Description</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Centre">Expected Date</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Centre">Qty</para>
+ </td>
+ </tr>
+ </blockTable>
+ </pto_header>
<blockTable colWidths="250.0,59.0,221.0" style="Table_Address_Detail">
<tr>
<td>
@@ -180,4 +180,4 @@
<para style="terp_default_9">[[ user.signature or '' ]]</para>
</pto>
</story>
-</document>
\ No newline at end of file
+</document>
=== modified file 'sale/sale.py'
--- sale/sale.py 2012-06-29 14:14:29 +0000
+++ sale/sale.py 2012-08-31 10:24:24 +0000
@@ -811,6 +811,32 @@
return False
sale_order()
+class procurement_order(osv.osv):
+ _inherit = 'procurement.order'
+
+ def _quantity_compute_get(self, cr, uid, proc, context=None):
+ """ Computes only quantity of product that were Delivered and also computes the quantity of returned products.
+ @param proc: Current procurement.
+ @return: Quantity or False.
+ """
+ if proc.product_id.type == 'product' and proc.move_id:
+ move_obj = self.pool.get('stock.move')
+ sale_id = proc.move_id.picking_id.sale_id.id
+ picking_ids = self.pool.get('stock.picking').search(cr, uid, [('sale_id', '=', sale_id), ('state', '=', 'done'), ('type', '=', 'out')], context=context)
+ returned_picking_ids = self.pool.get('stock.picking').search(cr, uid, [('sale_id', '=', sale_id), ('state', '=', 'done'), ('type', '=', 'in')], context=context)
+ qty_uos = 0
+ for returned_picking_id in returned_picking_ids:
+ move_ids = move_obj.search(cr, uid, [('picking_id', '=', returned_picking_id)], context=context)
+ qty_uos = move_obj.browse(cr, uid, move_ids, context=context)[0].product_uos_qty
+ qty_uos = -qty_uos
+ for picking_id in picking_ids:
+ move_ids = move_obj.search(cr, uid, [('picking_id', '=', picking_id)], context=context)
+ qty_uos = move_obj.browse(cr, uid, move_ids, context=context)[0].product_uos_qty
+ return qty_uos
+ return False
+
+procurement_order()
+
# TODO add a field price_unit_uos
# - update it on change product and unit price
# - use it in report if there is a uos
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp