commit
8a3bfd59fa
|
@ -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()
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
<field name="fax"/>
|
||||
<field name="email"/>
|
||||
<newline/>
|
||||
<field name="job_ids" mode="tree,form" colspan="4">
|
||||
<field name="job_ids" mode="tree,form" nolabel="1" colspan="4">
|
||||
<tree string="Contacts" editable="top">
|
||||
<field name="sequence_partner"/>
|
||||
<field name="contact_id"/>
|
||||
|
@ -138,6 +138,45 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- don't display the categories, since it is displayed in an other tab-->
|
||||
<record model="ir.ui.view" id="view_partner_form_inherit2">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="type">form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="category_id" position="replace">
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- don't display the categories label-->
|
||||
<record model="ir.ui.view" id="view_partner_form_inherit2bis">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="type">form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<separator colspan="4" string="Categories" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_partner_form_inherit3">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="type">form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Categories">
|
||||
<separator colspan="4" string="Categories"/>
|
||||
<field colspan="4" name="category_id" nolabel="1" select="2"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Views for Addresses -->
|
||||
<record model="ir.ui.view" id="view_partner_address_tree_inherited1">
|
||||
<field name="name">Partner addresses inherited</field>
|
||||
|
@ -302,11 +341,11 @@
|
|||
groups="base.group_extended"/>
|
||||
|
||||
<!-- Act window defining a shorcut on partners to open all his contacts -->
|
||||
<act_window name="Partner Contacts"
|
||||
domain="[('name', '=', active_id)]"
|
||||
<act_window domain="[('name', '=', active_id)]"
|
||||
id="act_res_partner_jobs" name="Partner Contacts"
|
||||
res_model="res.partner.job"
|
||||
src_model="res.partner"
|
||||
view_mode='tree,form'
|
||||
id="act_res_partner_jobs"/>
|
||||
/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
<report
|
||||
id="report_mrp_repair"
|
||||
string="Repair Quotation"
|
||||
string="Repair Order"
|
||||
model="mrp.repair"
|
||||
name="repair.order"
|
||||
rml="mrp_repair/report/order.rml"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). 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:
|
||||
|
|
|
@ -51,11 +51,8 @@
|
|||
<blockTableStyle id="HeadingTable">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,-1"/>
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
|
@ -96,6 +93,7 @@
|
|||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="3,2"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
|
@ -186,7 +184,6 @@
|
|||
<blockTable colWidths="265.0,51.0,225.0" style="AddressTable">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P37">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="P10">Shipping address :[[ o.address_id.title or '' ]] [[ o.address_id.name ]]</para>
|
||||
<para style="P1">[[ o.address_id.street ]]</para>
|
||||
<para style="P1">[[ o.address_id.street2 or '' ]]</para>
|
||||
|
@ -252,10 +249,10 @@
|
|||
<para style="P13">[[ o.prodlot_id.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ o.guarantee_limit ]]</para>
|
||||
<para style="P13">[[ time.strftime('%d/%m/%Y', time.strptime(o.guarantee_limit, '%Y-%m-%d')) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
|
||||
<para style="P13">[[ time.strftime('%d/%m/%Y') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -265,11 +262,14 @@
|
|||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="165.0,165.0,90.0,51.0,64.0" repeatRows="1" style="HeadingTable">
|
||||
<blockTable colWidths="100.0,100,80.0,100.0,60.0,64.0" repeatRows="1" style="HeadingTable">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">Product</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">VAT</para>
|
||||
</td>
|
||||
|
@ -293,17 +293,18 @@
|
|||
<tr>
|
||||
<td>
|
||||
<para style="P4">[[ repeatIn(o.operations,'line') ]]</para>
|
||||
<blockTable colWidths="35.0,130.0,165.0,90.0,51.0,64.0" style="Table7">
|
||||
<blockTable colWidths="100.0,120,80.0,100.0,60.0,64.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Add [[ ((line.type == 'add') or removeParentNode('para')) and '' ]] </para>
|
||||
<para style="P3">Remove [[ ((line.type == 'remove') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ line.product_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P31">[[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]]</para>
|
||||
<para style="P1">[[ line.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P31">[[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P31">[[ line.product_uom_qty or '0.00' ]] [[ line.product_uom.name ]]</para>
|
||||
|
@ -312,7 +313,7 @@
|
|||
<para style="P28">[[ line.price_unit ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P29">[[ line.price_subtotal ]]</para>
|
||||
<para style="P29">[[ line.price_subtotal ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -331,15 +332,13 @@
|
|||
<tr>
|
||||
<td>
|
||||
<para style="P23">[[ repeatIn(o.fees_lines,'fees') ]]</para>
|
||||
<blockTable colWidths="35.0,130.0,165.0,90.0,51.0,64.0" style="Table9">
|
||||
<blockTable colWidths="100.0,120,80.0,100.0,60.0,64.0" style="Table9">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P23">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P1">[[ fees.product_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ fees.product_id.name ]]</para>
|
||||
<para style="P1">[[ fees.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P31">[[ ', '.join(map(lambda x: x.name, fees.tax_id)) or '0.00' ]]</para>
|
||||
|
@ -367,7 +366,40 @@
|
|||
<para style="P20">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="436.0,39.0,40.0,22.0" style="Table4">
|
||||
<blockTable colWidths="410.0,59.0,50.0,22.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="p1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P35">Net Total :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P27">[[ o.amount_untaxed or '0.00' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P30">[[ o.pricelist_id.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="p1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P35">Taxes :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P27">[[ o.amount_tax or '0.00' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P30">[[ o.pricelist_id.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">
|
||||
|
|
Loading…
Reference in New Issue