[MERGE] merge from trunk addons

bzr revid: mra@mra-laptop-20100929042818-26m2e5todwdnsj6d
This commit is contained in:
Mustufa Rangwala
2010-09-29 09:58:18 +05:30
41 changed files with 501 additions and 878 deletions
@@ -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>
+3 -3
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>
@@ -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>
@@ -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>
@@ -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>
+4 -4
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>
@@ -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>
@@ -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>
+1 -1
View File
@@ -179,7 +179,7 @@ class crm_case(object):
if not stage_record.section_id:
section_id = False # only select stages without section
domain = [('object_id.model', '=', self._name), ('section_id', '=', section_id)]
domain = [('object_id.model', '=', self._name), '|', ('section_id', '=', section_id),('section_id','=',False)]
if 'force_domain' in context and context['force_domain']:
domain += context['force_domain']
sid = stage_obj.search(cr, uid, domain, context=context)
+1 -1
View File
@@ -10,7 +10,7 @@
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="context">{"search_default_user_id":uid,'search_default_current':1}</field>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
<field name="context">{'search_default_current':1, 'default_type': 'lead'}</field>
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id':section_id}</field>
<field name="help">A lead is a first, unqualified, contact with a new prospect. Use leads when you import a database of prospects or integrate your website's contact form with OpenERP. After having been qualified, the lead can be converted to a partner and a business opportunity for a further detailed tracking of the related activities.</field>
</record>
+1 -15
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">
@@ -70,7 +56,7 @@
<field name="section_id" widget="selection" />
<field name="user_id" />
<field name="stage_id"
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
domain="[('section_id','=',section_id), ('section_id','=',False), ('object_id.model', '=', 'crm.lead')]" />
<group col="2" colspan="1">
<button name="stage_previous" string="Previous"
states="open,pending,draft" type="object"
+1 -1
View File
@@ -28,7 +28,7 @@
<field name="res_model">crm.lead</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'default_type': 'opportunity'}</field>
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'search_default_section_id':section_id,'default_type': 'opportunity'}</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help">Opportunities allows you to track your best deals pipeline: history of
+1 -1
View File
@@ -15,7 +15,7 @@
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
domain="['|',('section_id','=',section_id),('section_id','=',False),('object_id.model', '=', 'crm.lead')]" />
<button name="stage_previous"
states="open,pending" type="object"
icon="gtk-go-back" string="" />
+2 -2
View File
@@ -62,13 +62,13 @@ class crm_phonecall(crm_case, osv.osv):
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
domain="['|',('section_id','=',section_id),('section_id','=',False),\
('object_id.model', '=', 'crm.phonecall')]"),
'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields
'duration': fields.float('Duration', help="Duration in Minutes"),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
domain="['|',('section_id','=',section_id),('section_id','=',False),\
('object_id.model', '=', 'crm.phonecall')]"),
'partner_phone': fields.char('Phone', size=32),
'partner_contact': fields.related('partner_address_id', 'name', \
+2 -2
View File
@@ -32,7 +32,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="context">{"search_default_user_id":uid}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id':section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
@@ -106,7 +106,7 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="domain" eval="'[(\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
<field name="context" eval="'{\'default_state\':\'open\', \'search_default_current\':1, \'default_categ_id\': ' + str(ref('categ_phone2')) +'}'"/>
<field name="context" eval="'{\'search_default_section_id\':section_id, \'default_state\':\'open\', \'search_default_current\':1, \'default_categ_id\': ' + str(ref('categ_phone2')) +'}'"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
<field name="help">The Outbound menu open a search view in editable mode, so you can easily modify or plan a new call. Actions buttons allows you to to make you call status evolved for a better follow up of your planned calls. During calls, convert your lead into an opportunity, plan a meeting or canceled it.</field>
</record>
+2 -2
View File
@@ -100,9 +100,9 @@ class crm_lead_report(osv.osv):
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id)]" , readonly=True),
domain="['|',('section_id','=',False),('section_id','=',section_id)]" , readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
domain="['|',('section_id','=',False),('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]", readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'opening_date': fields.date('Opening Date', readonly=True),
@@ -34,7 +34,7 @@ class crm_opportunity2phonecall(osv.osv_memory):
'date': fields.datetime('Date' , required=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'categ_id': fields.many2one('crm.case.categ', 'Category', required=True, \
domain="[('section_id','=',section_id),\
domain="['|',('section_id','=',False),('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]"),
}
@@ -103,7 +103,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
'name' : fields.char('Call summary', size=64, required=True, select=1),
'user_id' : fields.many2one('res.users',"Assign To"),
'categ_id': fields.many2one('crm.case.categ', 'Category', required=True, \
domain="[('section_id','=',section_id),\
domain="['|',('section_id','=',False),('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]"),
'date': fields.datetime('Date', required=True),
'section_id':fields.many2one('crm.case.section','Sales Team'),
+1 -2
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."\
+72 -74
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>
+119 -126
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>
+1 -2
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"/>
+3 -5
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"),
}
@@ -102,7 +100,7 @@ class crm_claim_report(osv.osv):
c.categ_id,
count(*) as nbr,
c.priority as priority,
c.type_id as type_id,
c.type_action as type_action,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected
@@ -111,7 +109,7 @@ class crm_claim_report(osv.osv):
group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),to_char(c.date, 'YYYY-MM-DD'),\
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,
c.priority,c.type_id,c.date_deadline,c.date_closed
c.priority,c.type_action,c.date_deadline,c.date_closed
)""")
crm_claim_report()
@@ -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"/>
+4 -1
View File
@@ -78,7 +78,10 @@
</record>
<menuitem id="menu_hr_time_tracking" name="Time Tracking" parent="hr.menu_hr_root" sequence="3"/>
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_time_tracking" groups="base.group_hr_manager,base.group_hr_user,base.group_hr_attendance,base.group_system,base.group_user" sequence="3"/>
<menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root" sequence="4"/>
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_attendance" groups="base.group_hr_user" sequence="3"/>
<record id="edit_attendance_reason" model="ir.ui.view">
<field name="name">hr.action.reason.form</field>
@@ -47,7 +47,7 @@
</record>
<menuitem action="action_hr_attendance_sigh_in_out" id="menu_hr_attendance_sigh_in_out"
parent="menu_hr_time_tracking" sequence="4" groups="base.group_hr_manager,base.group_hr_user,base.group_hr_attendance"/>
parent="menu_hr_attendance" sequence="4" groups="base.group_hr_manager,base.group_hr_user,base.group_hr_attendance"/>
<record id="view_hr_attendance_so_ask" model="ir.ui.view">
<field name="name">hr.sign.in.out.ask.form</field>
@@ -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:
@@ -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>
@@ -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>
+24 -24
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)
+12
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
+39 -36
View File
@@ -1,47 +1,50 @@
<?xml version="1.0"?>
<openerp>
<data>
<data>
######################## JOB OPPORTUNITIES (menu) ###########################
<record model="ir.actions.act_window" id="crm_case_categ0_act_job">
<field name="name">Applicants</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="view_id" ref="crm_case_tree_view_job"/>
<field name="context">{"search_default_user_id":uid, 'search_default_current': 1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
</record>
######################## JOB OPPORTUNITIES (menu) ###########################
<record model="ir.actions.act_window" id="crm_case_categ0_act_job">
<field name="name">Applicants</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="view_id" ref="crm_case_tree_view_job"/>
<field name="context">{"search_default_user_id":uid, 'search_default_current': 1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_sec_tree_view_act_job">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_job"/>
<field name="act_window_id" ref="crm_case_categ0_act_job"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_sec_tree_view_act_job">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_job"/>
<field name="act_window_id" ref="crm_case_categ0_act_job"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_sec_form_view_act_job">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_job"/>
<field name="act_window_id" ref="crm_case_categ0_act_job"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_sec_form_view_act_job">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_job"/>
<field name="act_window_id" ref="crm_case_categ0_act_job"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_sec_graph_view_act_job">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_job"/>
<field name="act_window_id" ref="crm_case_categ0_act_job"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_sec_graph_view_act_job">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_job"/>
<field name="act_window_id" ref="crm_case_categ0_act_job"/>
</record>
<menuitem
name="Recruitment"
id="base.menu_crm_case_job_req_main"
parent="hr.menu_hr_root"
sequence="1"/>
<menuitem
name="Recruitment"
id="base.menu_crm_case_job_req_main"
parent="hr.menu_hr_root"
sequence="1"/>
<!-- ALL JOBS REQUESTS -->
<!-- ALL JOBS REQUESTS -->
<menuitem name="Applicants" parent="base.menu_crm_case_job_req_main" id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/>
<menuitem
name="Applicants"
parent="base.menu_crm_case_job_req_main"
id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/>
</data>
</data>
</openerp>
@@ -61,8 +61,6 @@
<field name="state"/>
<button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_close" string="Hired" states="open,draft,pending" type="object" icon="terp-partner"/>
<button name="case_cancel" string="Refused" states="draft,open,pending" type="object" icon="gtk-cancel"/>
</tree>
</field>
</record>
@@ -77,8 +75,8 @@
<field name="name" string="Subject"/>
<field name="partner_name"/>
<field name="job_id" on_change="onchange_job(job_id)"/>
<button string="Schedule a Phone Call" name="%(action_hr_recruitment_phonecall)d" icon="terp-call-start" type="action" groups="base.group_extended"/>
<button name="action_makeMeeting" type="object" string="Schedule Meeting" icon="gtk-index"/>
<button string="Phone Call" name="%(action_hr_recruitment_phonecall)d" icon="terp-call-start" type="action" groups="base.group_extended"/>
<button name="action_makeMeeting" type="object" string="Meeting" icon="gtk-index"/>
<newline/>
<field name="department_id" widget="selection"/>
<group colspan="2" col="4">
@@ -87,11 +85,11 @@
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<field name="user_id"/>
<button name="action_print_survey" string="Print Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}" groups="base.group_extended"/>
<button name="action_print_survey" string="Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}" groups="base.group_extended"/>
<newline/>
<field name="date_action"/>
<field name="title_action"/>
<field name="date_action"/>
<field name="title_action"/>
</group>
<notebook colspan="4">
<page string="Job Info">
@@ -1,47 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_hr_timesheet_sign_in_message" model="ir.ui.view">
<record id="view_hr_timesheet_sign_in_message" model="ir.ui.view">
<field name="name">hr.sign.in.project.message.form</field>
<field name="model">hr.sign.in.project</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sign In/Out By Project">
<group colspan="4" >
<separator string="This Wizard will make Sign In/Out By Project" colspan="4"/>
</group>
<group colspan="4" >
<separator string="This Wizard will make Sign In/Out By Project" colspan="4"/>
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Sign in / Sign out" name="check_state" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Sign in / Sign out" name="check_state" type="object"/>
</group>
</form>
</field>
</record>
<record id="view_hr_timesheet_sign_in" model="ir.ui.view">
<record id="view_hr_timesheet_sign_in" model="ir.ui.view">
<field name="name">hr.sign.in.project.form</field>
<field name="model">hr.sign.in.project</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sign In/Out By Project">
<group colspan="4" >
<separator string="Sign in" colspan="4"/>
<field name="name" readonly="True" />
<field name="state" readonly="True" />
<field name="server_date"/>
<label string="(local time on the server side)" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current time)" colspan="2"/>
</group>
<group colspan="4" >
<separator string="Sign in" colspan="4"/>
<field name="name" readonly="True" />
<field name="state" readonly="True" />
<field name="server_date"/>
<label string="(local time on the server side)" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current time)" colspan="2"/>
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Start Working" name="sign_in_result" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Start Working" name="sign_in_result" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_hr_timesheet_sign_in" model="ir.actions.act_window">
<record id="action_hr_timesheet_sign_in" model="ir.actions.act_window">
<field name="name">Sign in / Sign out by project</field>
<field name="res_model">hr.sign.in.project</field>
<field name="view_type">form</field>
@@ -52,41 +52,41 @@
</record>
<menuitem action="action_hr_timesheet_sign_in"
id="menu_hr_timesheet_sign_in"
groups="base.group_extended"
parent="hr_attendance.menu_hr_time_tracking"
sequence="5" />
id="menu_hr_timesheet_sign_in"
groups="base.group_extended"
parent="hr_attendance.menu_hr_attendance"
sequence="5" />
<record id="view_hr_timesheet_sign_out" model="ir.ui.view">
<record id="view_hr_timesheet_sign_out" model="ir.ui.view">
<field name="name">hr.sign.out.project.form</field>
<field name="model">hr.sign.out.project</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sign In/Out By Project">
<group colspan="4" >
<separator string="General Information" colspan="4" />
<field name="name" readonly="True" />
<field name="state" readonly="True" />
<field name="date_start"/>
<field name="server_date"/>
<separator string="Work done in the last period" colspan="4" />
<field name="account_id" colspan="2"/>
<field name="info" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current_time)" colspan="2"/>
<field name="analytic_amount"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" >
<separator string="General Information" colspan="4" />
<field name="name" readonly="True" />
<field name="state" readonly="True" />
<field name="date_start"/>
<field name="server_date"/>
<separator string="Work done in the last period" colspan="4" />
<field name="account_id" colspan="2"/>
<field name="info" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current_time)" colspan="2"/>
<field name="analytic_amount"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Change Work" name="sign_out_result" type="object"/>
<button icon="gtk-ok" string="Stop Working" name="sign_out_result_end" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Change Work" name="sign_out_result" type="object"/>
<button icon="gtk-ok" string="Stop Working" name="sign_out_result_end" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_hr_timesheet_sign_out" model="ir.actions.act_window">
<record id="action_hr_timesheet_sign_out" model="ir.actions.act_window">
<field name="name">Sign in / Sign out by project</field>
<field name="res_model">hr.sign.out.project</field>
<field name="view_type">form</field>
+22 -22
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')], {}, {})
+1 -1
View File
@@ -4,7 +4,7 @@
<menuitem id="base.menu_sale_config_sales" name="Sales"
parent="base.menu_base_config" sequence="0" groups="base.group_extended"/>
<menuitem groups="base.group_extended" id="menu_product_pricelist_main" name="Pricelists" parent="base.menu_sale_config_sales" sequence="50"/>
<menuitem groups="base.group_extended" id="menu_product_pricelist_main" name="Pricelists" parent="base.menu_base_config" sequence="50"/>
<record id="product_pricelist_version_form_view" model="ir.ui.view">
<field name="name">product.pricelist.version.form</field>
+2 -3
View File
@@ -224,8 +224,8 @@
<filter string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-camera_test"/>
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Issues" icon="terp-gtk-media-pause"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string=" Today " separator="1" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's bugs" />
<filter icon="terp-go-week" string=" 7 Days " separator="1"
<filter icon="terp-go-today" string="Today" separator="1" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's bugs" />
<filter icon="terp-go-week" string="7 Days" separator="1"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date', '&gt;=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Bugs during last 7 days"
/>
@@ -233,7 +233,6 @@
<field name="name" string="Name"/>
<field name="user_id"/>
<field name="project_id" string="Project"/>
<field name="state"/>
<field name="categ_id"/>
</group>
<newline/>
-1
View File
@@ -19,7 +19,6 @@
#
##############################################################################
import sale_prepare_allot
import sale_order
import sale_report
-47
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:
-357
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>
+1 -9
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)