From 6be95981f425b06cb2bdf5a2ffa8b5d7e794f9ea Mon Sep 17 00:00:00 2001 From: qdp Date: Mon, 1 Dec 2008 17:44:05 +0100 Subject: [PATCH 1/3] *reverted address mail = fields.chart instead of fields.related *improved view or res.partner bzr revid: qdp@tinyerp.com-20081201164405-d93u1b0fpahgnsjt --- addons/base_contact/base_contact.py | 1 - addons/base_contact/base_contact_view.xml | 49 ++++++++++++++++++++--- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/addons/base_contact/base_contact.py b/addons/base_contact/base_contact.py index 9fa43c42e43..fa3dc37b311 100644 --- a/addons/base_contact/base_contact.py +++ b/addons/base_contact/base_contact.py @@ -88,7 +88,6 @@ class res_partner_address(osv.osv): _description ='Partner Address' _columns = { 'job_ids':fields.one2many('res.partner.job', 'address_id', 'Contacts'), - 'email': fields.related('job_ids', 'email', type='char', string='Default Email'), } res_partner_address() diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml index 6bf2b2ef61a..4ee308221ff 100644 --- a/addons/base_contact/base_contact_view.xml +++ b/addons/base_contact/base_contact_view.xml @@ -107,7 +107,7 @@ - + @@ -138,6 +138,45 @@ + + + res.partner.form + form + res.partner + + + + + + + + + + res.partner.form + form + res.partner + + + + + + + + res.partner.form + form + res.partner + + + + + + + + + + + + Partner addresses inherited @@ -302,11 +341,11 @@ groups="base.group_extended"/> - + /> + From ab4fc011dd2f1cd6a3c2860a3c563957a0281152 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Tue, 2 Dec 2008 15:06:20 +0530 Subject: [PATCH 3/3] modify report on mrp_repair bzr revid: mra@tinyerp.com-20081202093620-cvz39cer265uitwz --- addons/mrp_repair/mrp_repair_report.xml | 2 +- addons/mrp_repair/report/order.py | 13 ++--- addons/mrp_repair/report/order.rml | 72 ++++++++++++++++++------- 3 files changed, 60 insertions(+), 27 deletions(-) diff --git a/addons/mrp_repair/mrp_repair_report.xml b/addons/mrp_repair/mrp_repair_report.xml index e90f0d3ca40..a9d41f8514c 100644 --- a/addons/mrp_repair/mrp_repair_report.xml +++ b/addons/mrp_repair/mrp_repair_report.xml @@ -3,7 +3,7 @@ ). All Rights Reserved # $Id$ # @@ -33,23 +33,24 @@ class order(report_sxw.rml_parse): 'total': self.total, 'adr_get' : self._adr_get }) - - + + def total(self, repair): total = 0.0 for operation in repair.operations: - total+=operation.price_subtotal + total+=operation.price_subtotal for fee in repair.fees_lines: total+=fee.price_subtotal + total = total + repair.amount_tax return total - + def _adr_get(self, partner, type): res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) adr_id = addresses and addresses[type] or False return adr_id and res_partner_address.read(self.cr, self.uid, [adr_id])[0] or False - + report_sxw.report_sxw('report.repair.order','mrp.repair','addons/mrp_repair/report/order.rml',parser=order) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index 93241470277..b9a786a0bc0 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -51,11 +51,8 @@ - - - - - + + @@ -96,6 +93,7 @@ + @@ -186,7 +184,6 @@ - [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] Shipping address :[[ o.address_id.title or '' ]] [[ o.address_id.name ]] [[ o.address_id.street ]] [[ o.address_id.street2 or '' ]] @@ -252,10 +249,10 @@ [[ o.prodlot_id.name or '' ]] - [[ o.guarantee_limit ]] + [[ time.strftime('%d/%m/%Y', time.strptime(o.guarantee_limit, '%Y-%m-%d')) ]] - [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] + [[ time.strftime('%d/%m/%Y') ]] @@ -265,11 +262,14 @@ - + Product + + Description + VAT @@ -293,17 +293,18 @@ [[ repeatIn(o.operations,'line') ]] - + Add [[ ((line.type == 'add') or removeParentNode('para')) and '' ]] Remove [[ ((line.type == 'remove') or removeParentNode('para')) and '' ]] - - [[ line.product_id.name ]] - [[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]] + [[ line.name ]] + + + [[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]] [[ line.product_uom_qty or '0.00' ]] [[ line.product_uom.name ]] @@ -312,7 +313,7 @@ [[ line.price_unit ]] - [[ line.price_subtotal ]] + [[ line.price_subtotal ]] @@ -331,15 +332,13 @@ [[ repeatIn(o.fees_lines,'fees') ]] - + - - - + [[ fees.product_id.name ]] - [[ fees.product_id.name ]] + [[ fees.name ]] [[ ', '.join(map(lambda x: x.name, fees.tax_id)) or '0.00' ]] @@ -367,7 +366,40 @@ - + + + + + + + + + Net Total : + + + [[ o.amount_untaxed or '0.00' ]] + + + [[ o.pricelist_id.currency_id.name ]] + + + + + + + + + + Taxes : + + + [[ o.amount_tax or '0.00' ]] + + + [[ o.pricelist_id.currency_id.name ]] + + +