[MERGE]with lp:~openerp-dev/openobject-addons/trunk-dev-addons1

bzr revid: jam@tinyerp.com-20101230054902-ud9hp94d1ad9nrim
This commit is contained in:
jam-openerp
2010-12-30 11:19:02 +05:30
115 changed files with 1634 additions and 6068 deletions
+3 -1
View File
@@ -133,7 +133,9 @@ module named account_voucher.
'test/account_bank_statement.yml',
'test/account_cash_statement.yml',
'test/account_report.yml',
],
],
'installable': True,
'active': False,
'certificate': '0080331923549',
+1 -1
View File
@@ -24,7 +24,7 @@
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<group colspan="4" width="600">
<field name="charts"/>
<group colspan="4" groups="base.group_extended">
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
-1
View File
@@ -6,7 +6,6 @@
groups="group_account_user,group_account_manager,group_account_invoice"
web_icon="images/accounting.png"
web_icon_hover="images/accounting-hover.png"/>
<menuitem id="menu_partners" name="Partners" parent="menu_finance" sequence="1"/>
<menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="2"/>
<menuitem id="menu_finance_payables" name="Suppliers" parent="menu_finance" sequence="3"/>
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="4"
+7 -5
View File
@@ -2762,11 +2762,13 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
<field name="filter" eval="True"/>
</record>
<menuitem id="menu_partners_partners"
name="Partners"
parent="menu_partners"
action="action_partner_all"
sequence="1"/>
<menuitem id="menu_account_customer" name="Customers"
parent="menu_finance_receivables"
action="base.action_partner_customer_form" sequence="100"/>
<menuitem id="menu_account_supplier" name="Suppliers"
parent="menu_finance_payables"
action="base.action_partner_supplier_form" sequence="100"/>
</data>
</openerp>
@@ -253,13 +253,13 @@
</tr>
<tr>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] </font></para>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] </font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]]</font></para>
</td>
</tr>
</blockTable>
@@ -205,13 +205,15 @@
<para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]]</font></para>
</td>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines(), 'a') ]]</font> <font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code'] ]]</font></para>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines(), 'a') ]]</font> <font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]]</font></para>
<para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font>
<font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]]</font>
<font> [[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]]</font></para>
</td>
</tr>
</blockTable>
@@ -233,7 +233,7 @@
<td><para style="terp_header"><font color="white"> </font></para></td>
</tr>
</blockTable>
<blockTable colWidths="90.0,80.0,100.0,130.0,100.0" style="Table2">
<blockTable colWidths="130.0,80.0,100.0,130.0,100.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
@@ -274,7 +274,7 @@
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="50.0,260.0,80.0,80.0,80.0" style="Table_Account_detail_Title">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable colWidths="50.0,240.0,85.0,85.0,90.0" style="Table_Account_detail_Title">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details">A/C No.</para></td>
<td><para style="terp_tblheader_Details">Account Name</para></td>
@@ -293,7 +293,7 @@
<td><para style="terp_tblheader_Details_Right">Currency</para></td>
</tr>
</blockTable>
<blockTable colWidths="50.0,260.0,80.0,80.0,80.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable colWidths="50.0,240.0,85.0,85.0,90.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_default_Bold_9">Total:</para></td>
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
@@ -314,7 +314,7 @@
</blockTable>
<section>
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para>
<blockTable colWidths="50.0,260.0,80.0,80.0,80.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable colWidths="50.0,240.0,85.0,85.0,90.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
@@ -263,11 +263,11 @@
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_7" fontName="Helvetica-Bold" fontSize="7.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_7_Right" fontName="Helvetica-Bold" fontSize="7.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<images/>
</stylesheet>
@@ -313,7 +313,7 @@
<para style="terp_tblheader_Details_Right">Currency</para>
</td>
</tr>
</blockTable>
</blockTable>
<blockTable colWidths="45.0,35.0,30.0,105.0,80.0,55.0,130.0,95.0,65.0,65.0,75.0" style="Table10">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td>
@@ -496,19 +496,19 @@
<blockTable rowHeights="0.55cm" colWidths="490.0,65.0,65.0,75.0,75.0" style="Table8">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
<tr>
<td>
<para style="terp_default_Bold_8"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
<para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</para>
<para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</para>
</td>
</tr>
</blockTable>
@@ -526,7 +526,7 @@
<para style="terp_default_7">[[ line['lcode'] ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['partner_name'],21) ]]</para>
<para style="terp_default_7">[[ strip_name(line['partner_name'],20) ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['lref'],17) ]]</para>
@@ -535,7 +535,7 @@
<para style="terp_default_7">[[ line['move'] ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['lname'],26) ]]</para>
<para style="terp_default_7">[[ strip_name(line['lname'],22) ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['line_corresp'],18) ]]</para>
@@ -598,16 +598,16 @@
<blockTable rowHeights="0.55cm" colWidths="575.0,65.0,65.0,75.0" style="Table11">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_default_Bold_8"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
<para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
@@ -625,7 +625,7 @@
<para style="terp_default_7">[[ line['lcode'] ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['partner_name'],25) ]]</para>
<para style="terp_default_7">[[ strip_name(line['partner_name'],24) ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['lref'],21) ]]</para>
@@ -634,7 +634,7 @@
<para style="terp_default_7">[[ line['move'] ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['lname'],35) ]]</para>
<para style="terp_default_7">[[ strip_name(line['lname'],28) ]]</para>
</td>
<td>
<para style="terp_default_7">[[ strip_name(line['line_corresp'],23) ]]</para>
+5 -5
View File
@@ -229,7 +229,7 @@
<para style="P9">
<font color="white"> </font>
</para>
<blockTable rowHeights="0.55cm" colWidths="40.0,75.0,50.0,50.0,72.0,131.0,68.0,68.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="45.0,55.0,55.0,50.0,80.0,120.0,70.0,70.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td><para style="P10a">Date</para></td>
<td><para style="P10a">Ref</para></td>
@@ -256,14 +256,14 @@
<td><para style="terp_default_8">[[ strip_name(line.ref,20) ]]</para></td>
<td><para style="terp_default_8">[[ line.move_id.name &lt;&gt; '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]]</para></td>
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,16) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,35) ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,17) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,27) ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>
</tr>
</blockTable>
<blockTable rowHeights="0.55cm" colWidths="40.0,75.0,50.0,50.0,72.0,66.0,68.0,68.0,68.0" style="Table1" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="45.0,50.0,52.0,50.0,70.0,80.0,70.0,70.0,70.0" style="Table1" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
<tr>
<td><para style="P10a">Date</para></td>
<td><para style="P10a">Ref</para></td>
@@ -293,7 +293,7 @@
<td><para style="terp_default_8">[[ strip_name(line.ref,20) ]]</para></td>
<td><para style="terp_default_8">[[ line.move_id.name &lt;&gt; '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]]</para></td>
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,16) ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,15) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,17) ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>
@@ -262,11 +262,11 @@
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<images/>
@@ -274,67 +274,65 @@
<story>
<pto>
<pto_header>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8">
[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Currency</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table8">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Currency</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_default_8">[[ repeatIn(objects, 'p') ]]</para>
<para style="terp_default_8">[[ setLang(p.lang) ]]</para>
@@ -439,7 +437,7 @@
<para style="terp_default_2">
<font face="Helvetica" color="white">[[ display_currency(data) == False or removeParentNode('section') ]]</font>
</para>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2">
<blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
@@ -490,47 +488,47 @@
<blockTable rowHeights="0.55cm" colWidths="332.0,64.0,64.0,79.0" style="Table5">
<tr>
<td>
<para style="terp_default_9">Initial Balance</para>
<para style="terp_default_8">Initial Balance</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
<section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table6">
<blockTable rowHeights="0.55cm" colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table6">
<tr>
<td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
<para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['code'] ]]</para>
<para style="terp_default_8">[[ line['code'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para>
<para style="terp_default_8">[[ line['move_name'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para>
<para style="terp_default_8">[[ line['a_code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
<para style="terp_default_8">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
@@ -540,7 +538,7 @@
<para style="terp_default_2">
<font face="Helvetica" color="white">[[ display_currency(data) == True or removeParentNode('section') ]]</font>
</para>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8">
<blockTable colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table8">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
@@ -571,7 +569,7 @@
</td>
</tr>
</blockTable>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table12">
<blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table12">
<tr>
<td>
<para style="terp_default_Bold_9">[[ p.ref ]] - [[ p.name ]]</para>
@@ -594,7 +592,7 @@
</blockTable>
<section>
<para style="terp_default_2"><font color="white">[[ data['form']['initial_balance']==True or removeParentNode('section') ]]</font></para>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table13">
<blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table13">
<tr>
<td>
<para style="terp_default_9">Initial Balance</para>
@@ -618,35 +616,35 @@
</section>
<section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table14">
<blockTable rowHeights="0.55cm" colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table14">
<tr>
<td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
<para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['code'] ]]</para>
<para style="terp_default_8">[[ line['code'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para>
<para style="terp_default_8">[[ line['move_name'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para>
<para style="terp_default_8">[[ line['a_code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ strip_name(line['ref'],5) ]] - [[ strip_name(line['name'],5) ]]</para>
<para style="terp_default_8">[[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="8.0">[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font>
<font>[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font>
</para>
</td>
</tr>
@@ -655,4 +653,4 @@
</section>
</pto>
</story>
</document>
</document>
@@ -262,11 +262,11 @@
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<images/>
@@ -274,67 +274,67 @@
<story>
<pto>
<pto_header>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8">
[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Currency</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="50.0,30.0,60.0,50.0,70.0,64.0,64.0,79.0,70.0" style="Table8">
[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">JNRL</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Account</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Currency</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_default_8">
@@ -434,7 +434,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2">
<blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
@@ -493,53 +493,53 @@
<blockTable rowHeights="0.55cm" colWidths="332.0,64.0,64.0,79.0" style="Table5">
<tr>
<td>
<para style="terp_default_9">Initial Balance</para>
<para style="terp_default_8">Initial Balance</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
<section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table6">
<blockTable rowHeights="0.55cm" colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table6">
<tr>
<td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
<para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['code'] ]]</para>
<para style="terp_default_8">[[ line['code'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para>
<para style="terp_default_8">[[ line['move_name'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para>
<para style="terp_default_8">[[ line['a_code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
<para style="terp_default_8">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
</section>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8">
<blockTable colWidths="50.0,30.0,60.0,50.0,70.0,64.0,64.0,79.0,70.0" style="Table8">
[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
@@ -578,7 +578,7 @@
<font face="Helvetica" color="white">[[ display_currency(data) == True or removeParentNode('section') ]]</font>
</para>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table12">
<blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table12">
<tr>
<td>
<para style="terp_default_Bold_9">[[ p.ref ]] - [[ p.name ]]</para>
@@ -601,22 +601,22 @@
</blockTable>
<section>
<para style="terp_default_2"><font color="white">[[ data['form']['initial_balance']==True or removeParentNode('section') ]]</font></para>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table13">
<blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table13">
<tr>
<td>
<para style="terp_default_9">Initial Balance</para>
<para style="terp_default_8">Initial Balance</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Right_9">
<para style="terp_default_Right_8">
<font color="white"> </font>
</para>
</td>
@@ -625,35 +625,35 @@
</section>
<section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table14">
<blockTable rowHeights="0.55cm" colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table14">
<tr>
<td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
<para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['code'] ]]</para>
<para style="terp_default_8">[[ line['code'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para>
<para style="terp_default_8">[[ line['move_name'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para>
<para style="terp_default_8">[[ line['a_code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ strip_name(line['ref'],5) ]] - [[ strip_name(line['name'],5) ]]</para>
<para style="terp_default_8">[[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="8.0">[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font>
<font>[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font>
</para>
</td>
</tr>
@@ -662,4 +662,4 @@
</section>
</pto>
</story>
</document>
</document>
+29 -15
View File
@@ -27,6 +27,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/>
@@ -41,6 +45,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
@@ -178,20 +186,23 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="177.0,177.0,177.0" style="Table_Invoice_General_Header">
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Document</para>
<para style="terp_tblheader_General_Centre">Description</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Invoice Date</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Origin</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
<para style="terp_tblheader_General_Centre">Your Reference</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="177.0,177.0,177.0" style="Table_General_Detail_Content">
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
<tr>
<td>
<para style="terp_default_Centre_9">[[ o.name or ' ' ]]</para>
@@ -199,6 +210,9 @@
<td>
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ o.origin or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
</td>
@@ -207,31 +221,31 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
<tr>
<td>
<para style="terp_tblheader_Details">Description</para>
<para style="terp_tblheader_General">Description</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Taxes</para>
<para style="terp_tblheader_General_Centre">Taxes</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Quantity</para>
<para style="terp_tblheader_General_Right">Quantity</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Unit Price </para>
<para style="terp_tblheader_General_Right">Unit Price</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Disc.(%)</para>
<para style="terp_tblheader_General_Right">Disc.(%)</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Price</para>
<para style="terp_tblheader_General_Right">Price</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_2">[[ repeatIn(o.invoice_line,'l') ]]</para>
<blockTable colWidths="202.0,88.0,71.0,57.0,42.0,71.0" style="Table8">
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table8">
<tr>
<td>
<para style="terp_default_9">[[ l.name ]]</para>
@@ -246,7 +260,7 @@
<para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] </para>
<para style="terp_default_Centre_9">[[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
@@ -284,7 +298,7 @@
</tr>
</blockTable>
</section>
<blockTable colWidths="391.0,54.0,85.0" style="Table10">
<blockTable colWidths="385.0,60.0,85.0" style="Table10">
<tr>
<td>
<para style="terp_default_8">
@@ -393,4 +407,4 @@
</para>
</pto>
</story>
</document>
</document>
@@ -231,7 +231,7 @@
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
+127 -256
View File
@@ -28,7 +28,6 @@
(data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on Account Move, we will print the Voucher Report
-
@@ -37,311 +36,183 @@
(data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data)
-
Print the Aged Partner Balance Report
-
!python {model: res.partner}: |
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
start = datetime.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d")))
start = datetime(int(start.year), int(start.month), int(start.day))
res = {}
for i in range(5)[::-1]:
stop = start - relativedelta(days=30)
res[str(i)] = {
'name': (i!=0 and (str((5-(i+1)) * 30) + '-' + str((5-i) * 30)) or ('+'+str(4 * 30))),
'stop': start.strftime('%Y-%m-%d'),
'start': (i!=0 and stop.strftime('%Y-%m-%d') or False),
}
start = stop - relativedelta(days=1)
obj_move = self.pool.get('account.move.line')
ctx = {}
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': \
{'chart_account_id':ref('account.chart0'),
'initial_balance': 1, 'periods': period_list,
'journal_ids':journal_ids, 'page_split': 0,
'date_from': time.strftime('%Y-%m-%d'),
'period_length': 30, 'amount_currency': 0,
'query_line' : query_line, 'result_selection':
'customer','direction_selection':
'past','fiscalyear_id':fy_id } }
data_dict['form'].update(res)
from tools.test_reports import try_report
try_report(cr, uid, 'report.account.aged_trial_balance', [], data_dict, context={})
!python {model: account.account}: |
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Account Balance Sheet in Horizontal mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}}
(data, format) = netsvc.LocalService('report.account.balancesheet.horizontal').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet_horizontal.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Account Balance Sheet in Normal mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}}
(data, format) = netsvc.LocalService('report.account.balancesheet').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Account Balance Report in Normal mode - From Account Chart
Print the Account Balance Report in Normal mode through the wizard - From Account Chart
-
!python {model: account.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.data_fiscalyear') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}}
(data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':[ref('account.bal'),ref('account.gpf')]})
(data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal-menu.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_balance_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Central Journal Report - From Account
-
!python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':journal_period_ids})
(data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-central_journal-menu.'+format), 'wb+').write(data)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_central_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the General Journal Report - From Journal
-
!python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}}
(data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the General Ledger Report in Normal Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
acc_ids = [ref('account.bal'),ref('account.gpf')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query': query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-menu.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'landscape':False}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the General Ledger Report in Landscape Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
acc_ids = [ref('account.bal'),ref('account.gpf')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape-menu.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
Print Journal Report - From Model
-
!python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-print_journal.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':journal_period_ids})
(data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-print_journal-menu.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_print_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Partner Balance Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context)
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'active_ids':journal_period_ids,'display_partner': 'all','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data)
!python {model: account.account}: |
ctx={}
data_dict = {'chart_account_id':ref('account.chart0')}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Partner Ledger Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger.'+format), 'wb+').write(data)
!python {model: account.account}: |
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'),'page_split': True}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Partner Ledger-Other Report
-
!python {model: res.partner}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger-other.'+format), 'wb+').write(data)
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'),'page_split': False}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Profit-Loss Report in Normal Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = []
acc_ids = [ref('account.bal'),ref('account.gpf')]
data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': False,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }}
(data, format) = netsvc.LocalService('report.pl.account').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Profit-Loss Report in Horizontal Mode
-
!python {model: account.account}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = []
acc_ids = [ref('account.bal'),ref('account.gpf')]
data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': True,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }}
(data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Analytic Balance Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Cost Ledger Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Cost Ledger(Only Quantities) Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Analytic Journal Report through the wizard
-
!python {model: account.analytic.journal}: |
ctx={}
ctx.update({'model': 'account.analytic.journal','active_ids': [ref('account.cose_journal_sale'), ref('account.exp'), ref('account.sit')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Inverted Analytic Balance Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account')
@@ -77,7 +77,8 @@ class account_aged_trial_balance(osv.osv_memory):
}
start = stop + relativedelta(days=1)
data['form'].update(res)
if data.get('form',False):
data['ids']=[data['form'].get('chart_account_id',False)]
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.aged_trial_balance',
@@ -150,7 +150,7 @@
<para style="terp_tblheader_Details_Right">Amount</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Percentage</para>
<para style="terp_tblheader_Details_Right">Perc(%)</para>
</td>
</tr>
</blockTable>
@@ -222,7 +222,7 @@
<para style="terp_tblheader_Details_Right">Amount</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Percentage</para>
<para style="terp_tblheader_Details_Right">Perc(%)</para>
</td>
</tr>
</blockTable>
@@ -301,4 +301,4 @@
</section>
</pto>
</story>
</document>
</document>
-54
View File
@@ -1,54 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_anglo_saxon
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-24 12:50:50+0000\n"
"PO-Revision-Date: 2009-11-24 12:50:50+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid "This module will support the Anglo-Saxons accounting methodology by \n"
" changing the accounting logic with stock transactions. The difference between the Anglo-Saxon accounting countries \n"
" and the Rhine or also called Continental accounting countries is the moment of taking the Cost of Goods Sold versus Cost of Sales. \n"
" Anglo-Saxons accounting does take the cost when sales invoice is created, Continental accounting will take the cost at he moment the goods are shipped.\n"
" This module will add this functionality by using a interim account, to store the value of shipped goods and will contra book this interim account \n"
" when the invoice is created to transfer this amount to the debtor or creditor account."
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Account"
msgstr ""
#. module: account_anglo_saxon
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr ""
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid "This account will be used to value price difference between purchase price and cost price."
msgstr ""
@@ -1,27 +1,33 @@
-
Print the Analytic Budget Report in Normal mode
Print the Analytic Budget Report through wizard
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.analytic.account', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'id':ref('account.analytic_root'),'context':{}}}
(data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account.analytic_root')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_budget-analytic_budget_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data=data_dict, context=ctx, our_module='account_budget')
-
Print the Budget Report in Normal mode
Print the Budget Report through wizard
-
!python {model: account.budget.post}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'id':ref('account_budget.account_budget_post_sales0'),'context':{}}}
(data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account_budget.account_budget_post_sales0')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.account_budget_post_sales0')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_budget_report',wiz_data=data_dict, context=ctx, our_module='account_budget')
-
Print the CrossOvered Budget Report in Normal mode
Print the CrossOvered Budget Report mode through wizard
-
!python {model: crossovered.budget}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'report':'analytic-full','id':ref('account_budget.crossovered_budget_budgetoptimistic0'),'context':{}}}
(data, format) = netsvc.LocalService('report.crossovered.budget.report').create(cr, uid, [ref('account_budget.crossovered_budget_budgetoptimistic0')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_budget-crossovered_budget_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.crossovered_budget_budgetoptimistic0')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_budget_crossvered_report',wiz_data=data_dict, context=ctx, our_module='account_budget')
-163
View File
@@ -1,163 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_coda
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
msgstr ""
#. module: account_coda
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,open:0
msgid "_Open Statement"
msgstr ""
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA"
msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Clic on 'New' to select your file :"
msgstr ""
#. module: account_coda
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
msgid "Import Coda File"
msgstr ""
#. module: account_coda
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
msgstr ""
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid "Module provides functionality to import\n"
" bank statements from .csv file.\n"
" Import coda file wizard is used to import bank statements."
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,end:0
msgid "_Close"
msgstr ""
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda import"
msgstr ""
#. module: account_coda
#: field:account.coda,user_id:0
msgid "User"
msgstr ""
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_payable:0
msgid "Default Payable Account"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda
msgid "Coda Statements"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
msgid "Import Coda Statements"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,init,extraction:0
msgid "_Ok"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
#: wizard_view:account.coda_import,init:0
msgid "Import Coda Statement"
msgstr ""
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
msgid "Results :"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,coda:0
msgid "Coda File"
msgstr ""
#. module: account_coda
#: field:account.coda,date:0
msgid "Import Date"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
msgstr ""
@@ -27,6 +27,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/>
@@ -41,6 +45,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Tableau6">
<blockAlignment value="LEFT"/>
@@ -237,20 +245,23 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header">
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Document</para>
<para style="terp_tblheader_General_Centre">Description</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Invoice Date</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Origin</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
<para style="terp_tblheader_General_Centre">Your Reference</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content">
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
<tr>
<td>
<para style="terp_default_Centre_8">[[ o.name ]]</para>
@@ -258,6 +269,9 @@
<td>
<para style="terp_default_Centre_8">[[ formatLang(o.date_invoice,date=True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ o.name or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
</td>
@@ -493,4 +507,4 @@
</para>
</pto>
</story>
</document>
</document>
@@ -27,6 +27,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/>
@@ -41,6 +45,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Tableau6">
<blockAlignment value="LEFT"/>
@@ -241,20 +249,23 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header">
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Document</para>
<para style="terp_tblheader_General_Centre">Description</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Invoice Date</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Origin</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
<para style="terp_tblheader_General_Centre">Your Reference</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content">
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
<tr>
<td>
<para style="terp_default_Centre_9">[[ o.name ]]</para>
@@ -262,6 +273,9 @@
<td>
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ o.name or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
</td>
@@ -382,7 +396,7 @@
</tr>
</blockTable>
</section>
<blockTable colWidths="395.0,59.0,85.0" style="Tableau3">
<blockTable colWidths="390.0,64.0,85.0" style="Tableau3">
<tr>
<td>
<para style="terp_default_9">
@@ -390,14 +404,14 @@
</para>
</td>
<td>
<para style="terp_default_9">Net Total:</para>
<para style="terp_default_9">Net Total : </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="395.0,59.0,85.0" style="Table4">
<blockTable colWidths="390.0,64.0,85.0" style="Table4">
<tr>
<td>
<para style="terp_default_9">
@@ -405,14 +419,14 @@
</para>
</td>
<td>
<para style="terp_default_9">Taxes:</para>
<para style="terp_default_9">Taxes : </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="395.0,59.0,85.0" style="Table6">
<blockTable colWidths="390.0,64.0,85.0" style="Table6">
<tr>
<td>
<para style="terp_default_9">
@@ -420,7 +434,7 @@
</para>
</td>
<td>
<para style="terp_default_Bold_9">Total:</para>
<para style="terp_default_Bold_9">Total : </para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
@@ -511,4 +525,4 @@
</para>
</pto>
</story>
</document>
</document>
@@ -19,12 +19,14 @@
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data)
-
Print the Invoice Layout Report with Message in Normal mode
Print the Invoice Layout Report with Message through wizard
-
!python {model: account.invoice}: |
import netsvc, tools, os, time
data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('test_invoice_1'),'context':{}}}
(data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('test_invoice_1')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'account.invoice','active_ids': [ref('test_invoice_1')]})
data_dict = {'message':ref('account_invoice_layout.demo_message1')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_invoice_special_msg',wiz_data=data_dict, context=ctx, our_module='account_invoice_layout')
+2 -2
View File
@@ -210,7 +210,7 @@
<para style="terp_default_Centre_8">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ get_company_currency() ]]</para>
<para style="terp_default_Centre_8">[[ o.user_id and o.user_id.company_id and o.user_id.company_id.currency_id and o.user_id.company_id.currency_id.name or '' ]]</para>
</td>
</tr>
</blockTable>
@@ -287,4 +287,4 @@
</para>
</pto>
</story>
</document>
</document>
+3 -2
View File
@@ -49,8 +49,9 @@ account_move_line()
class account_voucher(osv.osv):
def _get_type(self, cr, uid, ids, context=None):
if context is None: context = {}
def _get_type(self, cr, uid, context=None):
if context is None:
context = {}
return context.get('type', False)
def _get_period(self, cr, uid, context=None):
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2004-2009 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
@@ -18,8 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
__name__ = "Change signs of old holiday requests"
def migrate(cr, version):
cr.execute("DELETE FROM hr_holidays WHERE number_of_days < 0")
cr.execute("UPDATE hr_holidays SET number_of_days = -number_of_days, type ='remove'")
from service import security
import crypt
+43
View File
@@ -0,0 +1,43 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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/>.
#
##############################################################################
{
"name" : "Base - Password Encryption",
"version" : "1.1",
"author" : "FS3 & OpenERP SA",
"maintainer" : "OpenERP SA",
"website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"description": """This module replaces the cleartext password in the database with a password hash,
preventing anyone from reading the original password.
For your existing user base, the removal of the cleartext passwords occurs the first time
a user logs into the database, after installing base_crypt.
After installing this module it won't be possible to recover a forgotten password for your
users, the only solution is for an admin to set a new password.
Note: installing this module does not mean you can ignore basic security measures,
as the password is still transmitted unencrypted on the network (by the client),
unless you are using a secure protocol such as XML-RPCS.
""",
"depends" : ["base"],
"data" : [],
"active": False,
"installable": True,
}
+256
View File
@@ -0,0 +1,256 @@
# Notice:
# ------
#
# Implements encrypting functions.
#
# Copyright (c) 2008, F S 3 Consulting Inc.
#
# Maintainer:
# Alec Joseph Rivera (agi<at>fs3.ph)
#
#
# Warning:
# -------
#
# This program as such is intended to be used by professional programmers
# who take the whole responsibility of assessing all potential consequences
# resulting from its eventual inadequacies and bugs. End users who are
# looking for a ready-to-use solution with commercial guarantees and
# support are strongly adviced to contract a Free Software Service Company.
#
# This program is Free Software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 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 General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the:
#
# Free Software Foundation, Inc.
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307
# USA.
from random import seed, sample
from string import letters, digits
from osv import fields,osv
import pooler
import tools
from tools.translate import _
from service import security
magic_md5 = '$1$'
def gen_salt( length=8, symbols=letters + digits ):
seed()
return ''.join( sample( symbols, length ) )
# The encrypt_md5 is based on Mark Johnson's md5crypt.py, which in turn is
# based on FreeBSD src/lib/libcrypt/crypt.c (1.2) by Poul-Henning Kamp.
# Mark's port can be found in ActiveState ASPN Python Cookbook. Kudos to
# Poul and Mark. -agi
#
# Original license:
#
# * "THE BEER-WARE LICENSE" (Revision 42):
# *
# * <phk@login.dknet.dk> wrote this file. As long as you retain this
# * notice you can do whatever you want with this stuff. If we meet some
# * day, and you think this stuff is worth it, you can buy me a beer in
# * return.
# *
# * Poul-Henning Kamp
import md5
def encrypt_md5( raw_pw, salt, magic=magic_md5 ):
hash = md5.new( raw_pw + magic + salt )
stretch = md5.new( raw_pw + salt + raw_pw).digest()
for i in range( 0, len( raw_pw ) ):
hash.update( stretch[i % 16] )
i = len( raw_pw )
while i:
if i & 1:
hash.update('\x00')
else:
hash.update( raw_pw[0] )
i >>= 1
saltedmd5 = hash.digest()
for i in range( 1000 ):
hash = md5.new()
if i & 1:
hash.update( raw_pw )
else:
hash.update( saltedmd5 )
if i % 3:
hash.update( salt )
if i % 7:
hash.update( raw_pw )
if i & 1:
hash.update( saltedmd5 )
else:
hash.update( raw_pw )
saltedmd5 = hash.digest()
itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
rearranged = ''
for a, b, c in ((0, 6, 12), (1, 7, 13), (2, 8, 14), (3, 9, 15), (4, 10, 5)):
v = ord( saltedmd5[a] ) << 16 | ord( saltedmd5[b] ) << 8 | ord( saltedmd5[c] )
for i in range(4):
rearranged += itoa64[v & 0x3f]
v >>= 6
v = ord( saltedmd5[11] )
for i in range( 2 ):
rearranged += itoa64[v & 0x3f]
v >>= 6
return magic + salt + '$' + rearranged
class users(osv.osv):
_name="res.users"
_inherit="res.users"
# agi - 022108
# Add handlers for 'input_pw' field.
def set_pw(self, cr, uid, id, name, value, args, context):
if not value:
raise osv.except_osv(_('Error'), _("Please specify the password !"))
obj = pooler.get_pool(cr.dbname).get('res.users')
if not hasattr(obj, "_salt_cache"):
obj._salt_cache = {}
salt = obj._salt_cache[id] = gen_salt()
encrypted = encrypt_md5(value, salt)
cr.execute('update res_users set password=%s where id=%s',
(encrypted.encode('utf-8'), int(id)))
cr.commit()
del value
def get_pw( self, cr, uid, ids, name, args, context ):
cr.execute('select id, password from res_users where id in %s', (tuple(map(int, ids)),))
stored_pws = cr.fetchall()
res = {}
for id, stored_pw in stored_pws:
res[id] = stored_pw
return res
_columns = {
# The column size could be smaller as it is meant to store a hash, but
# an existing column cannot be downsized; thus we use the original
# column size.
'password': fields.function(get_pw, fnct_inv=set_pw, type='char',
method=True, size=64, string='Password', invisible=True,
store=True),
}
def login(self, db, login, password):
cr = pooler.get_db(db).cursor()
cr.execute('select password, id from res_users where login=%s',
(login.encode('utf-8'),))
stored_pw = id = cr.fetchone()
if stored_pw:
stored_pw = stored_pw[0]
id = id[1]
else:
# Return early if there is no such login.
return False
stored_pw = self.maybe_encrypt(cr, stored_pw, id)
# Calculate an encrypted password from the user-provided
# password.
obj = pooler.get_pool(db).get('res.users')
if not hasattr(obj, "_salt_cache"):
obj._salt_cache = {}
salt = obj._salt_cache[id] = stored_pw[len(magic_md5):11]
encrypted_pw = encrypt_md5(password, salt)
# Check if the encrypted password matches against the one in the db.
cr.execute('select id from res_users where id=%s and password=%s and active', (int(id), encrypted_pw.encode('utf-8')))
res = cr.fetchone()
cr.close()
if res:
return res[0]
else:
return False
def check(self, db, uid, passwd):
# Get a chance to hash all passwords in db before using the uid_cache.
obj = pooler.get_pool(db).get('res.users')
if not hasattr(obj, "_salt_cache"):
obj._salt_cache = {}
self._uid_cache.get(db, {}).clear()
cached_pass = self._uid_cache.get(db, {}).get(uid)
if (cached_pass is not None) and cached_pass == passwd:
return True
cr = pooler.get_db(db).cursor()
if uid not in obj._salt_cache:
cr.execute('select login from res_users where id=%s', (int(uid),))
stored_login = cr.fetchone()
if stored_login:
stored_login = stored_login[0]
if not self.login(db,stored_login,passwd):
return False
salt = obj._salt_cache[uid]
cr.execute('select count(id) from res_users where id=%s and password=%s',
(int(uid), encrypt_md5(passwd, salt)))
res = cr.fetchone()[0]
cr.close()
if not bool(res):
raise Exception('AccessDenied')
if res:
if self._uid_cache.has_key(db):
ulist = self._uid_cache[db]
ulist[uid] = passwd
else:
self._uid_cache[db] = {uid: passwd}
return bool(res)
def maybe_encrypt(self, cr, pw, id):
# If the password 'pw' is not encrypted, then encrypt all passwords
# in the db. Returns the (possibly newly) encrypted password for 'id'.
if pw[0:len(magic_md5)] != magic_md5:
cr.execute('select id, password from res_users')
res = cr.fetchall()
for i, p in res:
encrypted = p
if p[0:len(magic_md5)] != magic_md5:
encrypted = encrypt_md5(p, gen_salt())
cr.execute('update res_users set password=%s where id=%s',
(encrypted.encode('utf-8'), int(i)))
if i == id:
encrypted_res = encrypted
cr.commit()
return encrypted_res
return pw
users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+37
View File
@@ -0,0 +1,37 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_crypt
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-26 09:12:09+0000\n"
"PO-Revision-Date: 2009-11-26 09:12:09+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid "Module for password encryption."
msgstr ""
#. module: base_crypt
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base"
msgstr ""
#. module: base_crypt
#: field:res.users,input_pw:0
msgid "Password"
msgstr ""
+40
View File
@@ -0,0 +1,40 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_crypt
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.14\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-26 09:12+0000\n"
"PO-Revision-Date: 2010-11-23 02:16+0000\n"
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-12-15 05:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid "Module for password encryption."
msgstr ""
#. module: base_crypt
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base"
msgstr ""
#. module: base_crypt
#: field:res.users,input_pw:0
msgid "Password"
msgstr ""
#~ msgid "Module for password encryption.KKKKKKKKKKKKKKKKKKK"
#~ msgstr "Module for password encryption.KKKKKKKKKKKKKKKKKKK"
-57
View File
@@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:45:34+0000\n"
"PO-Revision-Date: 2009-01-28 00:45:34+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst format"
msgstr "Guide Technique au format rst"
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr "Nom du Fichier"
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr "Crée le Guide Technical au format rst"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr "Choisissez un fichier où le Guide Technique sera créé."
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr "Fichier"
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr "Fermer"
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst format"
msgstr "Crée le Guide Technique au format rst"
+1 -1
View File
@@ -44,7 +44,7 @@
<field name="alarm_id" string="Reminder"
widget="selection" />
<group colspan="2" col="4" >
<field name="recurrency"/>
<field name="recurrency"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}"
on_change="onchange_edit_all(rrule_type,edit_all)"/>
</group>
+2 -2
View File
@@ -125,7 +125,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_9">[[ (not(o.sale_id) and o.type== 'out') and 'Error, no sale order attached to this picking !' or removeParentNode('para') ]]</para>
<blockTable colWidths="287.0,254.0" repeatRows="1" style="Tableau1">
<tr>
<td>
@@ -226,4 +226,4 @@
</section>
</pto>
</story>
</document>
</document>
+2 -2
View File
@@ -37,7 +37,7 @@ def get_plain_ftp(timeout=10.0):
def get_ftp_login(cr, uid, ormobj):
ftp = get_plain_ftp()
user = ormobj.pool.get('res.users').read(cr, uid, uid)
ftp.login(user.get('login',''), user.get('password',''))
ftp.login(user.get('login',''), user.get('login',''))
ftp.cwd("/" + cr.dbname)
return ftp
@@ -62,4 +62,4 @@ def get_ftp_fulldata(ftp, fname, limit=8192):
ftp.retrbinary('RETR %s' % fname, partial(ffp,data))
return ''.join(data)
#eof
#eof
+1
View File
@@ -8,3 +8,4 @@
"access_hr_job_user","hr.job user","model_hr_job","base.group_hr_user",1,1,1,1
"access_hr_res_partner_address","res.partner.address","base.model_res_partner_address","base.group_hr_manager",1,1,1,1
"access_hr_employee_marital_status_manager","hr.employee.marital.status.manager","model_hr_employee_marital_status","base.group_hr_manager",1,1,1,1
"access_ir_property_hr_user","ir_property hr_user","base.model_ir_property","base.group_hr_user",1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
8 access_hr_job_user hr.job user model_hr_job base.group_hr_user 1 1 1 1
9 access_hr_res_partner_address res.partner.address base.model_res_partner_address base.group_hr_manager 1 1 1 1
10 access_hr_employee_marital_status_manager hr.employee.marital.status.manager model_hr_employee_marital_status base.group_hr_manager 1 1 1 1
11 access_ir_property_hr_user ir_property hr_user base.model_ir_property base.group_hr_user 1 1 1 0
+2 -2
View File
@@ -137,7 +137,7 @@ class hr_employee(osv.osv):
res = {'action': type, 'employee_id': emp['id']}
if dt:
res['name'] = dt
res['name'] = dt
id = obj_attendance.create(cr, uid, res, context=context)
if type != 'action':
@@ -146,4 +146,4 @@ class hr_employee(osv.osv):
hr_employee()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -29,7 +29,7 @@
<xsl:template name="story">
<spacer length="1cm" />
<para style="terp_header_Centre" t="1">Attendance By Month</para>
<para style="terp_header_Centre" t="1">Attendances By Month</para>
<spacer length="1cm" />
<blockTable>
<xsl:attribute name="style">week</xsl:attribute>
@@ -1,19 +1,20 @@
-
In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance By Month
Print the HR Attendance Report By Month through the wizard
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
data_dict = {'model': 'hr.employee', 'form': {'month': time.gmtime()[1], 'year': time.gmtime()[0]}}
(data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data)
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_attendance_month',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
-
Print HR Attendance Error Report through the wizard
-
In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance Error
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
data_dict = {'model': 'hr.employee', 'form': {'init_date': time.strftime('%Y-01-01'), 'end_date':time.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee1')], 'max_delay': 120}}
(data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [ref('hr.employee1')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data)
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1')]})
data_dict = {'init_date': time.strftime('%Y-01-01')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_attendance_error',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
@@ -4,3 +4,4 @@
"access_hr_resource_manager","hr.employee.resource.manager","resource.model_resource_resource","base.group_hr_manager",1,1,1,1
"access_hr_resource_calendar_user","hr.employee.resource.calendar.user","resource.model_resource_calendar","base.group_hr_user",1,1,1,1
"access_hr_contract_type_manager","hr.contract.type.manager","model_hr_contract_type","base.group_hr_manager",1,1,1,1
"access_hr_contract_manager","hr.contract.manager","model_hr_contract","base.group_hr_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
4 access_hr_resource_manager hr.employee.resource.manager resource.model_resource_resource base.group_hr_manager 1 1 1 1
5 access_hr_resource_calendar_user hr.employee.resource.calendar.user resource.model_resource_calendar base.group_hr_user 1 1 1 1
6 access_hr_contract_type_manager hr.contract.type.manager model_hr_contract_type base.group_hr_manager 1 1 1 1
7 access_hr_contract_manager hr.contract.manager model_hr_contract base.group_hr_manager 1 1 1 1
+1 -1
View File
@@ -281,7 +281,7 @@ class hr_evaluation_interview(osv.osv):
_columns = {
'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade', required=True),
'user_to_review_id': fields.many2one('hr.employee', 'Employee to Interview'),
'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Evaluation Type'),
'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Evaluation Form'),
}
_defaults = {
'is_evaluation': True,
+20 -1
View File
@@ -170,7 +170,26 @@
</group>
<notebook colspan="4">
<page string="Appraisal">
<field name="survey_request_ids" context="{'phase_id': phase_id}" nolabel="1" colspan="4" widget="one2many"/>
<field name="survey_request_ids" context="{'phase_id': phase_id}" nolabel="1" colspan="4" widget="one2many">
<form string="Interview Evaluation">
<group col="4" colspan="4">
<field name="survey_id"/>
<group col="2" colspan="2">
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
</group>
<field name="date_deadline"/>
<field name="response" readonly="1"/>
<field name="user_to_review_id"/>
<field name="user_id" string="Interviewer"/>
</group>
<newline/>
<separator string="State" colspan="4"/>
<group colspan="4" col="6">
<field name="state"/>
</group>
</form>
</field>
</page>
<page string="Internal Notes">
<field name="note_action" colspan="4" nolabel="1"
-275
View File
@@ -1,275 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * hr_evaluation
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 12:18:06+0000\n"
"PO-Revision-Date: 2009-11-25 12:18:06+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: hr_evaluation
#: view:hr_evaluation.type:0
#: field:hr_evaluation.type,info:0
msgid "Information"
msgstr ""
#. module: hr_evaluation
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
msgid "Schedule next evaluation"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
#: field:hr_evaluation.evaluation,info_bad:0
msgid "Bad Points"
msgstr ""
#. module: hr_evaluation
#: model:ir.actions.act_window,name:hr_evaluation.open_view_employee_evaluation_next_my_list
msgid "My Next Evaluation"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.type,value_ids:0
msgid "Values"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
#: field:hr_evaluation.evaluation,info_good:0
msgid "Good Points"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,state:0
msgid "State"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,score:0
#: field:hr_evaluation.quote,score:0
#: field:hr_evaluation.type,score:0
#: field:hr_evaluation.type.value,score:0
msgid "Score"
msgstr ""
#. module: hr_evaluation
#: selection:hr_evaluation.evaluation,state:0
msgid "Draft"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
msgid "Informal Data"
msgstr ""
#. module: hr_evaluation
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,employee_id:0
msgid "Employee"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
#: field:hr_evaluation.evaluation,info_improve:0
msgid "To Improve"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.quote,evaluation_id:0
msgid "Evaluation"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.type.value,type_id:0
msgid "Evaluation Type"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
msgid "Status"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.type:0
msgid "Apply to categories"
msgstr ""
#. module: hr_evaluation
#: model:ir.module.module,description:hr_evaluation.module_meta_information
msgid "Ability to create employees evaluation."
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.quote,name:0
msgid "Quote"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.type,category_ids:0
msgid "Appliable Role"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,user_id:0
msgid "Evaluation User"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.type:0
msgid "Choices Results"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,date:0
msgid "Date"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_eval_hr
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_form
msgid "Evaluations"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_eval_config
msgid "Configuration"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_next_list
msgid "Next Evaluations"
msgstr ""
#. module: hr_evaluation
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_evaluation_type_form
msgid "Evaluation Criterions"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_my_old_evaluation_list
msgid "My Preceeding Evaluations"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_resp_hr
msgid "HR Responsible"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.quote,value_id:0
#: field:hr_evaluation.type.value,name:0
msgid "Value"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,name:0
msgid "Summary"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.type,active:0
msgid "Active"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.type:0
msgid "Notes"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_evaluation
msgid "Employee Evaluation"
msgstr ""
#. module: hr_evaluation
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_type
msgid "Employee Evaluation Type"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
msgid "Quotations"
msgstr ""
#. module: hr_evaluation
#: model:ir.actions.act_window,name:hr_evaluation.open_view_employee_evaluation_next_list
msgid "Next Employee Evaluation"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.quote,type_id:0
msgid "Type"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.type:0
#: field:hr_evaluation.type,name:0
msgid "Evaluation Criterion"
msgstr ""
#. module: hr_evaluation
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_next_my_list
msgid "My Next Evaluations"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.quote:0
msgid "Evalution Quote"
msgstr ""
#. module: hr_evaluation
#: model:ir.module.module,shortdesc:hr_evaluation.module_meta_information
msgid "Human Resources Evaluation"
msgstr ""
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,quote_ids:0
msgid "Quotes"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
#: selection:hr_evaluation.evaluation,state:0
msgid "Done"
msgstr ""
#. module: hr_evaluation
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_quote
msgid "Employee Evaluation Quote"
msgstr ""
#. module: hr_evaluation
#: view:hr_evaluation.evaluation:0
#: field:hr_evaluation.evaluation,info_employee:0
msgid "Employee Response"
msgstr ""
#. module: hr_evaluation
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_type_value
msgid "Evaluation Type Value"
msgstr ""
@@ -1,5 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_evaluation_evaluation_user","hr_evaluation.evaluation.user","model_hr_evaluation_evaluation","base.group_hr_user",1,1,1,1
"access_hr_evaluation_evaluation_employee","hr_evaluation.evaluation.employee","model_hr_evaluation_evaluation","base.group_user",1,0,0,0
"access_hr_evaluation_plan_user","hr_evaluation.plan.user","model_hr_evaluation_plan","base.group_hr_user",1,1,1,1
"access_hr_evaluation_plan_phase_user","hr_evaluation.plan.phase.user","model_hr_evaluation_plan_phase","base.group_hr_user",1,1,1,1
"access_hr_evaluation_interview_user","hr.evaluation.interview.user","model_hr_evaluation_interview","base.group_hr_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_evaluation_evaluation_user hr_evaluation.evaluation.user model_hr_evaluation_evaluation base.group_hr_user 1 1 1 1
3 access_hr_evaluation_evaluation_employee hr_evaluation.evaluation.employee model_hr_evaluation_evaluation base.group_user 1 0 0 0
4 access_hr_evaluation_plan_user hr_evaluation.plan.user model_hr_evaluation_plan base.group_hr_user 1 1 1 1
5 access_hr_evaluation_plan_phase_user hr_evaluation.plan.phase.user model_hr_evaluation_plan_phase base.group_hr_user 1 1 1 1
6 access_hr_evaluation_interview_user hr.evaluation.interview.user model_hr_evaluation_interview base.group_hr_user 1 1 1 1
+11 -23
View File
@@ -68,10 +68,8 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
@@ -113,7 +111,7 @@
<story>
<pto>
<pto_header>
<blockTable colWidths="49.0,204.0,45.0,80.0,53.0,91.0" style="Table_hr_expense_line_header">
<blockTable colWidths="60.0,200.0,50.0,70.0,70.0,85.0" style="Table_hr_expense_line_header">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
@@ -122,7 +120,7 @@
<para style="terp_tblheader_Details">Name</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref.</para>
<para style="terp_tblheader_Details">Ref.</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Unit Price</para>
@@ -131,7 +129,7 @@
<para style="terp_tblheader_Details_Right">Qty</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total Price</para>
<para style="terp_tblheader_Details_Right">Price</para>
</td>
</tr>
</blockTable>
@@ -176,7 +174,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="49.0,204.0,45.0,80.0,53.0,91.0" style="Table_hr_expense_line_header">
<blockTable colWidths="60.0,200.0,50.0,70.0,70.0,85.0" style="Table_hr_expense_line_header">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
@@ -185,7 +183,7 @@
<para style="terp_tblheader_Details">Name</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Ref.</para>
<para style="terp_tblheader_Details">Ref.</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Unit Price</para>
@@ -194,7 +192,7 @@
<para style="terp_tblheader_Details_Right">Qty</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total Price</para>
<para style="terp_tblheader_Details_Right">Price</para>
</td>
</tr>
</blockTable>
@@ -203,7 +201,7 @@
</para>
<section>
<para style="terp_default_8">[[ repeatIn(o.line_ids,'line') ]]</para>
<blockTable colWidths="49.0,204.0,46.0,79.0,53.0,92.0" style="Table_expense_line">
<blockTable colWidths="60.0,200.0,50.0,70.0,70.0,85.0" style="Table_expense_line">
<tr>
<td>
<para style="terp_default_9">[[ formatLang(line.date_value,date=True) ]]</para>
@@ -256,7 +254,7 @@
</tr>
</blockTable>
</section>
<blockTable colWidths="57.0,171.0,171.0,32.0,92.0" style="Table_Final_total">
<blockTable colWidths="365.0,70.0,100.0" style="Table_Final_total">
<tr>
<td>
<para style="terp_default_8">
@@ -264,17 +262,7 @@
</para>
</td>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total:</para>
<para style="terp_tblheader_Details">Total:</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]]</para>
@@ -1,5 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_expense_expense_user","hr.expense.expense.user","model_hr_expense_expense","base.group_hr_user",1,1,1,1
"access_hr_expense_expense_employee","hr.expense.expense.employee","model_hr_expense_expense","base.group_user",1,1,1,1
"access_hr_expense_line_user","hr.expense.line.user","model_hr_expense_line","base.group_hr_user",1,1,1,1
"access_hr_expense_report_manager","hr.expense.report.manager","model_hr_expense_report","base.group_hr_manager",1,1,1,1
"access_product_product_hr_expense_user","product.product.hr.expense.user","product.model_product_product","base.group_hr_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_expense_expense_user hr.expense.expense.user model_hr_expense_expense base.group_hr_user 1 1 1 1
3 access_hr_expense_expense_employee hr.expense.expense.employee model_hr_expense_expense base.group_user 1 1 1 1
4 access_hr_expense_line_user hr.expense.line.user model_hr_expense_line base.group_hr_user 1 1 1 1
5 access_hr_expense_report_manager hr.expense.report.manager model_hr_expense_report base.group_hr_manager 1 1 1 1
6 access_product_product_hr_expense_user product.product.hr.expense.user product.model_product_product base.group_hr_user 1 1 1 1
+8 -44
View File
@@ -10,52 +10,16 @@
parent="base.menu_hr_dasboard"
sequence="4"/>
<record model="ir.ui.view" id="view_holiday_allocation_leave_tree">
<field name="name">hr.holidays.allocation.leave.tree</field>
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leaves" >
<field name="name"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="holiday_status_id"/>
</tree>
</field>
</record>
<record id="action_view_holiday_status_board" model="ir.actions.act_window">
<field name="name">My Leaves</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','in',('confirm', 'validate')),('user_id','=',uid)]</field>
<field name="view_id" ref="view_holiday_allocation_leave_tree"/>
</record>
<record id="board_hr_holidays_form" model="ir.ui.view">
<field name="name">board.hr.holidays.form</field>
<field name="model">board.board</field>
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child1" position="inside">
<action colspan="4" height="220" name="%(action_view_holiday_status_board)d" string="My Leaves"/>
</xpath>
</field>
</record>
<!-- Need to merge in above view -->
<record id="action_hr_holidays_leaves_by_month" model="ir.actions.act_window">
<field name="name">Leaves by Month</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">available.holidays.report</field>
<record model="ir.actions.act_window" id="action_hr_holidays_leaves_by_month">
<field name="name">My Leaves</field>
<field name="res_model">hr.holidays.status</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="context">{'group_by':['holiday_status_id'],'group_by_no_leaf':1}</field>
<field name="view_id" ref="hr_holidays.view_hr_available_holidays_report_graph"/>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="False"/>
<field name="context">{}</field>
<field name="domain">[]</field>
</record>
<record id="board_hr_holidays_leave_by_month_form" model="ir.ui.view">
<field name="name">board.hr.holidays.leave.month.form</field>
@@ -64,7 +28,7 @@
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child2" position="inside">
<action colspan="4" height="220" name="%(action_hr_holidays_leaves_by_month)d" string="Leaves By Month" />
<action colspan="4" height="220" name="%(action_hr_holidays_leaves_by_month)d" string="Leaves" />
</xpath>
</field>
</record>
@@ -3,53 +3,33 @@
<data>
<record id="action_view_holiday_status_manager_board" model="ir.actions.act_window">
<field name="name">All Employee Leaves</field>
<field name="name">Leaves To Validate</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','in',('confirm', 'validate'))]</field>
<field name="domain">[('state','in',('confirm', 'validate', 'validate1'))]</field>
<field name="view_id" ref="hr_holidays.view_holiday_allocation_tree"/>
</record>
<record id="action_hr_holidays_remaining_leaves_empoloyee_all" model="ir.actions.act_window">
<field name="name">Remaining Leaves by User</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.remaining.leaves.user</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="hr_holidays.view_hr_holidays_remaining_leaves_user_graph"/>
</record>
<record id="board_hr_holidays_manager_form" model="ir.ui.view">
<field name="name">board.hr.holidays.manager.form</field>
<field name="model">board.board</field>
<field name="inherit_id" ref="hr.board_hr_manager_form"/>
<field name="inherit_id" ref="hr.board_hr_manager_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child1" position="inside">
<action colspan="4" height="220" name="%(action_view_holiday_status_manager_board)d" string="All Employee Leaves"/>
</xpath>
</field>
</record>
<record id="board_hr_holidays_manager_remaining_form" model="ir.ui.view">
<field name="name">board.hr.holidays.manager.remaining.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr.board_hr_manager_form"/>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child2" position="inside">
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_empoloyee_all)d" string="Remaining Leave by Type and User" />
</xpath>
<xpath expr="/form/hpaned/child1" position="inside">
<action colspan="4" height="220" name="%(action_view_holiday_status_manager_board)d" string="All Employee Leaves"/>
</xpath>
</field>
</record>
<menuitem
action="hr.open_board_hr_manager"
icon="terp-graph"
id="base.menu_hr_manager"
parent="base.menu_hr_dasboard"
groups = "base.group_hr_manager"
sequence="5"/>
sequence="5"/>
</data>
</openerp>
+102 -261
View File
@@ -35,37 +35,11 @@ class hr_holidays_status(osv.osv):
_name = "hr.holidays.status"
_description = "Leave Type"
def get_days_cat(self, cr, uid, ids, category_id, return_false, context=None):
cr.execute("""SELECT id, type, number_of_days, holiday_status_id FROM hr_holidays WHERE category_id = %s AND state='validate' AND holiday_status_id in %s""",
[category_id, tuple(ids)])
result = sorted(cr.dictfetchall(), key=lambda x: x['holiday_status_id'])
grouped_lines = dict((k, [v for v in itr]) for k, itr in groupby(result, itemgetter('holiday_status_id')))
res = {}
for record in self.browse(cr, uid, ids, context=context):
res[record.id] = {}
max_leaves = leaves_taken = 0
if not return_false:
if record.id in grouped_lines:
leaves_taken = -sum([item['number_of_days'] for item in grouped_lines[record.id] if item['type'] == 'remove'])
max_leaves = sum([item['number_of_days'] for item in grouped_lines[record.id] if item['type'] == 'add'])
res[record.id]['max_leaves'] = max_leaves
res[record.id]['leaves_taken'] = leaves_taken
res[record.id]['remaining_leaves'] = max_leaves - leaves_taken
return res
def get_days(self, cr, uid, ids, employee_id, return_false, context=None):
cr.execute("""SELECT id, type, number_of_days, holiday_status_id FROM hr_holidays WHERE employee_id = %s AND state='validate' AND holiday_status_id in %s""",
[employee_id, tuple(ids)])
result = sorted(cr.dictfetchall(), key=lambda x: x['holiday_status_id'])
grouped_lines = dict((k, [v for v in itr]) for k, itr in groupby(result, itemgetter('holiday_status_id')))
res = {}
for record in self.browse(cr, uid, ids, context=context):
res[record.id] = {}
@@ -74,18 +48,15 @@ class hr_holidays_status(osv.osv):
if record.id in grouped_lines:
leaves_taken = -sum([item['number_of_days'] for item in grouped_lines[record.id] if item['type'] == 'remove'])
max_leaves = sum([item['number_of_days'] for item in grouped_lines[record.id] if item['type'] == 'add'])
res[record.id]['max_leaves'] = max_leaves
res[record.id]['leaves_taken'] = leaves_taken
res[record.id]['remaining_leaves'] = max_leaves - leaves_taken
return res
def _user_left_days(self, cr, uid, ids, name, args, context=None):
return_false = False
employee_id = False
res = {}
if context and context.has_key('employee_id'):
if not context['employee_id']:
return_false = True
@@ -102,14 +73,13 @@ class hr_holidays_status(osv.osv):
res = dict.fromkeys(ids, {'leaves_taken': 0, 'remaining_leaves': 0, 'max_leaves': 0})
return res
# To do: we can add remaining_leaves_category field to display remaining leaves for particular type
_columns = {
'name': fields.char('Leave Type', size=64, required=True, translate=True),
'categ_id': fields.many2one('crm.case.categ', 'Meeting Category', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you link this type of leave with a category in the CRM, it will synchronize each leave asked with a case in this category, to display it in the company shared calendar for example.'),
'categ_id': fields.many2one('crm.case.categ', 'Meeting', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you set a meeting type, OpenERP will create a meeting in the calendar once a leave is validated.'),
'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
'limit': fields.boolean('Allow to Override Limit', help='If you tick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves': fields.function(_user_left_days, method=True, string='Maximum Leaves Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'max_leaves': fields.function(_user_left_days, method=True, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken': fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
'remaining_leaves': fields.function(_user_left_days, method=True, string='Remaining Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
'double_validation': fields.boolean('Apply Double Validation', help="If its True then its Allocation/Request have to be validated by second validator")
@@ -118,7 +88,6 @@ class hr_holidays_status(osv.osv):
'color_name': 'red',
'active': True,
}
hr_holidays_status()
class hr_holidays(osv.osv):
@@ -132,12 +101,23 @@ class hr_holidays(osv.osv):
return ids[0]
return False
def _compute_number_of_days(self, cr, uid, ids, name, args, context=None):
result = {}
for hol in self.browse(cr, uid, ids, context=context):
if hol.type=='remove':
result[hol.id] = -hol.number_of_days_temp
else:
result[hol.id] = hol.number_of_days_temp
return result
_columns = {
'name': fields.char('Description', required=True, size=64),
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'), ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\
If the admin accepts it, the state is \'Approved\'. If it is refused, the state is \'Refused\'.'),
'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
'user_id':fields.many2one('res.users', 'User', states={'draft':[('readonly',False)]}, select=True, readonly=True),
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
@@ -145,27 +125,29 @@ class hr_holidays(osv.osv):
#'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}),
'number_of_days': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
'case_id': fields.many2one('crm.meeting', 'Case'),
'number_of_days': fields.function(_compute_number_of_days, method=True, string='Number of Days', store=True),
'case_id': fields.many2one('crm.meeting', 'Meeting'),
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone"),
'allocation_type': fields.selection([('employee','Employee Request'),('company','Company Allocation')], 'Allocation Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help='This field is only for informative purposes, to depict if the leave request/allocation comes from an employee or from the company'),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category Of employee'),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)')
}
_defaults = {
'employee_id': _employee_get,
'state': 'draft',
'type': 'remove',
'allocation_type': 'employee',
'user_id': lambda obj, cr, uid, context: uid,
'holiday_type': 'employee'
}
_sql_constraints = [
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category"),
('date_check', "CHECK ( number_of_days_temp > 0 )", "The number of days must be greater than 0 !"),
('date_check2', "CHECK ( (type='add') OR (date_from < date_to))", "The start date must be before the end date !")
]
def _create_resource_leave(self, cr, uid, vals, context=None):
'''This method will create entry in resource calendar leave object at the time of holidays validated '''
@@ -178,28 +160,6 @@ class hr_holidays(osv.osv):
leave_ids = obj_res_leave.search(cr, uid, [('holiday_id', 'in', ids)], context=context)
return obj_res_leave.unlink(cr, uid, leave_ids)
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
if 'holiday_type' in vals:
if vals['holiday_type'] == 'employee':
vals.update({'category_id': False})
else:
vals.update({'employee_id': False})
if context.has_key('type'):
vals['type'] = context['type']
if context.has_key('allocation_type'):
vals['allocation_type'] = context['allocation_type']
return super(hr_holidays, self).create(cr, uid, vals, context=context)
def write(self, cr, uid, ids, vals, context=None):
if 'holiday_type' in vals:
if vals['holiday_type'] == 'employee':
vals.update({'category_id': False})
else:
vals.update({'employee_id': False})
return super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
def onchange_type(self, cr, uid, ids, holiday_type):
result = {}
if holiday_type == 'employee':
@@ -207,9 +167,10 @@ class hr_holidays(osv.osv):
if ids_employee:
result['value'] = {
'employee_id': ids_employee[0]
}
}
return result
# TODO: can be improved using resource calendar method
def _get_number_of_days(self, date_from, date_to):
"""Returns a float equals to the timedelta between two dates given as string."""
@@ -220,35 +181,10 @@ class hr_holidays(osv.osv):
diff_day = timedelta.days + float(timedelta.seconds) / 86400
return diff_day
def _update_user_holidays(self, cr, uid, ids):
obj_crm_meeting = self.pool.get('crm.meeting')
for record in self.browse(cr, uid, ids):
if record.state=='validate':
if record.case_id:
obj_crm_meeting.unlink(cr, uid, [record.case_id.id])
if record.linked_request_ids:
list_ids = [ lr.id for lr in record.linked_request_ids]
self.holidays_cancel(cr, uid, list_ids)
self.unlink(cr, uid, list_ids)
return True
def _check_date(self, cr, uid, ids, context=None):
for rec in self.read(cr, uid, ids, ['number_of_days_temp', 'date_from','date_to', 'type']):
if rec['number_of_days_temp'] < 0:
return False
if rec['type'] == 'add':
continue
date_from = time.strptime(rec['date_from'], '%Y-%m-%d %H:%M:%S')
date_to = time.strptime(rec['date_to'], '%Y-%m-%d %H:%M:%S')
if date_from > date_to:
return False
return True
_constraints = [(_check_date, 'Start date should not be larger than end date!\nNumber of Days should be greater than 1!', ['number_of_days_temp'])]
def unlink(self, cr, uid, ids, context=None):
self._update_user_holidays(cr, uid, ids)
self._remove_resouce_leave(cr, uid, ids, context=context)
for rec in self.browse(cr, uid, ids, context=context):
if rec.state<>'draft':
raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is not in draft state !'))
return super(hr_holidays, self).unlink(cr, uid, ids, context)
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
@@ -264,209 +200,115 @@ class hr_holidays(osv.osv):
}
return result
def onchange_date_to(self, cr, uid, ids, date_from, date_to):
return self.onchange_date_from(cr, uid, ids, date_to, date_from)
def onchange_sec_id(self, cr, uid, ids, status, context=None):
warning = {}
if status:
brows_obj = self.pool.get('hr.holidays.status').browse(cr, uid, [status], context=context)[0]
brows_obj = self.pool.get('hr.holidays.status').browse(cr, uid, status, context=context)
if brows_obj.categ_id and brows_obj.categ_id.section_id and not brows_obj.categ_id.section_id.allow_unlink:
warning = {
'title': "Warning for ",
'message': "You won\'t be able to cancel this leave request because the CRM Sales Team of the leave type disallows."
}
}
return {'warning': warning}
def set_to_draft(self, cr, uid, ids, *args):
wf_service = netsvc.LocalService("workflow")
self.write(cr, uid, ids, {
'state': 'draft',
'manager_id': False,
'number_of_days': 0,
})
wf_service = netsvc.LocalService("workflow")
for id in ids:
wf_service.trg_create(uid, 'hr.holidays', id, cr)
return True
def holidays_validate2(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
wf_service = netsvc.LocalService("workflow")
vals = {'state':'validate1'}
self.check_holidays(cr, uid, ids)
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
if ids2:
vals['manager_id'] = ids2[0]
else:
raise osv.except_osv(_('Warning !'),_('No user related to the selected employee.'))
# Second Time Validate all the leave requests of the category
for leave_id in self._get_category_leave_ids(cr, uid, ids):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'second_validate', cr)
return self.write(cr, uid, ids, vals)
def holidays_validate(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
wf_service = netsvc.LocalService("workflow")
data_holiday = self.browse(cr, uid, ids)
self.check_holidays(cr, uid, ids)
vals = {'state':'validate'}
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
if ids2:
if data_holiday[0].state == 'validate1':
vals['manager_id2'] = ids2[0]
else:
vals['manager_id'] = ids2[0]
else:
raise osv.except_osv(_('Warning !'), _('No user related to the selected employee.'))
self.write(cr, uid, ids, vals)
manager = ids2 and ids2[0] or False
return self.write(cr, uid, ids, {'state':'validate1', 'manager_id': manager})
def holidays_validate2(self, cr, uid, ids, *args):
self.check_holidays(cr, uid, ids)
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
self.write(cr, uid, ids, {'state':'validate', 'manager_id2': manager})
data_holiday = self.browse(cr, uid, ids)
for record in data_holiday:
if record.holiday_type == 'employee' and record.type == 'remove':
vals = {
'name': record.name,
'date_from': record.date_from,
'date_to': record.date_to,
'calendar_id': record.employee_id.calendar_id.id,
'company_id': record.employee_id.company_id.id,
'resource_id': record.employee_id.resource_id.id,
'holiday_id': record.id
}
self._create_resource_leave(cr, uid, vals)
elif record.holiday_type == 'category':
# Create leave/allocation request for employees in the category
emp_ids = obj_emp.search(cr, uid, [('category_ids', '=', record.category_id.id)])
leave_ids = []
for emp in obj_emp.browse(cr, uid, emp_ids):
vals = {
'name': record.name,
'type': record.type,
'holiday_type': 'employee',
'holiday_status_id': record.holiday_status_id.id,
'date_from': record.date_from,
'date_to': record.date_to,
'notes': record.notes,
'number_of_days_temp': record.number_of_days_temp,
'parent_id': record.id,
'employee_id': emp.id
}
leave_ids.append(self.create(cr, uid, vals, context=None))
# Confirm and validate all the leave requests of the category
for leave_id in leave_ids:
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'confirm', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'validate', cr)
return True
def holidays_confirm(self, cr, uid, ids, *args):
obj_hr_holiday_status = self.pool.get('hr.holidays.status')
for record in self.browse(cr, uid, ids):
user_id = False
leave_asked = record.number_of_days_temp
if record.holiday_type == 'employee' and record.type == 'remove':
if record.employee_id and not record.holiday_status_id.limit:
leaves_rest = obj_hr_holiday_status.get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < leave_asked:
raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for employee %s while there are too few remaining leave days.') % (record.employee_id.name))
nb = -(record.number_of_days_temp)
elif record.holiday_type == 'category' and record.type == 'remove':
if record.category_id and not record.holiday_status_id.limit:
leaves_rest = obj_hr_holiday_status.get_days_cat( cr, uid, [record.holiday_status_id.id], record.category_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < leave_asked:
raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for category %s while there are too few remaining leave days.') % (record.category_id.name))
nb = -(record.number_of_days_temp)
else:
nb = record.number_of_days_temp
if record.holiday_type == 'employee' and record.employee_id:
user_id = record.employee_id.user_id and record.employee_id.user_id.id or uid
self.write(cr, uid, [record.id], {'state':'confirm', 'number_of_days': nb, 'user_id': user_id})
return True
def holidays_refuse(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
wf_service = netsvc.LocalService("workflow")
vals = {'state': 'refuse'}
ids2 = obj_emp.search(cr, uid, [('user_id','=', uid)])
if ids2:
vals['manager_id'] = ids2[0]
# Refuse all the leave requests of the category
for leave_id in self._get_category_leave_ids(cr, uid, ids):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'refuse', cr)
self.write(cr, uid, ids, vals)
return True
def holidays_cancel(self, cr, uid, ids, *args):
self._update_user_holidays(cr, uid, ids)
self.write(cr, uid, ids, {'state': 'cancel'})
self._remove_resouce_leave(cr, uid, ids)
return True
def holidays_draft(self, cr, uid, ids, *args):
wf_service = netsvc.LocalService("workflow")
for leave_id in self._get_category_leave_ids(cr, uid, ids):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'draft', cr)
return self.write(cr, uid, ids, {'state': 'draft'})
def check_holidays(self, cr, uid, ids):
holi_status_obj = self.pool.get('hr.holidays.status')
emp_obj = self.pool.get('hr.employee')
meeting_obj = self.pool.get('crm.meeting')
for record in self.browse(cr, uid, ids):
if not record.number_of_days:
raise osv.except_osv(_('Warning!'), _('Wrong leave definition.'))
if record.holiday_type=='employee' and record.employee_id:
leave_asked = record.number_of_days
if leave_asked < 0.00:
if not record.holiday_status_id.limit:
leaves_rest = holi_status_obj.get_days(cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < -(leave_asked):
raise osv.except_osv(_('Warning!'),_('You Cannot Validate leaves while available leaves are less than asked leaves.'))
elif record.holiday_type == 'category' and record.category_id:
leave_asked = record.number_of_days
if leave_asked < 0.00:
if not record.holiday_status_id.limit:
leaves_rest = holi_status_obj.get_days_cat(cr, uid, [record.holiday_status_id.id], record.category_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < -(leave_asked):
raise osv.except_osv(_('Warning!'),_('You Cannot Validate leaves while available leaves are less than asked leaves.'))
else:# This condition will never meet!!
holiday_ids = []
vals = {
'name': record.name,
'holiday_status_id': record.holiday_status_id.id,
'state': 'draft',
'date_from': record.date_from,
'date_to': record.date_to,
'notes': record.notes,
'number_of_days': record.number_of_days,
'number_of_days_temp': record.number_of_days_temp,
'type': record.type,
'allocation_type': record.allocation_type,
'parent_id': record.id,
}
employee_ids = emp_obj.search(cr, uid, [])
for employee in employee_ids:
vals['employee_id'] = employee
user_id = emp_obj.search(cr, uid, [('user_id','=',uid)])
if user_id:
vals['user_id'] = user_id[0]
holiday_ids.append(self.create(cr, uid, vals, context=None))
self.holidays_confirm(cr, uid, holiday_ids)
self.holidays_validate(cr, uid, holiday_ids)
if record.holiday_status_id.categ_id and record.date_from and record.date_to and record.employee_id:
diff_day = self._get_number_of_days(record.date_from, record.date_to)
meeting_obj = self.pool.get('crm.meeting')
vals = {
'name': record.name,
'categ_id': record.holiday_status_id.categ_id.id,
'duration': (diff_day) * 8,
'duration': record.number_of_days_temp * 8,
'note': record.notes,
'user_id': record.user_id.id,
'date': record.date_from,
'end_date': record.date_to,
'date_deadline': record.date_to,
}
case_id = meeting_obj.create(cr, uid, vals)
self.write(cr, uid, ids, {'case_id': case_id})
elif record.holiday_type == 'category':
emp_ids = obj_emp.search(cr, uid, [('category_ids', 'child_of', [record.category_id.id])])
leave_ids = []
for emp in obj_emp.browse(cr, uid, emp_ids):
vals = {
'name': record.name,
'type': record.type,
'holiday_type': 'employee',
'holiday_status_id': record.holiday_status_id.id,
'date_from': record.date_from,
'date_to': record.date_to,
'notes': record.notes,
'number_of_days_temp': record.number_of_days_temp,
'parent_id': record.id,
'employee_id': emp.id
}
leave_ids.append(self.create(cr, uid, vals, context=None))
wf_service = netsvc.LocalService("workflow")
for leave_id in leave_ids:
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'confirm', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'validate', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'second_validate', cr)
return True
def holidays_confirm(self, cr, uid, ids, *args):
self.check_holidays(cr, uid, ids)
return self.write(cr, uid, ids, {'state':'confirm'})
def holidays_refuse(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
self.write(cr, uid, ids, {'state': 'refuse', 'manager_id2': manager})
self.holidays_cancel(cr, uid, ids)
return True
def holidays_cancel(self, cr, uid, ids, *args):
obj_crm_meeting = self.pool.get('crm.meeting')
for record in self.browse(cr, uid, ids):
# Delete the meeting
if record.case_id:
obj_crm_meeting.unlink(cr, uid, [record.case_id.id])
# If a category that created several holidays, cancel all related
wf_service = netsvc.LocalService("workflow")
for id in record.linked_request_ids or []:
wf_service.trg_validate(uid, 'hr.holidays', id, 'cancel', cr)
return True
def check_holidays(self, cr, uid, ids):
holi_status_obj = self.pool.get('hr.holidays.status')
for record in self.browse(cr, uid, ids):
if record.holiday_type == 'employee' and record.type == 'remove':
if record.employee_id and not record.holiday_status_id.limit:
leaves_rest = holi_status_obj.get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < record.number_of_days_temp:
raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for employee %s: too few remaining days (%s).') % (record.employee_id.name, leaves_rest))
return True
hr_holidays()
class resource_calendar_leaves(osv.osv):
@@ -478,4 +320,3 @@ class resource_calendar_leaves(osv.osv):
resource_calendar_leaves()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+35 -45
View File
@@ -56,7 +56,7 @@
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Leave Request" color="name" date_start="date_from" date_stop="date_to">
<field name="holiday_status_id"/>
<field name="holiday_status_id"/>
</calendar>
</field>
</record>
@@ -70,8 +70,8 @@
<form string="Leave Request">
<group col="8" colspan="4">
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}" />
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager"/>
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager" string="Leave Type"/>
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
</group>
<group attrs="{'invisible':[('holiday_type','=','category')]}">
@@ -83,7 +83,7 @@
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
<field name="department_id"/>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" on_change="onchange_date_to(date_from, date_to)" required="1"/>
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="number_of_days_temp"/>
<newline/>
<field name="manager_id"/>
@@ -93,12 +93,11 @@
<newline/>
<field name="state" colspan="2"/>
<group colspan="2" col="6">
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
<button string="Refuse" name="refuse" states="confirm,validate,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
<button string="Set to Draft" name="set_to_draft" states="refuse" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
</group>
</page>
</notebook>
@@ -115,7 +114,7 @@
<form string="Allocation Request">
<group col="8" colspan="4">
<field name="name" />
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Type" groups="base.group_extended"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Type" groups="base.group_hr_manager"/>
<group attrs="{'invisible':[('holiday_type','=','category')]}">
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
</group>
@@ -136,8 +135,7 @@
<newline/>
<field name="state" colspan="2"/>
<group colspan="2" col="6">
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
<button string="Refuse" name="refuse" states="confirm,validate,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
@@ -154,7 +152,7 @@
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel') " string="Leaves" >
<tree colors="red:state in ('refuse');blue:state in ('draft');black:state in ('confirm','validate','validate1')" string="Leaves" >
<field name="employee_id"/>
<field name="department_id" invisible="1"/>
<field name="holiday_status_id"/>
@@ -181,7 +179,7 @@
<field name="holiday_status_id" />
<field name="type"/>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
<field name="date_to" on_change="onchange_date_to(date_from, date_to)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
<field name="number_of_days_temp"/>
<notebook colspan="4">
<page string="General">
@@ -190,10 +188,9 @@
<newline/>
<field name="state" colspan="2"/>
<group colspan="2">
<button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no"/>
<button string="Refuse" name="refuse" states="confirm,validate,draft" type="workflow" icon="gtk-no"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
</group>
</page>
@@ -203,12 +200,12 @@
</record>
<record model="ir.ui.view" id="view_holiday_simple">
<field name="name">hr.holidays.reprot_tree</field>
<field name="name">hr.holidays.report_tree</field>
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel')" string="Leaves Summary">
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1')" string="Leaves Summary">
<field name="employee_id"/>
<field name="department_id" invisible="1"/>
<field name="type"/>
@@ -220,11 +217,9 @@
<field name="manager_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="state"/>
<button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
</tree>
</field>
</record>
@@ -235,7 +230,7 @@
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel')">
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1')">
<field name="employee_id"/>
<field name="department_id" invisible="not context.get('set_visible',False)"/>
<field name="holiday_status_id"/>
@@ -299,7 +294,7 @@
<field name="name">Allocation Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{"search_default_my_leaves": 1,'type':'add',"search_default_department_id": department_id}</field>
<field name="context">{"search_default_my_leaves": 1,'default_type':'add',"search_default_department_id": department_id}</field>
<field name="domain">[('type','=','add')]</field>
<field name="view_id" ref="allocation_leave_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
@@ -328,6 +323,7 @@
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_holiday_simple"/>
<field name="context">{'search_default_my_leaves': 1, 'search_default_group_type': 1}</field>
<field name="domain">[('holiday_type','=','employee')]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
@@ -347,10 +343,6 @@
<search string="Search Leave Type">
<field name="name"/>
<field name="categ_id" widget="selection"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Meeting Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
</group>
</search>
</field>
</record>
@@ -366,22 +358,19 @@
<field name="color_name"/>
<field name="categ_id" widget="selection" groups="base.group_extended"/>
</group>
<notebook colspan="4">
<page string="Details">
<group name="selection" col="4" colspan="4">
<group colspan="2">
<separator string="Validation" />
<newline/>
<field name="active" />
<newline/>
<field name="double_validation"/>
<newline/>
<field name="limit"/>
</group>
<group name="second" colspan="2"/>
</group>
</page>
</notebook>
<notebook colspan="4">
<page string="Details">
<group colspan="2" col="2" name="selection">
<separator string="Validation" colspan="2"/>
<field name="double_validation"/>
<field name="limit"/>
</group>
<group name="second" colspan="2" col="2">
<separator string="Misc" colspan="2"/>
<field name="active" />
</group>
</page>
</notebook>
</form>
</field>
</record>
@@ -393,21 +382,22 @@
<field name="arch" type="xml">
<tree string="Leave Type">
<field name="name"/>
<field name="max_leaves"/>
<field name="leaves_taken"/>
<field name="remaining_leaves"/>
<field name="limit" />
<field name="categ_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_hr_holidays_status_search" model="ir.ui.view">
<record id="view_hr_holidays_status_search" model="ir.ui.view">
<field name="name">hr.holidays.status.search</field>
<field name="model">hr.holidays.status</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Leave Type">
<field name="name"/>
<field name="categ_id" widget="selection"/>
<field name="name"/>
<field name="categ_id" widget="selection"/>
</search>
</field>
</record>
@@ -448,7 +438,7 @@
context="{'search_default_employee_id': [active_id]}"
res_model="hr.holidays"
src_model="hr.employee"
view_id ="edit_holiday_new"
view_id ="view_holiday"
id="act_hr_employee_holiday_request"/>
</data>
+10 -29
View File
@@ -43,17 +43,9 @@
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">refuse</field>
<field name="kind">function</field>
<field name="action">holidays_refuse()</field>
</record>
<record model="workflow.activity" id="act_cancel">
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">cancel</field>
<field name="flow_stop">True</field>
<field name="kind">stopall</field>
<field name="action">holidays_cancel()</field>
<field name="join_mode">XOR</field>
<field name="action">holidays_refuse()</field>
</record>
<!--
@@ -70,7 +62,7 @@
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_validate" />
<field name="signal">validate</field>
<field name="condition">(holiday_status_id.double_validation == False)</field>
<field name="condition">True</field>
</record>
<record model="workflow.transition" id="t3">
@@ -81,25 +73,14 @@
<record model="workflow.transition" id="t4">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
</record>
<record model="workflow.transition" id="t5">
<field name="act_from" ref="act_refuse" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
</record>
<record model="workflow.transition" id="t7">
<field name="act_from" ref="act_cancel" />
<field name="act_to" ref="act_draft" />
<field name="signal">set_to_draft</field>
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
</record>
<record model="workflow.transition" id="t8">
<field name="act_from" ref="act_validate1" />
<field name="act_to" ref="act_validate" />
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_validate1" />
<field name="group_id" ref="base.group_hr_user"/>
<field name="signal">second_validate</field>
</record>
@@ -110,10 +91,10 @@
</record>
<record model="workflow.transition" id="t11">
<field name="act_from" ref="act_confirm" />
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_validate1" />
<field name="condition">(holiday_status_id.double_validation == True)</field>
<field name="signal">validate</field>
<field name="condition">not holiday_status_id.double_validation</field>
<field name="signal" eval="False"/>
</record>
</data>
@@ -1,35 +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/>.
#
##############################################################################
__name__ = "Convert the Holidays Per User limits into positive leave request"
def migrate(cr, version):
# cr.execute("""SELECT id, employee_id, holiday_status, max_leaves, notes, create_uid
# FROM hr_holidays_per_user;""")
# for record in cr.fetchall():
# cr.execute("""INSERT INTO hr_holidays
# (employee_id, type, allocation_type, name, holiday_status_id,
# state, number_of_days, notes, manager_id) VALUES
# (%s, 'add', 'company', 'imported holiday_per_user', %s,
# 'validated', %s, %s, %s) """, (record[1],record[2],record[3],record[4],record[5]))
return {}
@@ -19,71 +19,3 @@
#
##############################################################################
from osv import fields, osv
import tools
class available_holidays_report(osv.osv):
_name = "available.holidays.report"
_auto = False
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=15, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'employee_id': fields.many2one ('hr.employee', "Employee's Name", readonly=True),
'category_id': fields.many2one('hr.employee.category', "Category's Name", readonly=True),
'holiday_status_id': fields.many2one('hr.holidays.status', 'Leave Type', readonly=True),
'max_leave': fields.float('Allocated Leaves', readonly=True),
'taken_leaves': fields.float('Taken Leaves', readonly=True),
'remaining_leave': fields.float('Remaining Leaves', readonly=True),
'department_id': fields.many2one('hr.department', 'Department', readonly=True),
'user_id': fields.many2one('res.users', 'User', readonly=True),
'state': fields.selection([('draft', 'Draft'),
('confirm', 'Waiting Validation'),
('refuse', 'Refused'),
('validate', 'Validated'),
('cancel', 'Cancelled')]
,'State', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'available_holidays_report')
cr.execute("""
CREATE or REPLACE view available_holidays_report as (
SELECT
min(h.id) as id,
date_trunc('day',h.create_date) as date,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
h.employee_id as employee_id,
h.category_id as category_id,
h.user_id as user_id,
h.department_id,
h.state as state,
h.holiday_status_id as holiday_status_id,
sum(number_of_days) as remaining_leave,
(select sum(number_of_days_temp) from hr_holidays
where type='remove'
and employee_id=h.employee_id
and holiday_status_id=h.holiday_status_id
and state='validate') as taken_leaves,
(select sum(number_of_days_temp) from hr_holidays
where type='add'
and employee_id=h.employee_id
and holiday_status_id=h.holiday_status_id
and state='validate') as max_leave
FROM hr_holidays h
LEFT JOIN hr_holidays_status s on (s.id = h.holiday_status_id)
WHERE h.state='validate'
and s.active <> 'f'
GROUP BY h.holiday_status_id, h.employee_id,
date_trunc('day',h.create_date),to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'), to_char(s.create_date, 'YYYY-MM-DD'), h.user_id,h.state, h.category_id, h.department_id
)""")
available_holidays_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,117 +1,24 @@
<?xml version="1.0"?>
<openerp>
<data>
<data>
<!-- available holidays report -->
<record id="view_hr_available_holidays_report_tree" model="ir.ui.view">
<field name="name">available.holidays.report.tree</field>
<field name="model">available.holidays.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Available Holidays">
<field name="employee_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="category_id" invisible="1"/>
<field name="holiday_status_id" invisible="1"/>
<field name="department_id" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
<field name="date" invisible="1"/>
<field name="state" invisible="1"/>
<field name="max_leave" sum="Allocated Leaves"/>
<field name="taken_leaves" sum="Taken Leaves"/>
<field name="remaining_leave" sum="Remaining Leaves"/>
</tree>
</field>
</record>
<record id="view_hr_available_holidays_report_graph" model="ir.ui.view">
<field name="name">available.holidays.report.graph</field>
<field name="model">available.holidays.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Available Holidays" type="bar">
<field name="holiday_status_id"/>
<field name="taken_leaves" string="Taken Leaves" operator="+"/>
<field name="max_leave" string="Allocated Leaves" operator="+"/>
</graph>
</field>
</record>
<record id="view_hr_available_holidays_report_search" model="ir.ui.view">
<field name="name">available.holidays.report.search</field>
<field name="model">available.holidays.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Leaves">
<group>
<filter icon="terp-go-year" string=" Year " domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]" help="Available Leaves of current year"/>
<filter icon="terp-go-month" string=" Month " name="month"
domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Available Leaves of current month"/>
<filter icon="terp-go-month" string=" Month-1 " separator="1"
domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Available Leaves of last month"/>
<separator orientation="vertical"/>
<filter string="Validated" icon="terp-camera_test" domain="[('state','=','validate')]"/>
<separator orientation="vertical"/>
<field name="employee_id"/>
</group>
<newline/>
<group expand="0" string="Extended Filters..." colspan="10" col="12">
<field name="holiday_status_id" widget="selection"/>
<field name="department_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter icon="terp-personal" string="Employee"
name="user" context="{'group_by':'employee_id'}"
help="Leaves by employee"/>
<filter string="Validation User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
<separator orientation="vertical"/>
<filter icon="terp-stock_symbol-selection" string="Category" context="{'group_by':'category_id'}"
help="Leaves by category"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_hr_available_holidays_report" model="ir.actions.act_window">
<field name="name">Leaves Analysis</field>
<field name="res_model">available.holidays.report</field>
<record model="ir.actions.act_window" id="action_hr_available_holidays_report">
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_user':1,'group_by':[], "search_default_user_id": uid, 'group_by_no_leaf':1}</field>
<field name="view_id" ref="view_hr_available_holidays_report_search"/>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_holiday_simple"/>
<field name="context">{'search_default_group_employee': 1, 'search_default_group_type': 1}</field>
<field name="domain">[('holiday_type','=','employee')]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_hr_available_holidays_report_tree">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_hr_available_holidays_report_tree"/>
<field name="act_window_id" ref="action_hr_available_holidays_report"/>
</record>
<menuitem
name="Leaves Analysis"
id="menu_hr_available_holidays_report_tree"
action="action_hr_available_holidays_report"
parent="menu_hr_reporting_holidays"/>
<record model="ir.actions.act_window.view" id="action_hr_available_holidays_report_graph">
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_hr_available_holidays_report_graph"/>
<field name="act_window_id" ref="action_hr_available_holidays_report"/>
</record>
<menuitem name="Leaves Analysis" id="menu_hr_available_holidays_report_tree" action="action_hr_available_holidays_report" parent="menu_hr_reporting_holidays"/>
</data>
</data>
</openerp>
@@ -244,7 +244,6 @@
<td>
<para>
<xsl:attribute name="style">digits</xsl:attribute>
<xsl:value-of select="attribute::id"/>
</para>
</td>
<td>
@@ -5,4 +5,3 @@
"access_hr_holydays_status_employee","hr.holidays.status employee","model_hr_holidays_status","base.group_user",1,0,0,0
"access_hr_holidays_remain_user","hr.holidays.ramain.user","model_hr_holidays_remaining_leaves_user","base.group_hr_user",1,1,1,1
"access_resource_calendar_leaves_manager","resource_calendar_leaves_manager","resource.model_resource_calendar_leaves","base.group_hr_manager",1,1,1,1
"access_available_holidays_report_user","hr.available.holidays.report.user","model_available_holidays_report","base.group_hr_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_hr_holydays_status_employee hr.holidays.status employee model_hr_holidays_status base.group_user 1 0 0 0
6 access_hr_holidays_remain_user hr.holidays.ramain.user model_hr_holidays_remaining_leaves_user base.group_hr_user 1 1 1 1
7 access_resource_calendar_leaves_manager resource_calendar_leaves_manager resource.model_resource_calendar_leaves base.group_hr_manager 1 1 1 1
access_available_holidays_report_user hr.available.holidays.report.user model_available_holidays_report base.group_hr_user 1 1 1 1
+19 -11
View File
@@ -1,14 +1,22 @@
-
In order to test the PDF reports defined on a HR Holidays, we will print HR Holidays
Print the HR Holidays(Summary Department) Report through the wizard
-
!python {model: hr.holidays}: |
import netsvc, tools, os, time
data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }}
(data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-dept_summary_report.'+format), 'wb+').write(data)
data_dict = {'model': 'hr.employee', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated','emp':[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')] }}
(data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-employee_summary_report.'+format), 'wb+').write(data)
import time
ctx={}
ctx.update({'model': 'hr.department','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'depts' : [(6,0,[ref('hr.dep_sales')])],'holiday_type' : 'Validated'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_dept',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
-
Print the HR Holidays(Summary Employee) Report through the wizard
-
!python {model: hr.holidays}: |
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'emp' : [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')])],'holiday_type' : 'Validated'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_employee',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
@@ -42,7 +42,6 @@
I allocate leave request for employee "Phil Graves".
-
!record {model: hr.holidays, id: hr_holidays_allocateleaveforuser0}:
allocation_type: employee
employee_id: 'hr_employee_philgraves0'
holiday_status_id: hr_holidays_status_sick0
name: Sick Leaves for Phil Graves
@@ -64,7 +63,6 @@
I connect as "test_holiday_user1", and create a new leave request for employee "Phil Graves".
-
!record {model: hr.holidays, id: hr_holidays_iwanttoleaveforgotohospital0}:
allocation_type: employee
date_from: '2010-05-20 11:48:00'
date_to: '2010-05-21 11:48:00'
employee_id: 'hr_employee_philgraves0'
+1 -1
View File
@@ -58,7 +58,7 @@
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
# 'test/hr_payroll_report.yml',
# 'test/hr_payroll_report.yml',
],
'demo_xml': [
'hr_payroll_demo.xml'
+17 -134
View File
@@ -32,9 +32,6 @@
<separator string="Description" colspan="2"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
<page string="Contracts" groups="base.group_extended">
<field name="contracts_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
@@ -109,120 +106,6 @@
<field name="medic_exam" select="1" string="Medical Examination"/>
</group>
</page>
<page string="Contracts" groups="base.group_extended">
<field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
<tree string="Contracts">
<field name="name"/>
<field name="job_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="working_hours"/>
<field name="wage_type_id"/>
<field name="wage"/>
</tree>
<form string="Contracts">
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="job_id"/>
<newline/>
<field name="wage"/>
<field name="wage_type_id" widget="selection"/>
<field name="type_id" widget="selection"/>
</group>
<notebook colspan="4">
<page string="Contract Details">
<group col="2" colspan="2">
<separator colspan="2" string="Duration"/>
<field name="date_start" select="1"/>
<field name="date_end" select="1"/>
<field name="working_hours"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Advantages"/>
<field name="struct_id" select="1"/>
<field name="advantages_gross"/>
<field name="advantages_net"/>
<field name="advantages" nolabel="1" colspan="2"/>
</group>
</page>
<page string="Work Permit">
<group col="2" colspan="2">
<separator colspan="2" string="Passport"/>
<field name="passport_id" domain="[('employee_id','=',parent.id)]"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Valid for"/>
<field name="visa_no" attrs="{'required': [('passport_id','!=',False), ]}"/>
<field name="permit_no" attrs="{'required': [('passport_id','!=',False), ]}"/>
<field name="visa_expire" attrs="{'required': [('passport_id','!=',False), ]}"/>
</group>
</page>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="notes" nolabel="1"/>
</notebook>
</form>
</field>
</page>
</xpath>
<xpath expr="/form/notebook/page[@string='Notes']" position="before">
<page string="Salary Structure" groups="base.group_extended">
<group col="10" colspan="4">
<separator string="Salary Computation" colspan="10"/>
<field name="basic"/>
<field name="advantages_gross"/>
<field name="gross"/>
<field name="advantages_net"/>
<field name="net"/>
</group>
<separator string="Employee specific allowances and deductions" colspan="4"/>
<field name="line_ids" nolabel="1" colspan="4" string="Salary Structure">
<tree string="Salary Structure" editable="bottom">
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="sequence" groups="base.group_extended"/>
<field name="name"/>
<field name="code"/>
<field name="type"/>
<field name="amount_type"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)"/>
</tree>
<form string="Payslip Line">
<group col="6" colspan="4">
<field name="name" colspan="4" select="1"/>
<field name="code" select="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Calculations"/>
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<field name="amount_type"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
<field name="sequence" groups="base.group_extended"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Company contribution"/>
<field name="company_contrib"/>
</group>
<notebook colspan="4">
<page string="Function">
<field name="line_ids" colspan="4" nolabel="1" attrs="{'readonly':[('amount_type','!=','func')]}">
<tree string="Function Arguments" editable="bottom">
<field name="name"/>
<field name="sequence" groups="base.group_extended"/>
<field name="from_val"/>
<field name="to_val"/>
<field name="amount_type"/>
<field name="value"/>
</tree>
</field>
</page>
<page string="Description">
<separator colspan="4" string="Description"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</page>
</xpath>
</data>
</field>
@@ -391,23 +274,23 @@
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//group[@name='selection']" position="replace">
<group colspan="2">
<separator string="Validation" colspan="2"/>
<newline/>
<field name="active" />
<newline/>
<field name="double_validation"/>
<newline/>
<field name="limit"/>
</group>
<group colspan="2">
<separator colspan="2" string="Payroll Configurtion"/><newline/>
<field name="type"/><newline/>
<field name="head_id"/><newline/>
<field name="company_id" groups="base.group_multi_company" widget="selection" select="2"/><newline/>
<field name="code" readonly="True"/>
</group>
</xpath>
<group colspan="2">
<separator string="Validation" colspan="2"/>
<newline/>
<field name="active" />
<newline/>
<field name="double_validation"/>
<newline/>
<field name="limit"/>
</group>
<group colspan="2">
<separator colspan="2" string="Payroll Configurtion"/><newline/>
<field name="type"/><newline/>
<field name="head_id"/><newline/>
<field name="company_id" groups="base.group_multi_company" widget="selection" select="2"/><newline/>
<field name="code" readonly="True"/>
</group>
</xpath>
</field>
</record>
<!-- End Holiday Status -->
File diff suppressed because it is too large Load Diff
+21 -19
View File
@@ -1,6 +1,6 @@
-
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
-
-
!python {model: hr.employee}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
@@ -9,7 +9,7 @@
-
Print HR Payslip
-
-
!python {model: hr.payslip}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
@@ -17,23 +17,25 @@
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
-
Print HR Employee Salary Details
Print Employee Salary Statement through wizard
-
!python {model: hr.payslip}: |
import netsvc, tools, os, time
emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]
data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'employee_ids': emp_ids, 'ids':emp_ids }}
(data, format) = netsvc.LocalService('report.employees.salary').create(cr, uid, [], data_dict, {'active_ids': emp_ids})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detail_report.'+format), 'wb+').write(data)
-
Print HR Employee Salary Details Annual basis
-
!python {model: hr.payslip}: |
import netsvc, tools, os, time
emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]
data_dict = {'model': 'hr.payslip', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'salary_on': 'current_month', 'employee_ids': emp_ids, 'ids':emp_ids}}
(data, format) = netsvc.LocalService('report.year.salary').create(cr, uid, [], data_dict,{'active_ids': emp_ids} )
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_yearly_salary_detail_report.'+format), 'wb+').write(data)
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_employees_detail',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
-
Print Salary Register through wizard
-
!python {model: hr.payslip}: |
import time
ctx={}
ctx.update({'model': 'hr.payslip','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_year_salary',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
@@ -59,10 +59,10 @@ class hr_payroll_employees_detail(osv.osv_memory):
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to'], context=context)
res = res and res[0] or {}
datas['form'] = res
datas['ids'] = res.get('employee_ids',[])
return {
'type': 'ir.actions.report.xml',
'report_name': 'employees.salary',
@@ -71,4 +71,4 @@ class hr_payroll_employees_detail(osv.osv_memory):
hr_payroll_employees_detail()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -64,6 +64,7 @@ class hr_payroll_year_salary(osv.osv_memory):
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to', 'salary_on'], context=context)
res = res and res[0] or {}
datas['form'] = res
datas['ids'] = res.get('employee_ids',[])
return {
'type': 'ir.actions.report.xml',
'report_name': 'year.salary',
@@ -72,4 +73,4 @@ class hr_payroll_year_salary(osv.osv_memory):
hr_payroll_year_salary()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -2,40 +2,6 @@
<openerp>
<data>
<record id="hr_hr_employee_view_form2_inherit_2" model="ir.ui.view">
<field name="name">hr.hr.employee.view.form2.inherit_1</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Salary Structure']" position="after">
<page string="Accounting">
<field name="property_bank_account" required="1"/>
<field name="salary_account" required="1"/>
<field name="employee_account" required="1"/>
<field name="analytic_account"/>
<field name="slip_ids" colspan="4" nolabel="1"/>
</page>
</xpath>
</field>
</record>
<record id="hr_hr_employee_view_form2_inherit_1" model="ir.ui.view">
<field name="name">hr.hr.employee.view.form2.inherit</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Salary Structure']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<field name="account_id"/>
<field name="analytic_account_id"/>
</xpath>
<xpath expr="/form/notebook/page[@string='Salary Structure']/field[@name='line_ids']/form/group/field[@name='code']" position="after">
<field name="account_id"/>
<field name="analytic_account_id"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_holiday_status_inherit_form1">
<field name="name">hr.holidays.status.inherit1</field>
@@ -48,7 +48,7 @@
<xsl:template name="story">
<spacer length="1cm" />
<para style="title" t="1">Timesheet</para>
<para style="title" t="1">Timesheet by Employee</para>
<spacer length="1cm" />
<para style="employee"><xsl:value-of select="/report/employee" /></para>
<spacer length="1cm" />
@@ -1,6 +1,7 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_analytic_timesheet","hr.analytic.timesheet","model_hr_analytic_timesheet","base.group_hr_user",1,1,1,1
"access_hr_account_analytic_line","account.account.analytic.line","account.model_account_analytic_line","base.group_hr_user",1,1,1,1
"access_hr_account_analytic_line_employee","account.account.analytic.line employee","account.model_account_analytic_line","base.group_user",1,0,0,0
"access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","base.group_hr_user",1,1,1,1
"access_product_product_user","product.product user","product.model_product_product","base.group_hr_user",1,1,1,1
"access_product_template_hr_timesheet","product.template.hr.timesheet","product.model_product_template","base.group_hr_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_analytic_timesheet hr.analytic.timesheet model_hr_analytic_timesheet base.group_hr_user 1 1 1 1
3 access_hr_account_analytic_line account.account.analytic.line account.model_account_analytic_line base.group_hr_user 1 1 1 1
4 access_hr_account_analytic_line_employee account.account.analytic.line employee account.model_account_analytic_line base.group_user 1 0 0 0
5 access_account_analytic_journal account.account.analytic.journal account.model_account_analytic_journal base.group_hr_user 1 1 1 1
6 access_product_product_user product.product user product.model_product_product base.group_hr_user 1 1 1 1
7 access_product_template_hr_timesheet product.template.hr.timesheet product.model_product_template base.group_hr_user 1 1 1 1
@@ -1,23 +1,21 @@
-
In order to test the PDF reports defined on Employee, we will print Timesheet of a User
Print the HR Timesheet By Employee report through the wizard
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
month = time.gmtime()[1]
year = time.gmtime()[0]
data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'employee_id' : ref('hr.employee1') }}
(data, format) = netsvc.LocalService('report.hr.analytical.timesheet').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-user_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'hr.employee','active_ids': []})
data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_id' : ref('hr.employee1')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_my',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
-
In order to test the PDF reports defined on Employee, we will print Timesheet of Users
Print the HR Timesheet By Employee report through the wizard
-
!python {model: hr.employee}: |
import netsvc, tools, os, time
month = time.gmtime()[1]
year = time.gmtime()[0]
data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'employee_ids' : [ref('hr.employee1')] }}
(data, format) = netsvc.LocalService('report.hr.analytical.timesheet_users').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-users_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'hr.employee','active_ids': []})
data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_ids' : [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')])]}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_users',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
@@ -26,7 +26,7 @@
<form string="Sign In/Out By Project">
<group colspan="4" >
<separator string="Sign in" colspan="4"/>
<field name="name" readonly="True" />
<field name="name" readonly="True" />
<field name="state" readonly="True" />
<field name="server_date"/>
<label string="(local time on the server side)" colspan="2"/>
@@ -64,7 +64,7 @@
<field name="date_start"/>
<field name="server_date"/>
<separator string="Work done in the last period" colspan="4" />
<field name="account_id" colspan="2" groups="analytic.group_analytic_accounting"/>
<field name="account_id" colspan="2"/>
<field name="info" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current_time)" colspan="2"/>
@@ -84,13 +84,12 @@
<field name="type">search</field>
<field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
<field name="arch" type="xml">
<filter name="others" position="after">
<separator orientation="vertical"/>
<field name="date" position="before">
<filter name="to_invoice" string="To Invoice" context="{'to_invoice': 1}" domain="[('invoice_id','=',False),('to_invoice','&lt;&gt;',False)]" icon="terp-dolar"/>
</filter>
<separator orientation="vertical"/>
</field>
</field>
</record>
<record id="view_account_analytic_line_tree_inherit" model="ir.ui.view">
<field name="name">account.analytic.line.tree.to_invoice</field>
@@ -7,14 +7,14 @@
(data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on HR Cost Ledger, we will print report of HR Cost Ledger
Print the HR Cost Ledger report through the wizard
-
!python {model: account.analytic.account}: |
import netsvc, tools, os, time
ctx={}
acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')]
data_dict = {'model': 'ir.ui.menu', 'form': {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}}
(data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, acc_ids, data_dict, {'active_ids': acc_ids})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-cost_ledger_report.'+format), 'wb+').write(data)
ctx.update({'model': 'ir.ui.menu','active_ids': acc_ids})
data_dict = {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_invoice_cost_ledger',wiz_data=data_dict, context=ctx, our_module='hr_timesheet_invoice')
@@ -237,27 +237,23 @@ class hr_timesheet_sheet(osv.osv):
self.write(cr, uid, [sheet.id], {'date_current': sheet.date_to,}, context=context)
return True
def sign_in(self, cr, uid, ids, context=None):
def sign(self, cr, uid, ids, typ, context=None):
emp_obj = self.pool.get('hr.employee')
sheet = self.browse(cr, uid, ids, context=context)[0]
if context is None:
context = {}
if not self.browse(cr, uid, ids, context=context)[0].date_current == time.strftime('%Y-%m-%d'):
if not sheet.date_current == time.strftime('%Y-%m-%d'):
raise osv.except_osv(_('Error !'), _('You can not sign in from an other date than today'))
emp_ids = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
emp_id = sheet.employee_id.id
context['sheet_id']=ids[0]
emp_obj.attendance_action_change(cr, uid, emp_ids, type='sign_in', context=context,)
emp_obj.attendance_action_change(cr, uid, [emp_id], type=typ, context=context,)
return True
def sign_in(self, cr, uid, ids, context=None):
return self.sign(cr,uid,ids,'sign_in',context=None)
def sign_out(self, cr, uid, ids, context=None):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
if not self.browse(cr, uid, ids, context=context)[0].date_current == time.strftime('%Y-%m-%d'):
raise osv.except_osv(_('Error !'), _('You can not sign out from an other date than today'))
emp_ids = emp_obj.search(cr, uid, [('user_id', '=', uid)])
context['sheet_id']=ids[0]
emp_obj.attendance_action_change(cr, uid, emp_ids, type='sign_out', context=context,)
return True
return self.sign(cr,uid,ids,'sign_out',context=None)
_columns = {
'name': fields.char('Description', size=64, select=1,
@@ -178,7 +178,7 @@
</record>
<menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
sequence="2"/>
sequence="2" groups="base.group_hr_user,base.group_hr_manager"/>
<!--
Company inheritancy
@@ -1,6 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_timesheet_sheet_sheet_user","hr_timesheet_sheet.sheet.user","model_hr_timesheet_sheet_sheet","base.group_hr_user",1,1,1,1
"access_hr_timesheet_sheet_sheet_system_user","hr_timesheet_sheet.sheet.system.user","model_hr_timesheet_sheet_sheet","base.group_user",1,0,0,0
"access_hr_timesheet_sheet_sheet_user","hr_timesheet_sheet.sheet.user","model_hr_timesheet_sheet_sheet","base.group_user",1,1,1,1
"access_hr_timesheet_sheet_sheet_system_employee","hr_timesheet_sheet.sheet.system.employee","model_hr_timesheet_sheet_sheet","base.group_user",1,0,0,0
"access_hr_timesheet_sheet_sheet_day","hr_timesheet_sheet.sheet.day","model_hr_timesheet_sheet_sheet_day","base.group_hr_user",1,1,1,1
"access_hr_timesheet_sheet_sheet_account","hr_timesheet_sheet.sheet.account","model_hr_timesheet_sheet_sheet_account","base.group_hr_user",1,1,1,1
"access_hr_timesheet_report","hr.timesheet.report","model_hr_timesheet_report","base.group_hr_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_timesheet_sheet_sheet_user hr_timesheet_sheet.sheet.user model_hr_timesheet_sheet_sheet base.group_hr_user base.group_user 1 1 1 1
3 access_hr_timesheet_sheet_sheet_system_user access_hr_timesheet_sheet_sheet_system_employee hr_timesheet_sheet.sheet.system.user hr_timesheet_sheet.sheet.system.employee model_hr_timesheet_sheet_sheet base.group_user 1 0 0 0
4 access_hr_timesheet_sheet_sheet_day hr_timesheet_sheet.sheet.day model_hr_timesheet_sheet_sheet_day base.group_hr_user 1 1 1 1
5 access_hr_timesheet_sheet_sheet_account hr_timesheet_sheet.sheet.account model_hr_timesheet_sheet_sheet_account base.group_hr_user 1 1 1 1
6 access_hr_timesheet_report hr.timesheet.report model_hr_timesheet_report base.group_hr_manager 1 1 1 1
+4 -4
View File
@@ -2,19 +2,19 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# it under the terms of the GNU 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.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
+47 -47
View File
@@ -2,56 +2,56 @@
<openerp>
<data noupdate="1">
<record id="notax_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">No tax</field>
<field name="amount">0.00</field>
<field name="type">percent</field>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
</record>
<record id="notax_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">No tax</field>
<field name="amount">0.00</field>
<field name="type">percent</field>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
</record>
<record id="gst_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">GST (5.0%)</field>
<field name="code">GST</field>
<field name="amount">0.050000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241000_en"/>
<field name="account_paid_id" ref="chart243000_en"/>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="tax_code_id" ref="vat_code_due_tva_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
<field name="ref_tax_code_id" ref="vat_code_payable_en"/>
</record>
<record id="gst_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">GST (5.0%)</field>
<field name="code">GST</field>
<field name="amount">0.050000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241000_en"/>
<field name="account_paid_id" ref="chart243000_en"/>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="tax_code_id" ref="vat_code_due_tva_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
<field name="ref_tax_code_id" ref="vat_code_payable_en"/>
</record>
<record id="pst_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">PST (7,5%)</field>
<field name="code">PST</field>
<field name="amount">0.075000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart242000_en"/>
<field name="account_paid_id" ref="chart244000_en"/>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="tax_code_id" ref="vat_code_due_tva_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
<field name="ref_tax_code_id" ref="vat_code_payable_en"/>
</record>
<record id="pst_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">PST (7,5%)</field>
<field name="code">PST</field>
<field name="amount">0.075000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart242000_en"/>
<field name="account_paid_id" ref="chart244000_en"/>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="tax_code_id" ref="vat_code_due_tva_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
<field name="ref_tax_code_id" ref="vat_code_payable_en"/>
</record>
<record id="hst_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">HST (13%)</field>
<field name="code">HST</field>
<field name="amount">0.130000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart242000_en"/>
<field name="account_paid_id" ref="chart244000_en"/>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="tax_code_id" ref="vat_code_due_tva_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
<field name="ref_tax_code_id" ref="vat_code_payable_en"/>
</record>
<record id="hst_en" model="account.tax.template">
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
<field name="name">HST (13%)</field>
<field name="code">HST</field>
<field name="amount">0.130000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart242000_en"/>
<field name="account_paid_id" ref="chart244000_en"/>
<field name="base_code_id" ref="vat_code_base_due_en"/>
<field name="tax_code_id" ref="vat_code_due_tva_en"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net_en"/>
<field name="ref_tax_code_id" ref="vat_code_payable_en"/>
</record>
</data>
</openerp>
+77 -48
View File
@@ -2,56 +2,85 @@
<openerp>
<data noupdate="1">
<record id="notax_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">Pas de taxes</field>
<field name="description">Pas de taxes</field>
<field name="amount">0.00</field>
<field name="type">percent</field>
</record>
<record id="tpstvq_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TPS (5%) + TVQ</field>
<field name="description">TPSTVQ</field>
<field name="amount">1</field>
<field name="child_depend">1</field>
<field name="type">percent</field>
</record>
<record id="tvq_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TVQ (7.5%)</field>
<field name="code">TVQ</field>
<field name="amount">0.075000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241200_fr"/>
<field name="account_paid_id" ref="chart242200_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tvq_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tvq_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tvq_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tvq_fr"/>
</record>
<record id="tps_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TPS (5.0%)</field>
<field name="code">TPS</field>
<field name="amount">0.050000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241100_fr"/>
<field name="account_paid_id" ref="chart242100_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tps_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tps_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tps_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tps_fr"/>
<field name="parent_id" ref="tvq_fr"/>
</record>
<record id="tpstvq_tps_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TPS (5%)</field>
<field name="description">TPSTVQ</field>
<field name="amount">0.050000</field>
<field name="type">percent</field>
<field name="sequence">1</field>
<field name="include_base_amount" eval="True"/>
<field name="account_collected_id" ref="chart241100_fr"/>
<field name="account_paid_id" ref="chart242100_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tps_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tps_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tps_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tps_fr"/>
<field name="parent_id" ref="tpstvq_fr"/>
</record>
<record id="tvh_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TVH (13%)</field>
<field name="code">TVH</field>
<field name="amount">0.130000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241300_fr"/>
<field name="account_paid_id" ref="chart242300_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tvh_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tvh_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tvh_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tvh_fr"/>
</record>
</data>
<record id="tvq_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TVQ (8.5%)</field>
<field name="description">TVQ</field>
<field name="amount">0.085000</field>
<field name="type">percent</field>
<field name="sequence">1</field>
<field name="account_collected_id" ref="chart241200_fr"/>
<field name="account_paid_id" ref="chart242200_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tvq_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tvq_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tvq_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tvq_fr"/>
<field name="parent_id" ref="tpstvq_fr"/>
</record>
<record id="tvh_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TVH (13%)</field>
<field name="description">TVH</field>
<field name="amount">0.130000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241300_fr"/>
<field name="account_paid_id" ref="chart242300_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tvh_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tvh_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tvh_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tvh_fr"/>
</record>
<record id="tps_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TPS (5%)</field>
<field name="description">TPS</field>
<field name="amount">0.050000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241100_fr"/>
<field name="account_paid_id" ref="chart242100_fr"/>
<field name="base_code_id" ref="vat_code_base_receivable_tps_fr"/>
<field name="tax_code_id" ref="vat_code_receivable_tps_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tps_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tps_fr"/>
</record>
<record id="notax_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">Pas de taxes</field>
<field name="description">Pas de taxes</field>
<field name="amount">0.00</field>
<field name="type">percent</field>
</record>
</data>
</openerp>
+41 -14
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<!-- Fiscal Position Templates -->
@@ -29,51 +29,78 @@
<record id="fiscal_position_tax_template_1_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_1_fr" />
<field name="tax_src_id" ref="tvq_fr" />
<field name="tax_dest_id" ref="notax_fr" />
<field name="tax_src_id" ref="tpstvq_fr" />
<field name="tax_dest_id" ref="tpstvq_fr" />
</record>
<record id="fiscal_position_tax_template_2_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2_fr" />
<field name="tax_src_id" ref="tvh_fr" />
<field name="tax_dest_id" ref="notax_fr" />
<field name="tax_src_id" ref="tpstvq_fr" />
<field name="tax_dest_id" ref="tvh_fr" />
</record>
<record id="fiscal_position_tax_template_3_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_3_fr" />
<field name="tax_src_id" ref="tps_fr" />
<field name="tax_dest_id" ref="notax_fr" />
<field name="tax_src_id" ref="tpstvq_fr" />
<field name="tax_dest_id" ref="tps_fr" />
</record>
<record id="fiscal_position_tax_template_4_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_4_fr" />
<field name="tax_src_id" ref="notax_fr" />
<field name="tax_src_id" ref="tpstvq_fr" />
<field name="tax_dest_id" ref="notax_fr" />
</record>
<!-- Fiscal Position Account Templates -->
<!-- Fiscal Position Account Templates - Goods -->
<record id="fiscal_position_account_template_1_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_1_fr" />
<field name="account_src_id" ref="chart411110_fr" />
<field name="account_dest_id" ref="chart411110_fr" />
</record>
<record id="fiscal_position_account_template_2_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_2_fr" />
<field name="account_src_id" ref="chart411110_fr" />
<field name="account_dest_id" ref="chart411120_fr" />
</record>
<record id="fiscal_position_account_template_3_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_3_fr" />
<field name="account_src_id" ref="chart411110_fr" />
<field name="account_dest_id" ref="chart411130_fr" />
</record>
<record id="fiscal_position_account_template_4_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_4_fr" />
<field name="account_src_id" ref="chart411110_fr" />
<field name="account_dest_id" ref="chart411140_fr" />
</record>
<!-- Fiscal Position Account Templates - Services -->
<record id="fiscal_position_account_template_1_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_1_fr" />
<field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411210_fr" />
</record>
<record id="fiscal_position_account_template_2_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_2_fr" />
<field name="account_src_id" ref="chart411120_fr" />
<field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411220_fr" />
</record>
<record id="fiscal_position_account_template_3_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_3_fr" />
<field name="account_src_id" ref="chart411130_fr" />
<field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411230_fr" />
</record>
<record id="fiscal_position_account_template_4_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_4_fr" />
<field name="account_src_id" ref="chart411140_fr" />
<field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411240_fr" />
</record>
</data>
</data>
</openerp>
-80
View File
@@ -1,80 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * l10n_in
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 15:28:53+0000\n"
"PO-Revision-Date: 2009-11-25 15:28:53+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_in
#: model:ir.module.module,description:l10n_in.module_meta_information
msgid "\n"
" Indian Accounting : chart of Account\n"
" "
msgstr ""
#. module: l10n_in
#: constraint:account.account.template:0
msgid "Error ! You can not create recursive account templates."
msgstr ""
#. module: l10n_in
#: model:account.journal,name:l10n_in.opening_journal
msgid "Opening Journal"
msgstr ""
#. module: l10n_in
#: model:ir.actions.todo,note:l10n_in.config_call_account_template_in_minimal
msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_in
#: model:account.account.type,name:l10n_in.account_type_liability1
msgid "Liability"
msgstr ""
#. module: l10n_in
#: model:account.account.type,name:l10n_in.account_type_asset1
msgid "Asset"
msgstr ""
#. module: l10n_in
#: model:account.account.type,name:l10n_in.account_type_closed1
msgid "Closed"
msgstr ""
#. module: l10n_in
#: model:account.account.type,name:l10n_in.account_type_income1
msgid "Income"
msgstr ""
#. module: l10n_in
#: constraint:account.tax.code.template:0
msgid "Error ! You can not create recursive Tax Codes."
msgstr ""
#. module: l10n_in
#: model:account.account.type,name:l10n_in.account_type_expense1
msgid "Expense"
msgstr ""
#. module: l10n_in
#: model:ir.module.module,shortdesc:l10n_in.module_meta_information
msgid "Indian Chart of Account"
msgstr ""
#. module: l10n_in
#: model:account.account.type,name:l10n_in.account_type_root_ind1
msgid "View"
msgstr ""
-98
View File
@@ -1,98 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * l10n_ma
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 15:53:51+0000\n"
"PO-Revision-Date: 2009-11-25 15:53:51+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_receivable
msgid "Receivable"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_stocks
msgid "stocks"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_dettes
msgid "dettes long terme"
msgstr ""
#. module: l10n_ma
#: constraint:account.account.template:0
msgid "Error ! You can not create recursive account templates."
msgstr ""
#. module: l10n_ma
#: model:ir.module.module,shortdesc:l10n_ma.module_meta_information
msgid "Maroc Plan comptable général pour les sociétés"
msgstr ""
#. module: l10n_ma
#: model:ir.module.module,description:l10n_ma.module_meta_information
msgid "This is the module to manage the accounting chart for Morocco in Open ERP."
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_tax
msgid "Tax"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_cash
msgid "Cash"
msgstr ""
#. module: l10n_ma
#: model:ir.actions.todo,note:l10n_ma.config_call_account_template_morocco
msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_immobilisations
msgid "immobilisations"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_payable
msgid "Payable"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_asset
msgid "Asset"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_income
msgid "Income"
msgstr ""
#. module: l10n_ma
#: constraint:account.tax.code.template:0
msgid "Error ! You can not create recursive Tax Codes."
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_expense
msgid "Expense"
msgstr ""
#. module: l10n_ma
#: model:account.account.type,name:l10n_ma.account_type_view
msgid "View"
msgstr ""
-347
View File
@@ -1,347 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * lunch
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-26 04:56:11+0000\n"
"PO-Revision-Date: 2009-11-26 04:56:11+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: lunch
#: model:ir.model,name:lunch.model_lunch_category
#: view:lunch.category:0
#: field:lunch.product,category_id:0
msgid "Category"
msgstr ""
#. module: lunch
#: wizard_view:lunch.cashbox.clean,init:0
msgid "Reset cashbox"
msgstr ""
#. module: lunch
#: selection:lunch.order,state:0
msgid "Confirmed"
msgstr ""
#. module: lunch
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: lunch
#: model:ir.model,name:lunch.model_lunch_cashmove
msgid "lunch.cashmove"
msgstr ""
#. module: lunch
#: wizard_view:lunch.order.cancel,init:0
msgid "Are you sure you want to cancel this order ?"
msgstr ""
#. module: lunch
#: model:ir.module.module,shortdesc:lunch.module_meta_information
msgid "Lunch Module"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_cashmove_form
msgid "Cash Moves"
msgstr ""
#. module: lunch
#: rml:lunch.order:0
msgid "Printed at :"
msgstr ""
#. module: lunch
#: model:ir.model,name:lunch.model_lunch_product
msgid "lunch.product"
msgstr ""
#. module: lunch
#: wizard_view:lunch.cashbox.clean,init:0
msgid "Are you sure you want to reset this cashbox ?"
msgstr ""
#. module: lunch
#: field:lunch.order,state:0
msgid "State"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_cashbox_form
#: view:lunch.cashbox:0
msgid "CashBox"
msgstr ""
#. module: lunch
#: selection:lunch.order,state:0
msgid "Draft"
msgstr ""
#. module: lunch
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: lunch
#: field:lunch.cashmove,user_cashmove:0
#: field:lunch.order,user_id:0
#: field:report.lunch.amount,user_id:0
msgid "User Name"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_report_amount_tree
#: view:report.lunch.amount:0
msgid "Box Amount by User"
msgstr ""
#. module: lunch
#: view:report.lunch.amount:0
msgid "Total box"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_lunch_product_form
#: field:lunch.order,product:0
msgid "Product"
msgstr ""
#. module: lunch
#: rml:lunch.order:0
#: field:lunch.product,description:0
msgid "Description"
msgstr ""
#. module: lunch
#: field:lunch.order,price:0
#: field:lunch.product,price:0
msgid "Price"
msgstr ""
#. module: lunch
#: wizard_button:lunch.order.cancel,init,end:0
msgid "No"
msgstr ""
#. module: lunch
#: view:lunch.category:0
#: rml:lunch.order:0
#: view:lunch.order:0
msgid "Order"
msgstr ""
#. module: lunch
#: field:lunch.cashmove,create_date:0
msgid "Created date"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch
msgid "Lunch"
msgstr ""
#. module: lunch
#: field:lunch.order,descript:0
msgid "Description Order"
msgstr ""
#. module: lunch
#: model:ir.actions.wizard,name:lunch.lunch_order_confirm
#: wizard_button:lunch.order.confirm,init,go:0
msgid "Confirm Order"
msgstr ""
#. module: lunch
#: wizard_view:lunch.order.confirm,init:0
msgid "Orders Confirmation"
msgstr ""
#. module: lunch
#: field:lunch.cashmove,active:0
#: field:lunch.product,active:0
msgid "Active"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_lunch_order_day_form
msgid " Order of the day"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_category_root
msgid "Configuration"
msgstr ""
#. module: lunch
#: model:ir.actions.wizard,name:lunch.wizard_id_cancel
#: wizard_view:lunch.order.cancel,init:0
msgid "Cancel Order"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_lunch_cashbox_form
msgid " CashBox "
msgstr ""
#. module: lunch
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_report_lunch_amount_tree
msgid "Lunch amount"
msgstr ""
#. module: lunch
#: field:lunch.cashbox,name:0
#: field:lunch.cashmove,name:0
#: field:lunch.category,name:0
#: rml:lunch.order:0
#: field:lunch.product,name:0
msgid "Name"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_lunch_category_form
msgid " Category of product "
msgstr ""
#. module: lunch
#: view:lunch.cashmove:0
msgid "Total amount"
msgstr ""
#. module: lunch
#: model:ir.model,name:lunch.model_lunch_cashbox
msgid "lunch.cashbox"
msgstr ""
#. module: lunch
#: field:lunch.order,date:0
msgid "Date"
msgstr ""
#. module: lunch
#: field:lunch.cashmove,amount:0
#: field:report.lunch.amount,amount:0
msgid "Amount"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_product_form
#: view:lunch.product:0
msgid "Products"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_category_form
msgid "Category of product"
msgstr ""
#. module: lunch
#: model:ir.actions.report.xml,name:lunch.report_lunch_order
msgid "Print Order"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_lunch_order_day_form
msgid "Order of the day"
msgstr ""
#. module: lunch
#: model:ir.model,name:lunch.model_report_lunch_amount
msgid "Amount available by user and box"
msgstr ""
#. module: lunch
#: view:lunch.category:0
msgid "Category related to Products"
msgstr ""
#. module: lunch
#: model:ir.model,name:lunch.model_lunch_order
msgid "lunch.order"
msgstr ""
#. module: lunch
#: field:lunch.cashbox,sum_remain:0
msgid "Remained Total"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_lunch_order_form
#: model:ir.ui.menu,name:lunch.menu_lunch_order_form
msgid "Make order"
msgstr ""
#. module: lunch
#: model:ir.actions.wizard,name:lunch.wizard_clean_cashbox
msgid "Set CashBox to Zero"
msgstr ""
#. module: lunch
#: field:lunch.cashmove,box:0
#: field:report.lunch.amount,box:0
msgid "Box Name"
msgstr ""
#. module: lunch
#: field:lunch.cashbox,manager:0
msgid "Manager"
msgstr ""
#. module: lunch
#: rml:lunch.order:0
msgid "Unit Price"
msgstr ""
#. module: lunch
#: wizard_field:lunch.order.confirm,init,confirm_cashbox:0
msgid "Name of box"
msgstr ""
#. module: lunch
#: view:lunch.order:0
msgid "Total price"
msgstr ""
#. module: lunch
#: wizard_button:lunch.cashbox.clean,init,end:0
#: wizard_button:lunch.order.confirm,init,end:0
msgid "Cancel"
msgstr ""
#. module: lunch
#: wizard_button:lunch.cashbox.clean,init,zero:0
msgid "Set to Zero"
msgstr ""
#. module: lunch
#: wizard_button:lunch.order.cancel,init,cancel:0
msgid "Yes"
msgstr ""
#. module: lunch
#: model:ir.ui.menu,name:lunch.menu_tools
msgid "Tools"
msgstr ""
#. module: lunch
#: model:ir.actions.act_window,name:lunch.action_lunch_cashmove_form
#: view:lunch.cashmove:0
#: field:lunch.order,cashmove:0
msgid "CashMove"
msgstr ""
+2 -2
View File
@@ -164,7 +164,7 @@
</blockTable>
</section>
</section>
<blockTable colWidths="421.0,44.0,63.0" style="Table2">
<blockTable colWidths="409.0,50.0,70.0" style="Table2">
<tr>
<td>
<para style="terp_default_8">
@@ -184,4 +184,4 @@
</para>
</pto>
</story>
</document>
</document>
+3 -2
View File
@@ -114,6 +114,7 @@
parent="menu_mrp_property"/>
<menuitem
action="mrp_property_group_action"
parent="menu_mrp_property"
id="menu_mrp_property_group_action"/>
<!--
@@ -726,7 +727,7 @@
<field name="arch" type="xml">
<search string="Search Production">
<group col='9' colspan='4'>
<filter icon="terp-camera_test" string="Ready"
<filter icon="terp-camera_test" string="Ready" name="ready"
domain="[('state','=','ready')]"
help="Non confirmed manufacturing orders"/>
<filter icon="terp-check" string="Current" name="current"
@@ -763,7 +764,7 @@
<field name="view_mode">tree,form,calendar,graph,gantt</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{'search_default_current':1}</field>
<field name="context">{'search_default_ready':1}</field>
<field name="help">Manufacturing Orders are usually proposed automatically by OpenERP based on the bill of materials and the procurement rules, but you can also create manufacturing orders manually. OpenERP will handle the consumption of the raw materials (stock decrease) and the production of the finished products (stock increase) when the order is processed.</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action"
+2 -2
View File
@@ -129,7 +129,7 @@ class report_custom(report_rml):
<col t='yes'>%s</col>
<col t='yes'>%s</col>
</row>
""" % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom'))
""" % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom'))
purchase_price_digits = rml_obj.get_digits(dp='Purchase Price')
@@ -176,7 +176,7 @@ class report_custom(report_rml):
xml += "<lines style='lines'>" + xml_tmp + '</lines>'
xml += """<lines style='sub_total'> <row>
<col> """ + _('Component Cost of ') + str(number) +' '+ product.uom_id.name + """: </col>
<col> """ + _('Components Cost of ') + str(number) +' '+ product.uom_id.name + """: </col>
<col/>
<col t='yes'/>
<col t='yes'>"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
+13 -10
View File
@@ -17,19 +17,22 @@
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a MRP, we will print Product Price Report
Print Product Price Report through the wizard
-
!python {model: product.product}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [1,2,3,5], {'model':'product.product', 'form':{'number': 1}}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-product_price_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'product.product','active_ids': [1,2,3,5]})
data_dict = {'number': 1}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_view_mrp_product_price_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')
-
In order to test the PDF reports defined on a MRP, we will print Workcenter Load Report
Print Work Center Load Report through the wizard
-
!python {model: mrp.workcenter}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.mrp.workcenter.load').create(cr, uid, [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')], {'model':'mrp.workcenter', 'form':{'time_unit': 'day', 'measure_unit': 'hours'}}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-workcenter_load_report.'+format), 'wb+').write(data)
ctx={}
ctx.update({'model': 'mrp.workcenter','active_ids': [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')]})
data_dict = {'time_unit': 'day', 'measure_unit': 'hours'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_mrp_workcenter_load_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')
+3 -3
View File
@@ -199,7 +199,7 @@
</para>
</td>
<td>
<para style="terp_default_9">Net Total </para>
<para style="terp_default_9">Net Total :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]] [[o.pricelist_id.currency_id.symbol ]]</para>
@@ -212,7 +212,7 @@
</para>
</td>
<td>
<para style="terp_default_9">Taxes</para>
<para style="terp_default_9">Taxes :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]]</para>
@@ -236,4 +236,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>
@@ -51,22 +51,29 @@
(data, format) = netsvc.LocalService('report.pos.receipt.without.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 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
Print the POS Payment Report through the wizard
-
!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')] }}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos sales lines report'+format), 'wb+').write(data)
import time
ctx={}
ctx.update({'model': 'ir.ui.menu','active_ids': []})
data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [(6,0,[ref('base.user_root')])] }
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_report_pos_payment_repport_date',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details Report
Print the POS Details Report through the wizard
-
!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') }}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos details report'+format), 'wb+').write(data)
import time
ctx={}
ctx.update({'model': 'ir.ui.menu','active_ids': []})
data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
-
I create a cash journal.
-
@@ -51,6 +51,8 @@ class pos_details(osv.osv_memory):
res = self.read(cr, uid, ids, ['date_start', 'date_end'], context=context)
res = res and res[0] or {}
datas['form'] = res
if res.get('id',False):
datas['ids']=[res['id']]
return {
'type': 'ir.actions.report.xml',
'report_name': 'pos.details',
@@ -44,7 +44,8 @@ class pos_payment_report_date(osv.osv_memory):
res = self.read(cr, uid, ids, ['date_start', 'date_end', 'user_id'], context=context)
res = res and res[0] or {}
datas['form'] = res
if res.get('id',False):
datas['ids']=[res['id']]
return {
'type': 'ir.actions.report.xml',
'report_name': 'pos.payment.report.date',
@@ -47,7 +47,6 @@ class pos_sales_user_today(osv.osv_memory):
res = self.read(cr, uid, ids, ['user_id'], context=context)
res = res and res[0] or {}
datas['form'] = res
return {
'type': 'ir.actions.report.xml',
'report_name': 'pos.sales.user.today',
+1 -1
View File
@@ -272,7 +272,7 @@
<menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
<menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
<menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5" groups="base.group_extended"/>
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
<menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="menu_stock_procurement" sequence="10"/>
</data>
+10 -11
View File
@@ -1,17 +1,16 @@
-
In order to test the PDF reports defined on Products, we will print a Products Pricelists Report
-
Print the Products Pricelists Report through the wizard
-
!python {model: product.product}: |
import netsvc, tools, os
data_dict = {'model': 'product.product'}
data_dict['form'] = {
'qty1': 1,
ctx={}
ctx.update({'model': 'product.product','active_ids': [ref('product.product_product_pc1'), ref('product.product_product_pc3')]})
data_dict = {'qty1': 1,
'qty2': 5,
'qty3': 10,
'qty4': 0,
'qty5': 0,
'price_list':ref('product.list0')
}
(data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'product-product_pricelist'+format), 'wb+').write(data)
'price_list':ref('product.list0')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_product_price_list',wiz_data=data_dict, context=ctx, our_module='product')
-91
View File
@@ -1,91 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * product_manufacturer
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-08-13 06:18:00+0000\n"
"PO-Revision-Date: 2010-08-13 06:18:00+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: product_manufacturer
#: model:ir.module.module,description:product_manufacturer.module_meta_information
msgid "A module that add manufacturers and attributes on the product form"
msgstr ""
#. module: product_manufacturer
#: field:product.product,manufacturer_pref:0
msgid "Manufacturer Product Code"
msgstr ""
#. module: product_manufacturer
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: product_manufacturer
#: view:product.manufacturer.attribute:0
msgid "Product Template Name"
msgstr ""
#. module: product_manufacturer
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: product_manufacturer
#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
msgid "Product attributes"
msgstr ""
#. module: product_manufacturer
#: view:product.manufacturer.attribute:0
#: view:product.product:0
msgid "Product Attributes"
msgstr ""
#. module: product_manufacturer
#: field:product.manufacturer.attribute,name:0
msgid "Attribute"
msgstr ""
#. module: product_manufacturer
#: model:ir.model,name:product_manufacturer.model_product_product
#: field:product.manufacturer.attribute,product_id:0
msgid "Product"
msgstr ""
#. module: product_manufacturer
#: field:product.manufacturer.attribute,value:0
msgid "Value"
msgstr ""
#. module: product_manufacturer
#: view:product.product:0
#: field:product.product,attribute_ids:0
msgid "Attributes"
msgstr ""
#. module: product_manufacturer
#: model:ir.module.module,shortdesc:product_manufacturer.module_meta_information
msgid "Products Attributes & Manufacturers"
msgstr ""
#. module: product_manufacturer
#: field:product.product,manufacturer_pname:0
msgid "Manufacturer Product Name"
msgstr ""
#. module: product_manufacturer
#: view:product.product:0
#: field:product.product,manufacturer:0
msgid "Manufacturer"
msgstr ""
@@ -1,52 +0,0 @@
# translation of fr_FR.po to Français
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * product_visible_discount
#
# Numerigraphe <informatique@numerigraphe.com>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: fr_FR\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-03-25 12:11:15+0000\n"
"PO-Revision-Date: 2009-03-25 13:17+0100\n"
"Last-Translator: Numerigraphe <informatique@numerigraphe.com>\n"
"Language-Team: Français\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: KBabel 1.11.4\n"
#. module: product_visible_discount
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML non valide pour l'architecture de la vue"
#. module: product_visible_discount
#: model:ir.module.module,description:product_visible_discount.module_name_translation
msgid ""
"\n"
" This module lets you calculate discounts on Sale Order lines and Invoice lines base on the partner's pricelist.\n"
" To this end, a new check box named \"Visible Discount\" is added to the pricelist form.\n"
" Example:\n"
" For the product PC1 and the partner \"Asustek\": if listprice=450, and the price calculated using Asustek's pricelist is 225\n"
" If the check box is checked, we will have on the sale order line: Unit price=450, Discount=50,00, Net price=225\n"
" If the check box is unchecked, we will have on Sale Order and Invoice lines: Unit price=225, Discount=0,00, Net price=225\n"
" "
msgstr ""
"\n"
" Ce module vous permet de calculer les remises sur les lignes de Commande et de Facture en se basant sur la liste de prix du partenaire.\n"
" Pour cela, une nouvelle case à cocher \"Remise visible\" est ajoutée au formulaire \"Liste de prix\".\n"
" Par exemple :\n"
" Pour le produit PC1 et le partenaire \"Asustek\" : si le prix public=450, et le prix prix calculé en utilisant la liste de prix d'Asustek est 225\n"
" Si la case est cochée, on aura sur la ligne de commande : Prix unitaire=450, Remise=50,00, Prix net=225\n"
" Si la case N'EST PAS est cochée, on aura sur la ligne de commande : Prix unitaire=225, Remise=0,00, Prix net=225\n"
" "
#. module: product_visible_discount
#: model:ir.module.module,shortdesc:product_visible_discount.module_name_translation
#: field:product.pricelist,visible_discount:0
msgid "Visible Discount"
msgstr "Remise visible"
+1 -1
View File
@@ -42,7 +42,6 @@
<group col="2" colspan="2" name="misc">
<separator colspan="2" string="Miscelleanous"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection" required="1"/>
<field name="currency_id" select="1" groups="base.group_multi_company" required="1"/>
<field name="warn_manager"/>
</group>
<newline/>
@@ -74,6 +73,7 @@
<field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer"/>
<field domain="[('partner_id','=',partner_id)]" name="contact_id" string="Invoice Address"/>
<field name="warn_customer"/>
<field name="currency_id" select="1" groups="base.group_multi_company" required="1"/>
<newline/>
<group colspan="4" col="4" groups="base.group_extended">
<separator colspan="2" string="Mail Header"/>
@@ -219,6 +219,8 @@
<field name="project_id" on_change="onchange_project(project_id)"/>
<field name="responsible_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="duration"/>
<field name="state"/>
</tree>
</field>
@@ -268,6 +270,7 @@
</field>
<field name="responsible_id"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20" groups="base.group_extended">
+115 -111
View File
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="HR Planning" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<document filename="HR Planning.pdf">
<template pageSize="(595.0,842.0)" title="HR Planning" 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"/>
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
</pageTemplate>
</template>
<stylesheet>
@@ -15,7 +15,6 @@
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#808080" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#808080" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#808080" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
@@ -24,17 +23,21 @@
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@@ -42,33 +45,24 @@
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica"/>
<paraStyle name="P2" fontName="Helvetica" alignment="RIGHT"/>
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="11.0" leading="14"/>
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="CENTER"/>
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="14.0" leading="17"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="14"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="11.0" leading="14"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="16.0" leading="20" alignment="CENTER"/>
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="20.0" leading="25" alignment="CENTER"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P12" fontName="Helvetica" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
@@ -77,139 +71,149 @@
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10"/>
<paraStyle name="terp_header_center" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER"/>
<paraStyle name="terp_default_8_center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="terp_default_9_right" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="terp_default_12_center_bold" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="terp_tbl_header" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
<paraStyle name="terp_tbl_header_center" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="terp_tbl_header_right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="terp_default_9_center" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3"/>
<images/>
</stylesheet>
<story>
<para style="P1">[[ repeatIn(objects, 'o') ]]</para>
<para style="P1">
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="P1">
<para style="terp_header_center">HR Planning</para>
<para style="terp_default_8_center">[[ o.name]]</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="P10">HR Planning</para>
<para style="Standard">
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="149.0,192.0,141.0" repeatRows="1" style="Table1">
<blockTable colWidths="227.0,312.0" repeatRows="1" style="Table1">
<tr>
<td>
<para style="P1"><font face="Helvetica">Responsible</font>: [[ o.user_id.name ]]</para>
<para style="terp_default_9"><font fontName="Helvetica-Bold">Responsible : </font>[[ o.user_id.name ]]</para>
</td>
<td>
<para style="P11">[[ o.name]]</para>
</td>
<td>
<para style="P2"><font face="Helvetica">From</font>: [[ formatLang(o.date_from,date=True) ]]</para>
<para style="P2"><font face="Helvetica">To</font>: [[ formatLang(o.date_to,date=True) ]]</para>
<para style="terp_default_9_right"><font fontName="Helvetica-Bold">From :</font> [[ formatLang(o.date_from,date=True) ]] <font fontName="Helvetica-Bold"> To : </font>[[ formatLang(o.date_to,date=True) ]]</para>
</td>
</tr>
</blockTable>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" style="Table6">
<blockTable colWidths="539.0" style="Table6">
<tr>
<td>
<para style="P9">Summary by user</para>
<para style="P9">
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_12_center_bold">Summary by user</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="104.0,101.0,113.0,100.0,63.0" style="Table3">
<blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table3">
<tr>
<td>
<para style="P7">User</para>
<para style="terp_tbl_header">User</para>
</td>
<td>
<para style="P7">Total Planned Tasks</para>
<para style="terp_tbl_header_center">Total planned tasks</para>
</td>
<td>
<para style="P7">Remaining tasks</para>
<para style="terp_tbl_header_center">Remaining tasks</para>
</td>
<td>
<para style="P7">Time without</para>
<para style="P7">tasks</para>
<para style="terp_tbl_header_center">Time without tasks</para>
</td>
<td>
<para style="P8">Timesheet</para>
</td>
</tr>
<tr>
<td>
<para style="P6">[[ repeatIn(o.planning_user_ids , 'u') ]] [[ u.user_id.name ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.plan_tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.free) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.timesheet) ]]</para>
<para style="terp_tbl_header_center">Timesheet</para>
</td>
</tr>
</blockTable>
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" style="Table5">
<section>
<para style="terp_default_8">[[ repeatIn(o.planning_user_ids , 'u') ]]</para>
<blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table8">
<tr>
<td>
<para style="terp_default_9">[[ u.user_id.name ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.plan_tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.free) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.timesheet) ]]</para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="539.0" style="Table5">
<tr>
<td>
<para style="P9">Summary by project</para>
<para style="P9">
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_12_center_bold">Summary by project</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="104.0,103.0,112.0,101.0,63.0" style="Table4">
<blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table4">
<tr>
<td>
<para style="P13">Project</para>
<para style="terp_tbl_header">Project</para>
</td>
<td>
<para style="P7">Total Planned Tasks</para>
<para style="terp_tbl_header_center">Total planned tasks</para>
</td>
<td>
<para style="P7">Remaining tasks</para>
<para style="terp_tbl_header_center">Remaining tasks</para>
</td>
<td>
<para style="P7">Time without</para>
<para style="P7">tasks</para>
<para style="terp_tbl_header_center">Time without tasks</para>
</td>
<td>
<para style="P8">Timesheet</para>
</td>
</tr>
<tr>
<td>
<para style="P12"><font face="Helvetica" size="11.0">[[ repeatIn(o.planning_account , 'l') ]] </font>[ [[ l.account_id.code ]] ] [[ l.account_id.name ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.plan_tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.plan_open) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.timesheet) ]]</para>
<para style="terp_tbl_header_center">Timesheet</para>
</td>
</tr>
</blockTable>
<para style="P3">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn(o.planning_account , 'l') ]] </para>
<blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table2">
<tr>
<td>
<para style="terp_default_9">[ [[ l.account_id.code ]] ] [[ l.account_id.name ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.plan_tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.plan_open) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.timesheet) ]]</para>
</td>
</tr>
</blockTable>
</section>
</story>
</document>
</document>
@@ -19,7 +19,7 @@
</field>
</record>
<record id="project_invoice_form_cutomer" model="ir.ui.view">
<record id="project_invoice_form_cutomer" model="ir.ui.view">
<field name="name">Inherit project form : Customer</field>
<field name="model">project.project</field>
<field name="type">form</field>
@@ -53,7 +53,7 @@
<field name="account_id" string="Project" />
</field>
</field>
</record>
</record>
<record id="view_account_analytic_line_form_inherit_account_id" model="ir.ui.view">
<field name="name">account.analytic.line.form.account_id</field>
<field name="model">account.analytic.line</field>
@@ -76,42 +76,8 @@
</field>
</field>
</record>
<record id="view_account_analytic_line_filter_inherit_buttons" model="ir.ui.view">
<field name="name">account.analytic.line.inherit.select</field>
<field name="model">account.analytic.line</field>
<field name="type">search</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<search string="Search Analytic Lines">
<group col='6' colspan='4'>
<field name="name"/>
<field name="date"/>
<field name="account_id"/>
<field name="user_id">
<filter string="My Entries" domain="[('user_id','=',uid)]" icon="terp-personal"/>
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters...">
<field name="journal_id" widget="selection"/>
<field name="product_id" widget="selection"/>
<field name="amount" select="1"/>
</group>
<newline/>
<group string="Group By..." expand="0">
<filter string="Account" context="{'group_by':'account_id'}" groups="base.group_extended" icon="terp-folder-green"/>
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
<separator orientation="vertical"/>
<filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
<separator orientation="vertical"/>
<filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
</group>
</search>
</field>
</record>
<!-- Menus -->
<!-- Menus -->
<record id="action_project_timesheet_bill_task" model="ir.actions.act_window">
<field name="name">Bill Tasks Works</field>
<field name="res_model">account.analytic.line</field>
@@ -119,11 +85,10 @@
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
<field name="search_view_id" ref="view_account_analytic_line_filter_inherit_buttons"/>
<field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
<field name="help">This lists show you every task work you can invoice to the customer. Select the lines in order to generate the invoices automatically.</field>
</record>
<menuitem action="hr_timesheet.action_hr_timesheet_sign_in"
<menuitem action="hr_timesheet.action_hr_timesheet_sign_in"
id="menu_hr_timesheet_sign_in"
groups="base.group_extended"
parent="hr_attendance.menu_hr_attendance"
+1
View File
@@ -9,6 +9,7 @@
parent="base.menu_purchase_root" sequence="1" />
<menuitem id="menu_purchase_config_purchase" name="Configuration"
groups="group_purchase_manager"
parent="base.menu_purchase_root" sequence="100"/>
<menuitem
+18 -18
View File
@@ -131,25 +131,25 @@
<story>
<pto>
<pto_header>
<blockTable colWidths="180.0,85.0,71.0,71.0,57.0,71.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr>
<td>
<para style="terp_tblheader_Details">Description</para>
<para style="terp_tblheader_General">Description</para>
</td>
<td>
<para style="terp_tblheader_Details">Taxes</para>
<para style="terp_tblheader_General">Taxes</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Date Req.</para>
<para style="terp_tblheader_General">Date Req.</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Qty</para>
<para style="terp_tblheader_General_Right">Qty</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Unit Price</para>
<para style="terp_tblheader_General_Right">Unit Price</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Net Price</para>
<para style="terp_tblheader_General_Right">Net Price</para>
</td>
</tr>
</blockTable>
@@ -251,31 +251,31 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="180.0,85.0,71.0,71.0,57.0,71.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr>
<td>
<para style="terp_tblheader_Details">Description</para>
<para style="terp_tblheader_General">Description</para>
</td>
<td>
<para style="terp_tblheader_Details">Taxes</para>
<para style="terp_tblheader_General">Taxes</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Date Req.</para>
<para style="terp_tblheader_General">Date Req.</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Qty</para>
<para style="terp_tblheader_General_Right">Qty</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Unit Price</para>
<para style="terp_tblheader_General_Right">Unit Price</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Net Price</para>
<para style="terp_tblheader_General_Right">Net Price</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_8">[[repeatIn(o.order_line,'line')]]</para>
<blockTable colWidths="179.0,85.0,71.0,71.0,57.0,71.0" style="Table_Order_Pur_line_Content">
<blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" style="Table_Order_Pur_line_Content">
<tr>
<td>
<para style="terp_default_9">[[ line.name ]]</para>
@@ -284,7 +284,7 @@
<para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ formatLang( line.date_planned, date=True) ]]</para>
<para style="terp_default_9">[[ formatLang( line.date_planned, date=True) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para>
@@ -328,7 +328,7 @@
</tr>
</blockTable>
</section>
<blockTable colWidths="394.0,55.0,85.0" style="Table_All_Total_Detail">
<blockTable colWidths="375.0,60.0,100.0" style="Table_All_Total_Detail">
<tr>
<td>
<para style="terp_default_9">
@@ -384,4 +384,4 @@
</para>
</pto>
</story>
</document>
</document>
-134
View File
@@ -1,134 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * purchase_requisition
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-25 14:07:40+0000\n"
"PO-Revision-Date: 2009-11-25 14:07:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: purchase_requisition
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML incorrect pour l'Architecture des Vues!"
#. module: purchase_requisition
#: field:purchase.requisition,date_end:0
msgid "Date End"
msgstr "Date de fin"
#. module: purchase_requisition
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr "Le nom de l'Objet doit commencer par x_ et ne pas comporter de caractères spéciaux !"
#. module: purchase_requisition
#: view:purchase.requisition:0
#: field:purchase.requisition,description:0
msgid "Description"
msgstr "Description"
#. module: purchase_requisition
#: model:ir.model,name:purchase_requisition.model_purchase_requisition
#: field:purchase.order,requisition_id:0
#: view:purchase.requisition:0
msgid "Purchase requisition"
msgstr "Appel d'Offre"
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition
#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition1
#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition
msgid "Purchase requisitions"
msgstr "Appels d'offre"
#. module: purchase_requisition
#: selection:purchase.requisition,state:0
msgid "Open"
msgstr "Ouvert"
#. module: purchase_requisition
#: field:purchase.requisition,user_id:0
msgid "Responsible"
msgstr "Responsable"
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition_draft
#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition1_draft
msgid "Draft Purchase requisitions"
msgstr "Appels d'Offre brouillons"
#. module: purchase_requisition
#: field:purchase.requisition,state:0
msgid "State"
msgstr "Etat"
#. module: purchase_requisition
#: selection:purchase.requisition,state:0
msgid "Draft"
msgstr "Brouillon"
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition_open
#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition1_open
msgid "Open Purchase requisitions"
msgstr "Appels d'offre ouverts"
#. module: purchase_requisition
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom de modèle incorrect pour la définition de l'action"
#. module: purchase_requisition
#: model:ir.module.module,shortdesc:purchase_requisition.module_meta_information
msgid "Purchase - Purchase requisition"
msgstr "Achat - Appel d'offre"
#. module: purchase_requisition
#: field:purchase.requisition,name:0
msgid "requisition Reference"
msgstr "Référence"
#. module: purchase_requisition
#: selection:purchase.requisition,state:0
msgid "Close"
msgstr "Clôturé"
#. module: purchase_requisition
#: field:purchase.requisition,date_start:0
msgid "Date Start"
msgstr "Date de début"
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Quotations"
msgstr ""
#. module: purchase_requisition
#: model:ir.module.module,description:purchase_requisition.module_meta_information
msgid " This module allows you to manage your Purchase requisitions. When a purchase order is created, you now have the opportunity to save the related requisition. \n"
" This new object will regroup and will allow you to easily keep track and order all your purchase orders.\n"
""
msgstr "Ce module vous permet de gérer des appels d'offre. Quand un appel d'offre est créé, vous avez maintenant l'opportunité de conserver une trace. \n"
" Ce nouvel objet regroupe et conserve la trace de tous vos appels d'offre.\n"
""
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition_new
#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition1_new
msgid "New Purchase requisitions"
msgstr "Nouveaux Appels d'Offre"
#. module: purchase_requisition
#: field:purchase.requisition,purchase_ids:0
msgid "Purchase Orders"
msgstr "Bons d'achat"
+2 -2
View File
@@ -10,7 +10,7 @@
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales Manager Dashboard">
<form string="Sales Dashboard">
<hpaned position="100">
<child1>
<action name="%(sale.action_quotation_for_sale)d" string="Quotations"/>
@@ -27,7 +27,7 @@
</record>
<record id="open_board_sales_manager" model="ir.actions.act_window">
<field name="name">Sales Manager Dashboard</field>
<field name="name">Sales Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>

Some files were not shown because too many files have changed in this diff Show More