fix and merge

bzr revid: fp@tinyerp.com-20100928215348-v9evn3bbt0f87fse
This commit is contained in:
Fabien Pinckaers 2010-09-28 23:53:48 +02:00
commit 0f8c05a451
25 changed files with 391 additions and 771 deletions

View File

@ -181,7 +181,7 @@
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Balance</para>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
</blockTable>
@ -297,4 +297,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -283,7 +283,7 @@
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="67,264.0,70.0,70.0,80.0" style="Table2" repeatRows="1">
<blockTable colWidths="67,295.0,60.0,60.0,60.0" style="Table2" repeatRows="1">
<tr noRowsplits="1">
<td><para style="P12a">Code</para></td>
<td><para style="P12a">Account</para></td>
@ -294,7 +294,7 @@
<tr>
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
<td><para style="P14"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] </font></para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
</tr>
@ -303,4 +303,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -343,11 +343,11 @@
</tr>
</blockTable>
<section>
<para style="Standard"><font color="white">[[lines(o.id) and removeParentNode('para') or removeParentNode('section') ]]</font></para>
<para style="Standard">[[ repeatIn(lines(o.id),'line')]]</para>
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Detail">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para>
<para style="terp_default_9">[[ line['code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['name'] ]]</para>
@ -365,10 +365,10 @@
</blockTable>
</section>
<section>
<para style="Standard">[[ repeatIn(lines(o.id),'line')]]</para>
<blockTable colWidths="100.0,100.0,73.0,80.0,80.0,80.0" style="Table_Journal_Detail">[[ display_currency(data) or removeParentNode('blockTable') ]]
<para style="Standard"><font color="white">[[lines(o.id) and removeParentNode('para') or removeParentNode('section') ]]</font></para>
<tr>
<td><para style="terp_default_9"><font>[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para></td>
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['debit'] )]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para></td>

View File

@ -245,7 +245,7 @@
<td><para style="P3b">Move</para></td>
<td><para style="P3b">Entry Label</para></td>
<td><para style="P9b">Debit</para></td>
<td><para style="P9b">Crebit</para></td>
<td><para style="P9b">Credit</para></td>
<td><para style="P9b">Balance</para></td>
</tr>
</blockTable>
@ -254,7 +254,7 @@
<blockTable colWidths="66.0,44.0,80.0,60.0,92.5,66.5,64.5,71.5" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td>
<blockTable colWidths="245.0,92.5,66.5,64.5,71.5" style="Table5">
<blockTable colWidths="245.0,92.5,65.5,67.5,68.5" style="Table5">
<tr>
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code or '']] [[ o.name or '']]</para></td>
<td><para style="Standard"></para></td>
@ -305,7 +305,7 @@
<blockTable colWidths="70.0,40.0,60.0,55.0,89.0,58.0,58.0,58.0,58.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<tr>
<td>
<blockTable colWidths="230.00,74.0,55.5,60.5,60.5,65.5" style="Table5">
<blockTable colWidths="230.00,80.0,56.5,57.5,57.5,65.5" style="Table5">
<tr>
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code or '' ]] [[ o.name or '' ]]</para></td>
<td><para style="Standard"></para></td>

View File

@ -262,7 +262,7 @@
<blockTable colWidths="66.0,35.0,120.0,90.0,60.0,200.0,180.0,73.0,73.0,73.0,85.00" style="tbl_content">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
<tr>
<td>
<blockTable colWidths="404.0,335.0,75.0,75.0,75.0,79.00" style="Table5">
<blockTable colWidths="404.0,335.0,79,73.5,72.5,79.00" style="Table5">
<tr>
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para></td>
<td><para style="Standard"></para></td>
@ -323,7 +323,7 @@
<blockTable colWidths="66.0,35.0,166.0,90.0,60.0,280.0,148.0,69.0,72.0,64.0" style="tbl_content">[[data['form']['amount_currency'] == False or removeParentNode('blockTable')]]
<tr>
<td>
<blockTable colWidths="405.0,435.0,69.0,72.0,64.0" style="Table5">
<blockTable colWidths="405.0,435.0,69.0,72.0,63.0" style="Table5">
<tr>
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para></td>
<td><para style="Standard"></para></td>

View File

@ -252,7 +252,7 @@
<td><para style="P10">Entry No</para></td>
<td><para style="P10">A/c No.</para></td>
<td><para style="P10a">Partner</para></td>
<td><para style="P10a">Move - Entry label</para></td>
<td><para style="P10a">Move/Entry label</para></td>
<td><para style="P10b">Debit</para></td>
<td><para style="P10b">Credit</para></td>
<td><para style="P10b">Balance</para></td>
@ -264,8 +264,8 @@
<td><para style="P11"><font color="white"></font></para></td>
<td><para style="P11"><font color="white"></font></para></td>
<td><para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
<td><para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] </u></para></td>
<td> <para style="P12"><u>[[ formatLang((sum_credit(o.period_id.id, o.journal_id.id) - sum_debit(o.period_id.id, o.journal_id.id))) ]] [[ company.currency_id.symbol ]]</u></para></td>
<td><para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
<td><para style="P12"><u>[[ formatLang((sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id))) ]] [[ company.currency_id.symbol ]]</u></para></td>
</tr>
<para style="Standard"><font color="white">[[lines(o.period_id.id, o.journal_id.id) or removeParentNode('story') ]]</font></para>
<tr>
@ -287,7 +287,7 @@
<td><para style="P10">Entry No</para></td>
<td><para style="P10">A/c No.</para></td>
<td><para style="P10a">Partner</para></td>
<td><para style="P10a">Move - Entry label</para></td>
<td><para style="P10a">Move/Entry label</para></td>
<td><para style="P10b">Debit</para></td>
<td><para style="P10b">Credit</para></td>
<td><para style="P10b">Balance</para></td>

View File

@ -234,12 +234,12 @@
<td><para style="P12b">Debit</para></td>
<td><para style="P12b">Credit</para></td>
<td><para style="P12b">Balance</para></td>
<td><para style="P12a">In dispute</para></td>
<td><para style="P12b">In dispute</para></td>
</tr>
<tr>
<td><para style="P7">Total:</para></td>
<td><para style="P8"></para></td>
<td><para style="P8"><u>[[ formatLang(sum_debit()) ]] </u></para></td>
<td><para style="P8"><u>[[ formatLang(sum_debit()) ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang(sum_credit()) ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang((sum_debit()-sum_credit())) ]] [[ company.currency_id.symbol ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang(sum_litige()) ]] [[ company.currency_id.symbol ]]</u></para></td>

View File

@ -104,7 +104,7 @@
<para style="terp_default_8"><font face="Helvetica-Bold">Currency:</font> [[ company.currency_id.name ]]</para>
</td>
<td>
<para style="terp_default_Right_8"><font face="Helvetica">Printed at: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</font> at [[ time.strftime('%H:%M:%S')]]</para>
<para style="terp_default_Right_8"><b>Printed at:</b> [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S')]]</para>
</td>
</tr>
<tr>
@ -186,4 +186,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -32,20 +32,6 @@
id="menu_crm_lead_categ" name="Categories"
parent="base.menu_crm_config_lead" sequence="1"/>
<!-- Resource Type Form View -->
<record id="crm_lead_resource_act" model="ir.actions.act_window">
<field name="name">Lead Sources</field>
<field name="res_model">crm.case.resource.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
<field name="context">{'object_id':'crm.lead'}</field>
</record>
<menuitem action="crm_lead_resource_act"
id="menu_crm_lead_resource_act" name="Lead Sources"
groups="base.group_extended" sequence="2"
parent="base.menu_crm_config_lead" />
<!-- CRM Lead Form View -->
<record model="ir.ui.view" id="crm_case_form_view_leads">

View File

@ -54,8 +54,7 @@ class crm_claim(crm.crm_case, osv.osv):
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
domain="[('section_id','=',section_id)]"),
'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'),
'user_id': fields.many2one('res.users', 'Responsible'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help="Sales team to which Case belongs to."\

View File

@ -1,78 +1,76 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<data noupdate="1">
<!--
Claims Categories
-->
<record model="crm.case.categ" id="categ_claim1">
<field name="name">Factual Claims</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_claim2">
<field name="name">Value Claims</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_claim3">
<field name="name">Policy Claims</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<!--
Case Category2
-->
<record model="crm.case.resource.type" id="type_claim1">
<field name="name">Corrective</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.resource.type" id="type_claim2">
<field name="name">Preventive</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<!--
Case Stage
-->
<record model="crm.case.stage" id="stage_claim1">
<field name="name">Accepted as Claim</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim2">
<field name="name">Fixed</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim3">
<field name="name">Won't fix</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim4">
<field name="name">Invalid</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim5">
<field name="name">Awaiting Response</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
</data>
<!--
Claims Categories
-->
<record model="crm.case.categ" id="categ_claim1">
<field name="name">Factual Claims</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_claim2">
<field name="name">Value Claims</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_claim3">
<field name="name">Policy Claims</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<!--
Case Category2
-->
<record model="crm.case.resource.type" id="type_claim1">
<field name="name">Corrective</field>
<field name="section_id" ref="crm.section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_claim2">
<field name="name">Preventive</field>
<field name="section_id" ref="crm.section_sales_department"/>
</record>
<!--
Case Stage
-->
<record model="crm.case.stage" id="stage_claim1">
<field name="name">Accepted as Claim</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim2">
<field name="name">Fixed</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim3">
<field name="name">Won't fix</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim4">
<field name="name">Invalid</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_claim5">
<field name="name">Awaiting Response</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
</data>
</openerp>

View File

@ -1,129 +1,122 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
<record id="crm_case_claim01" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
<field name="type_id" ref="crm_claim.type_claim1"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Problem with the delivery of goods&quot;" name="name"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(726) 782-0636&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim1"/>
<field name="stage_id" ref="crm_claim.stage_claim1"/>
<field eval="&quot;(769) 703-274&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim02" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
<field name="type_id" ref="crm_claim.type_claim2"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Damaged Products&quot;" name="name"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(392) 895-7917&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim2"/>
<field name="stage_id" ref="crm_claim.stage_claim5"/>
<field eval="&quot;(956) 293-2595&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim03" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_2"/>
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
<field name="type_id" ref="crm_claim.type_claim1"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;Document related problems&quot;" name="name"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(820) 167-3208&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim3"/>
<field name="stage_id" ref="crm_claim.stage_claim2"/>
<field eval="&quot;(079) 681-2139&quot;" name="partner_phone"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
</record>
<record id="crm_case_claim04" model="crm.claim">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
<field name="type_id" ref="crm_claim.type_claim2"/>
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Product quality not maintained&quot;" name="name"/>
<field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(077) 582-4035&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim1"/>
<field name="stage_id" ref="crm_claim.stage_claim5"/>
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim05" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
<field name="type_id" ref="crm_claim.type_claim1"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Some products missing&quot;" name="name"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(333) 715-1450&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim3"/>
<field name="stage_id" ref="crm_claim.stage_claim3"/>
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim06" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_1"/>
<field eval="1" name="active"/>
<field name="type_id" ref="crm_claim.type_claim2"/>
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Problem with the delivery of assignments&quot;" name="name"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(468) 017-2684&quot;" name="partner_mobile"/>
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
<field name="categ_id" ref="crm_claim.categ_claim1"/>
<field name="stage_id" ref="crm_claim.stage_claim4"/>
<field eval="&quot;(373) 907-1009&quot;" name="partner_phone"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
<record id="crm_case_claims07" model="crm.claim">
<field eval="1" name="active"/>
<field name="type_id" ref="crm_claim.type_claim1"/>
<field name="partner_id" ref="base.res_partner_seagate"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Documents unclear&quot;" name="name"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot; (463) 014-1208&quot;" name="partner_mobile"/>
<field eval="time.strftime('%Y-%m-19 13:01:05')" name="date"/>
<field name="categ_id" ref="crm_claim.categ_claim3"/>
<field name="stage_id" ref="crm_claim.stage_claim2"/>
<field eval="&quot;(282) 603-7489&quot;" name="partner_phone"/>
</record>
</data>
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
<record id="crm_case_claim01" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Problem with the delivery of goods&quot;" name="name"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(726) 782-0636&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim1"/>
<field name="stage_id" ref="crm_claim.stage_claim1"/>
<field eval="&quot;(769) 703-274&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim02" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Damaged Products&quot;" name="name"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(392) 895-7917&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim2"/>
<field name="stage_id" ref="crm_claim.stage_claim5"/>
<field eval="&quot;(956) 293-2595&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim03" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_2"/>
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;Document related problems&quot;" name="name"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(820) 167-3208&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim3"/>
<field name="stage_id" ref="crm_claim.stage_claim2"/>
<field eval="&quot;(079) 681-2139&quot;" name="partner_phone"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
</record>
<record id="crm_case_claim04" model="crm.claim">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Product quality not maintained&quot;" name="name"/>
<field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(077) 582-4035&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim1"/>
<field name="stage_id" ref="crm_claim.stage_claim5"/>
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim05" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Some products missing&quot;" name="name"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(333) 715-1450&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm_claim.categ_claim3"/>
<field name="stage_id" ref="crm_claim.stage_claim3"/>
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
</record>
<record id="crm_case_claim06" model="crm.claim">
<field name="partner_address_id" ref="base.res_partner_address_1"/>
<field eval="1" name="active"/>
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Problem with the delivery of assignments&quot;" name="name"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(468) 017-2684&quot;" name="partner_mobile"/>
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
<field name="categ_id" ref="crm_claim.categ_claim1"/>
<field name="stage_id" ref="crm_claim.stage_claim4"/>
<field eval="&quot;(373) 907-1009&quot;" name="partner_phone"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
<record id="crm_case_claims07" model="crm.claim">
<field eval="1" name="active"/>
<field name="partner_id" ref="base.res_partner_seagate"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Documents unclear&quot;" name="name"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot; (463) 014-1208&quot;" name="partner_mobile"/>
<field eval="time.strftime('%Y-%m-19 13:01:05')" name="date"/>
<field name="categ_id" ref="crm_claim.categ_claim3"/>
<field name="stage_id" ref="crm_claim.stage_claim2"/>
<field eval="&quot;(282) 603-7489&quot;" name="partner_phone"/>
</record>
</data>
</openerp>

View File

@ -117,8 +117,7 @@
</group>
<field name="categ_id" select="1" widget="selection"
domain="[('object_id.model', '=', 'crm.claim')]" />
<field name="type_id" string="Type of Action" select="1"
domain="[('object_id.model', '=', 'crm.claim')]" />
<field name="type_action" select="1"/>
<field name="priority"/>
</group>
<separator colspan="4" string="References"/>

View File

@ -71,9 +71,7 @@ class crm_claim_report(osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Priority'),
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'),
'date_closed': fields.date('Closed', readonly=True),
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
}

View File

@ -10,21 +10,21 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Claims">
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="day" invisible="1"/>
<field name="nbr" string="#Claim" sum="#Claim"/>
<field name="delay_close" avg="Avg Closing Delay"/>
<field name="delay_expected"/>
<field name="state" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="priority" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="nbr" string="#Claim" sum="#Claim"/>
<field name="delay_close" avg="Avg Closing Delay"/>
<field name="delay_expected"/>
<field name="state" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="priority" invisible="1"/>
<field name="type_action" invisible="1"/>
</tree>
</field>
</record>
@ -36,11 +36,11 @@
<field name="model">crm.claim.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cases">
<form string="Cases">
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="user_id" select="1"/>
<field name="section_id" select="1"/>
<field name="section_id" select="1"/>
<field name="nbr" select="1"/>
<field name="delay_close"/>
<field name="delay_expected"/>
@ -70,57 +70,57 @@
<!-- CRM Claim Report Search View -->
<record id="view_report_crm_claim_filter" model="ir.ui.view">
<record id="view_report_crm_claim_filter" model="ir.ui.view">
<field name="name">crm.claim.report.select</field>
<field name="model">crm.claim.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search">
<group col="16" colspan="8">
<filter string=" Year " icon="terp-go-year"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Claims created in current year"/>
<filter string=" Year " icon="terp-go-year"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Claims created in current year"/>
<filter string=" Month " icon="terp-go-month" name="This Month"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-%%m-01'))]"
help="Claims created in current month"/>
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-%%m-01'))]"
help="Claims created in current month"/>
<filter icon="terp-go-month" string=" Month-1 " separator="1"
domain="[('create_date','&lt;=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','&gt;',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
help="Claims created in last month"/>
<separator orientation="vertical" />
<separator orientation="vertical" />
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause"
string="Pending"
domain="[('state','=','pending')]"/>
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical" />
<field name="section_id" string="Sales Team"
default="context.get('section_id', False)"
context="{'invisible_section': False}">
<separator orientation="vertical" />
<field name="section_id" string="Sales Team"
default="context.get('section_id', False)"
context="{'invisible_section': False}">
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My team" />
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My team" />
</field>
<field name="company_id">
</field>
<field name="company_id">
<filter icon="terp-go-home"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
help="My company"/>
</field>
<field name="user_id" string="Salesman" select="1">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
<field name="user_id" string="Salesman" select="1">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
@ -136,7 +136,7 @@
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
<separator orientation="vertical"/>
<field name="priority" />
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
<field name="type_action" />
</group>
</group>
<newline/>
@ -157,7 +157,7 @@
<separator orientation="vertical"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]"
context="{'group_by':'type_id'}" />
context="{'group_by':'type_action'}" />
<filter string="State" icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical" />
@ -188,8 +188,8 @@
<field name="name">Claims Analysis</field>
<field name="res_model">crm.claim.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_id" ref="view_report_crm_claim_tree"/>
<field name="search_view_id" ref="view_report_crm_claim_filter"/>

View File

@ -229,7 +229,7 @@ class employees_salary_report(rml_parse.rml_parse):
def get_monthly_total(self):
return self.month_total_list
report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report)
report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report,header=3)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(842.0,595.0)" title="Employees Salary Details" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<template pageSize="(1120.0,770.0)" title="Employees Salary Details" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="28.0" width="786" height="539"/>
<frame id="first" x1="28.0" y1="28.0" width="1064" height="714"/>
</pageTemplate>
</template>
<stylesheet>
@ -10,6 +10,10 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table12">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -111,6 +115,10 @@
<lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/>
</blockTableStyle>
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -129,6 +137,10 @@
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
</blockTableStyle>
<blockTableStyle id="Table10">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -147,6 +159,10 @@
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
</blockTableStyle>
<blockTableStyle id="Table11">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table9">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -172,6 +188,8 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
@ -229,12 +247,21 @@
</stylesheet>
<story>
<para style="terp_default_8">[[ repeatIn(get_employee(data['form']), 'o') ]] [[ get_employee_detail(o) ]]</para>
<para style="terp_header_Centre">Employees Salary Details </para>
<para style="terp_default_Centre_9">For [[ get_fiscalyear(data['form']['fiscalyear_id']) ]]</para>
<para style="terp_default_space">
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,162.0,92.0,161.0,103.0,167.0" style="Table2">
<blockTable colWidths="1063.0" style="Table12">
<tr>
<td>
<para style="P2">Employees Salary Details </para>
<para style="terp_default_Centre_9">For [[ get_fiscalyear(data['form']['fiscalyear_id']) ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_Centre_9">
<font color="white"> </font>
</para>
<blockTable colWidths="135.0,219.0,124.0,218.0,140.0,226.0" style="Table2">
<tr>
<td>
<para style="terp_tblheader_Details">Employee Code</para>
@ -256,7 +283,7 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="100.0,162.0,92.0,161.0,103.0,167.0" style="Table3">
<blockTable colWidths="135.0,219.0,124.0,218.0,140.0,226.0" style="Table3">
<tr>
<td>
<para style="terp_tblheader_Details">Employee Name</para>
@ -278,7 +305,7 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="100.0,162.0,92.0,161.0,103.0,167.0" style="Table5">
<blockTable colWidths="135.0,219.0,124.0,218.0,140.0,226.0" style="Table5">
<tr>
<td>
<para style="terp_tblheader_Details">Designation</para>
@ -305,7 +332,7 @@
</para>
<section>
<para style="terp_default_8">[[ repeatIn(get_periods(data['form']),'m') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,54.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table4">
<blockTable colWidths="100.0,73.0,69.0,74.0,71.0,73.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Title</para>
@ -358,10 +385,16 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_tblheader_Details">Allowances with Basic:</para>
<blockTable colWidths="1063.0" style="Table7">
<tr>
<td>
<para style="P1">Allowances with Basic:</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_9">[[ repeatIn(get_allow(),'e1') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table6">
<blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table6">
<tr>
<td>
<para style="terp_default_9">[[ e1[0] ]]</para>
@ -411,10 +444,16 @@
<font color="white"> </font>
</para>
</section>
<para style="terp_tblheader_Details">Deductions:</para>
<blockTable colWidths="1063.0" style="Table10">
<tr>
<td>
<para style="P1">Deductions:</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_9">[[ repeatIn(get_deduct(),'e2') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table8">
<blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table8">
<tr>
<td>
<para style="terp_default_9">[[ e2[0] ]]</para>
@ -464,10 +503,16 @@
<font color="white"> </font>
</para>
</section>
<para style="terp_tblheader_Details">Others:</para>
<blockTable colWidths="1063.0" style="Table11">
<tr>
<td>
<para style="P1">Others:</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_9">[[ repeatIn(get_other(),'e3') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table9">
<blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table9">
<tr>
<td>
<para style="terp_default_9">[[ e3[0] ]]</para>
@ -524,7 +569,7 @@
<para style="terp_default_1">
<font color="white"> </font>
</para>
<blockTable colWidths="74.0,54.0,50.0,55.0,52.0,55.0,55.0,54.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table1">
<blockTable colWidths="101.0,73.0,68.0,74.0,70.0,74.0,74.0,73.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table1">
<tr>
<td>
<para style="terp_tblheader_Details">[[ get_monthly_total()[0] ]]</para>
@ -581,4 +626,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(842.0,595.0)" title="Yearly Salary Details" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<template pageSize="(1120.0,770.0)" title="Yearly Salary Details" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="28.0" width="786" height="539"/>
<frame id="first" x1="28.0" y1="28.0" width="1064" height="714"/>
</pageTemplate>
</template>
<stylesheet>
@ -124,6 +124,9 @@
<images/>
</stylesheet>
<story>
<para style="terp_header_Centre">
<font color="white"> </font>
</para>
<para style="terp_header_Centre">Yearly Salary Details </para>
<para style="terp_default_Centre_9">For [[ get_fiscalyear(data['form']['fiscalyear_id']) ]]</para>
<para style="terp_default_space">
@ -131,7 +134,7 @@
</para>
<section>
<para style="terp_default_8">[[ repeatIn(get_periods(data['form']),'m') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,54.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table4">
<blockTable colWidths="100.0,73.0,69.0,74.0,71.0,73.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Name</para>
@ -182,7 +185,7 @@
</para>
<section>
<para style="terp_default_9">[[ repeatIn(get_employee(data['form']),'e') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table1">
<blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table1">
<tr>
<td>
<para style="terp_default_9">[[ e[0] ]]</para>
@ -241,7 +244,7 @@
</para>
<section>
<para style="P1">[[ repeatIn(get_months_tol(),'t') ]]</para>
<blockTable colWidths="74.0,54.0,51.0,55.0,52.0,56.0,55.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table6">
<blockTable colWidths="100.0,73.0,69.0,74.0,70.0,75.0,74.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table6">
<tr>
<td>
<para style="terp_tblheader_Details">Total([[company.currency_id.code]])</para>

View File

@ -9,7 +9,7 @@ import mx.DateTime
from mx.DateTime import RelativeDateTime, now, DateTime, localtime
class year_salary_report(rml_parse.rml_parse):
def __init__(self, cr, uid, name, context):
super(year_salary_report, self).__init__(cr, uid, name, context)
self.localcontext.update({
@ -20,21 +20,21 @@ class year_salary_report(rml_parse.rml_parse):
'get_fiscalyear' : self.get_fiscalyear,
'get_total' : self.get_total,
})
self.mnths =[]
self.mnths_tol = []
self.curr_fiscal_year_name=''
self.total=0.0
def get_periods(self,form):
fiscalyear = pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
curr_fiscalyear_id = form['fiscalyear_id']
curr_fiscalyear = fiscalyear.read(self.cr,self.uid,[form['fiscalyear_id']],['date_start','date_stop'])[0]
# Get start year-month-date and end year-month-date
fy = int(curr_fiscalyear['date_start'][0:4])
fy = int(curr_fiscalyear['date_start'][0:4])
ly = int(curr_fiscalyear['date_stop'][0:4])
fm = int(curr_fiscalyear['date_start'][5:7])
lm = int(curr_fiscalyear['date_stop'][5:7])
no_months = (ly-fy)*12+lm-fm + 1
@ -46,7 +46,7 @@ class year_salary_report(rml_parse.rml_parse):
for count in range(0,no_months):
m = datetime.date(cy, cm, 1).strftime('%b')
mnth_name.append(m)
self.mnths.append(str(cm)+'-'+str(cy))
self.mnths.append(str(cm)+'-'+str(cy))
if cm == 12:
cm = 0
cy = ly
@ -57,13 +57,13 @@ class year_salary_report(rml_parse.rml_parse):
fiscalyear_obj = pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
return fiscalyear_obj.read(self.cr,self.uid,[fiscalyear_id],['name'])[0]['name']
def get_employee(self,form):
ls1=[]
ls1=[]
ls = []
periods = []
tol_mnths=['Total',0,0,0,0,0,0,0,0,0,0,0,0]
emp = pooler.get_pool(self.cr.dbname).get('hr.employee')
tol_mnths=['Total',0,0,0,0,0,0,0,0,0,0,0,0]
emp = pooler.get_pool(self.cr.dbname).get('hr.employee')
emp_ids = form['employee_ids']
empll = emp.browse(self.cr,self.uid, emp_ids)
fiscalyear_obj = pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear_id'])
@ -72,7 +72,7 @@ class year_salary_report(rml_parse.rml_parse):
periods.append(period.id)
periods_ids = ','.join(map(str, periods))
cnt = 1
for emp_id in empll:
for emp_id in empll:
ls1.append(emp_id.name)
tol = 0.0
for mnth in self.mnths:
@ -84,30 +84,30 @@ class year_salary_report(rml_parse.rml_parse):
try:
ls1.append(sal[0][0])
except:
ls1.append(0)
try:
ls1.append(0)
try:
tol += sal[0][0]
tol_mnths[cnt] = tol_mnths[cnt] + sal[0][0]
except:
tol += 0
cnt = cnt + 1
cnt = 1
tol += 0
cnt = cnt + 1
cnt = 1
ls1.append(tol)
ls.append(ls1)
ls1 = []
self.mnths_tol.append(tol_mnths)
return ls
def get_months_tol(self):
return self.mnths_tol
def get_total(self):
for item in self.mnths_tol:
for count in range(1,len(item)):
self.total += item[count]
return self.total
report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report)
report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report,header=3)

View File

@ -28,6 +28,7 @@ import tools
import pooler
import re
import sys
from lxml import etree
class rml_parse(report_sxw.rml_parse):
@ -153,7 +154,18 @@ class rml_parse(report_sxw.rml_parse):
def _add_header(self, node, header=1):
if header==2:
rml_head = self.rml_header2
elif header==3:
rml_head = self.rml_header3
else:
rml_head = self.rml_header
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
rml_dom = node
head_dom = etree.XML(rml_head)
for tag in head_dom:
found = rml_dom.find('.//'+tag.tag)
if found is not None and len(found):
if tag.get('position'):
found.append(tag)
else :
found.getparent().replace(found,tag)
return True

View File

@ -1,51 +1,51 @@
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Detail Summary Report
-
In order to test the PDF reports defined on a Point Of Sale,we will print a POS Detail Summary Report
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.details_summary').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-details_summary report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.lines').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.receipt').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt With Reimbursement Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.receipt.with.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt with reimbursement report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a point of sale, we will print a POS Receipt Without Reimbursement Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.pos.receipt.without.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
@ -53,7 +53,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Payment Report Report
-
-
!python {model: ir.ui.menu}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.payment.report.date').create(cr, uid, [1], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [ref('base.user_root')] }}, {})
@ -61,7 +61,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos sales lines report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details Report
-
-
!python {model: ir.ui.menu}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.details').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d') }}, {})
@ -69,7 +69,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos details report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a Account Statement Report
-
-
!python {model: account.bank.statement}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.account.statement').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
@ -77,7 +77,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-account_statement_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS User Product Report
-
-
!python {model: account.bank.statement}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.user.product').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
@ -85,7 +85,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-user_product_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS All Close Cashbox Of the Day Report
-
-
!python {model: account.bank.statement}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.all.closed.cashbox.of.the.day').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
@ -93,7 +93,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-all_closed_cash_box_of_the_day_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os, time
data_dict = {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'),'user_id':[ref('base.user_root')] }}
@ -102,7 +102,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_user_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Today Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os, time
data_dict = {'model':'ir.ui.menu', 'form':{'user_id':[ref('base.user_root')] }}
@ -111,7 +111,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_user_today_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.payment.report').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
@ -119,7 +119,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment User Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os, time
data_dict = {'model':'ir.ui.menu', 'form':{'user_id':[ref('base.user_root'),ref('base.user_demo')] }}
@ -128,7 +128,7 @@
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_user_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Today's Sales of Current User Report
-
-
!python {model: pos.order}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.sales.user.today.current.user').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})

View File

@ -19,7 +19,6 @@
#
##############################################################################
import sale_prepare_allot
import sale_order
import sale_report

View File

@ -1,47 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
class sale_prepare(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context=None):
super(sale_prepare, self).__init__(cr, uid, name, context=context)
self.localcontext.update( {
'allotment': self._allotment,
})
def _allotment(self, object):
allotments = {}
for line in object.order_line:
if line.address_allotment_id:
allotments.setdefault(line.address_allotment_id.id, ([line.address_allotment_id],[]) )
else:
allotments.setdefault(line.address_allotment_id.id, ([],[]) )
allotments[line.address_allotment_id.id][1].append(line)
return allotments.values()
report_sxw.report_sxw('report.sale.order.prepare.allot', 'sale.order', 'addons/sale/report/sale_prepare_allot.rml',parser=sale_prepare)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,357 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Prepare allot" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#808080" start="0,0" stop="0,0"/>
<blockBackground colorName="#808080" start="1,0" stop="1,0"/>
<blockBackground colorName="#808080" start="2,0" stop="2,0"/>
<blockBackground colorName="#808080" start="3,0" stop="3,0"/>
<blockBackground colorName="#808080" start="4,0" stop="4,0"/>
<blockBackground colorName="#808080" start="5,0" stop="5,0"/>
<blockBackground colorName="#808080" start="6,0" stop="6,0"/>
<blockBackground colorName="#808080" start="7,0" stop="7,0"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#cccccc" start="0,0" stop="0,0"/>
<blockBackground colorName="#cccccc" start="1,0" stop="1,0"/>
<blockBackground colorName="#cccccc" start="2,0" stop="2,0"/>
<blockBackground colorName="#cccccc" start="3,0" stop="3,0"/>
<blockBackground colorName="#cccccc" start="4,0" stop="4,0"/>
<blockBackground colorName="#cccccc" start="5,0" stop="5,0"/>
<blockBackground colorName="#cccccc" start="6,0" stop="6,0"/>
<blockBackground colorName="#cccccc" start="7,0" stop="7,0"/>
</blockTableStyle>
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="25.0" leading="31" alignment="CENTER"/>
<paraStyle name="P5" fontName="Times-Roman"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="10.0" leading="13"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="10.0" leading="13"/>
<paraStyle name="P8" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P9" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P10" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER"/>
<paraStyle name="P15" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
<paraStyle name="P16" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P17" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
<paraStyle name="P18" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P19" fontName="Times-Roman"/>
<paraStyle name="P20" fontName="Times-Roman" fontSize="9.0" leading="11"/>
<paraStyle name="P21" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P22" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="P23" fontName="Times-Roman" fontSize="10.0" leading="13"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
</stylesheet>
<story>
<para style="P1">[[ repeatIn(objects, 'o') ]]</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P3">Sale Order [[ o.name ]]</para>
<para style="P4">[[ o.state!='done' and 'draft' or '' ]]</para>
<para style="P2">
<font color="white"> </font>
</para>
<blockTable colWidths="241.0,241.0" repeatRows="1" style="Table1">
<tr>
<td>
<para style="P5">Shipping to</para>
<para style="P6">[[ o.partner_shipping_id.partner_id.name ]]</para>
<para style="P7">[[ o.partner_shipping_id.street ]]</para>
<para style="P7">[[ o.partner_shipping_id.zip ]] [[ o.partner_shipping_id.city ]]</para>
</td>
<td>
<para style="P5">Ordered by</para>
<para style="P6">[[ o.partner_order_id.partner_id.name ]]</para>
<para style="P7">[[ o.partner_order_id.street ]]</para>
<para style="P7">[[ o.partner_order_id.zip ]] [[ o.partner_order_id.city ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="98.0,88.0,90.0,101.0,106.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P8">Order ref.</para>
</td>
<td>
<para style="P9">Order date</para>
</td>
<td>
<para style="P9">Shipping date </para>
</td>
<td>
<para style="P9">Delivery date 1</para>
</td>
<td>
<para style="P9">Delivery date 2</para>
</td>
</tr>
<tr>
<td>
<para style="P10">[[ o.name ]]</para>
</td>
<td>
<para style="P10">[[ o.date_order ]]</para>
</td>
<td>
<para style="P10">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P11">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P11">[[reduce(lambda x, line: line.date_planned&gt;x and line.date_planned or x, o.order_line, '')]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="79.0,160.0,35.0,55.0,33.0,44.0,45.0,32.0" repeatRows="1" style="Table3">
<tr>
<td>
<para style="P12">Reference</para>
</td>
<td>
<para style="P12">Designation</para>
</td>
<td>
<para style="P12">Package</para>
</td>
<td>
<para style="P12">Quantity</para>
</td>
<td>
<para style="P12">S.U.</para>
</td>
<td>
<para style="P12">Prepared Package</para>
</td>
<td>
<para style="P12">Prepared quantity</para>
</td>
<td>
<para style="P12">Batch</para>
</td>
</tr>
</blockTable>
<section>
<para style="Text body">[[ repeatIn(o.order_line, 'line') ]]</para>
<blockTable colWidths="78.0,160.0,36.0,54.0,34.0,44.0,45.0,31.0" style="Table4">
<tr>
<td>
<para style="P13">[[line.product_id.code]]</para>
</td>
<td>
<para style="P13">[[line.product_id.name]]</para>
<para style="P13">
<font color="white"> </font>
</para>
<para style="P14">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P15">[[line.number_packages]]</para>
</td>
<td>
<para style="P15">[[line.product_uom_qty]]</para>
</td>
<td>
<para style="P13">[[line.product_uom.name]]</para>
</td>
<td>
<para style="P13">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P13">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P13">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16">[[line.product_id.ean13]]</para>
</td>
<td>
<para style="P16">Logistical unit : [[line.product_packaging.qty]]</para>
<para style="P16">[[line.number_packages and 'Packaging : %d package of %d P' % (line.number_packages, line.product_packaging.qty) or '']]</para>
</td>
<td>
<para style="P17">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P17">[[line.product_uos_qty]]</para>
</td>
<td>
<para style="P18">[[line.product_uos and line.product_uos.name or '']]</para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
<para style="P16">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
</section>
<para style="P19">
<font color="white"> </font>
</para>
<blockTable colWidths="78.0,160.0,37.0,54.0,33.0,46.0,44.0,31.0" style="Table7">
<tr>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">Number of packages</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P21">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P22">[[ reduce(lambda x, line: x+ len(line.move_lines), o.picking_ids, 0)]]</para>
</td>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" repeatRows="1" style="Table6">
<tr>
<td>
<para style="P19">Invoiced to : <font face="Times-Roman" size="10.0">[[ o.partner_invoice_id.partner_id.name ]]</font></para>
</td>
</tr>
</blockTable>
<para style="P23">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,16 +1,8 @@
-
In order to test the PDF reports defined on a sale order, we will print a sale order
-
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a sale order, we will print a report for sale prepare allot
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order.prepare.allot').create(cr, uid, [ref('sale.order'),ref('sale.order2'),ref('sale.order3')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale-sale_prepare_allot.'+format), 'wb+').write(data)