Merge with addons

bzr revid: ruchakpatel@gmail.com-20081013065847-ffnjkovsr3zuxif1
This commit is contained in:
Rucha Patel 2008-10-13 12:28:47 +05:30
commit d9b94525f2
142 changed files with 7538 additions and 4435 deletions

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>addons</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>new-report-apa</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.4</pydev_property>
</pydev_project>

View File

@ -29,7 +29,7 @@
{
"name" : "Accounting and financial management",
"version" : "1.0",
"depends" : ["product", "base"],
"depends" : ["product", "base", "process"],
"author" : "Tiny",
"description": """Financial and accounting module that covers:
General accounting
@ -66,6 +66,8 @@
"project/project_report.xml",
"product_view.xml",
"account_assert_test.xml",
"process/invoice_process.xml",
"process/statement_process.xml"
],
"translations" : {
"fr": "i18n/french_fr.csv"

View File

@ -67,8 +67,10 @@ class account_payment_term(osv.osv):
amt = round(amount, 2)
if amt:
next_date = mx.DateTime.strptime(date_ref, '%Y-%m-%d') + RelativeDateTime(days=line.days)
if line.condition == 'end of month':
next_date += RelativeDateTime(day=-1)
if line.days2<0:
next_date += RelativeDateTime(day=line.days2)
if line.days2>0:
next_date += RelativeDateTime(day=line.days2, months=1)
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
amount -= amt
return result
@ -83,14 +85,14 @@ class account_payment_term_line(osv.osv):
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the payment term lines from the lowest sequences to the higher ones"),
'value': fields.selection([('procent','Percent'),('balance','Balance'),('fixed','Fixed Amount')], 'Value',required=True),
'value_amount': fields.float('Value Amount'),
'days': fields.integer('Number of Days',required=True),
'condition': fields.selection([('net days','Net Days'),('end of month','End of Month')], 'Condition', required=True, help="The payment delay condition id a number of days expressed in 2 ways: net days or end of the month. The 'net days' condition implies that the paiment arrive after 'Number of Days' calendar days. The 'end of the month' condition requires that the paiement arrives before the end of the month that is that is after 'Number of Days' calendar days."),
'days': fields.integer('Number of Days',required=True, help="Number of days to add before computation of the day of month."),
'days2': fields.integer('Day of the Month',required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month."),
'payment_id': fields.many2one('account.payment.term','Payment Term', required=True, select=True),
}
_defaults = {
'value': lambda *a: 'balance',
'sequence': lambda *a: 5,
'condition': lambda *a: 'net days',
'days2': lambda *a: 0,
}
_order = "sequence"
account_payment_term_line()
@ -1119,8 +1121,8 @@ class account_tax(osv.osv):
# Same fields for refund invoices
'ref_base_code_id': fields.many2one('account.tax.code', 'Base Code', help="Use this code for the VAT declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="Use this code for the VAT declaration."),
'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the VAT declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the VAT declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usualy 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usualy 1 or -1."),
'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes"),
@ -1779,8 +1781,8 @@ class account_tax_template(osv.osv):
# Same fields for refund invoices
'ref_base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the VAT declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the VAT declaration."),
'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the VAT declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the VAT declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes."),

View File

@ -187,8 +187,8 @@
<field name="state" select="2"/>
<field name="residual"/>
<group col="3" colspan="4">
<button name="invoice_open" states="draft,proforma" string="Validate"/>
<button name="invoice_cancel" states="draft,proforma,sale,open" string="Cancel"/>
<button name="invoice_open" states="draft,proforma2" string="Validate"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid'/>
</group>
@ -269,9 +269,9 @@
<field name="state" select="2"/>
<field name="residual"/>
<group col="3" colspan="4">
<button name="invoice_proforma" states="draft" string="PRO-FORMA"/>
<button name="invoice_open" states="draft,proforma" string="Create"/>
<button name="invoice_cancel" states="draft,proforma,sale,open" string="Cancel"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA"/>
<button name="invoice_open" states="draft,proforma2" string="Create"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid'/>
</group>
@ -455,7 +455,7 @@
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','proforma'),('type','=','out_invoice')]</field>
<field name="domain">[('state','=','proforma2'),('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
</record>
<record id="action_invoice_tree6_view1" model="ir.actions.act_window.view">

View File

@ -23,6 +23,14 @@
write({'state':'proforma'})</field>
<field name="kind">function</field>
</record>
<record id="act_proforma2" model="workflow.activity">
<field name="wkf_id" ref="account.wkf"/>
<field name="name">proforma2</field>
<field name="action">write({'state':'proforma2'})</field>
<field name="kind">function</field>
</record>
<record id="act_open" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">open</field>
@ -114,5 +122,31 @@ write({'state':'cancel'})</field>
<field name="act_to" ref="act_cancel"/>
<field name="signal">invoice_cancel</field>
</record>
<record id="draft_to_pro2" model="workflow.transition">
<field name="act_from" ref="account.act_draft"/>
<field name="act_to" ref="act_proforma2"/>
<field name="signal">invoice_proforma2</field>
</record>
<record id="pro2_to_open" model="workflow.transition">
<field name="act_from" ref="act_proforma2"/>
<field name="act_to" ref="account.act_open"/>
<field name="signal">invoice_open</field>
</record>
<record id="pro2_to_paid" model="workflow.transition">
<field name="act_from" ref="act_proforma2"/>
<field name="act_to" ref="account.act_paid"/>
<field name="trigger_model">account.move.line</field>
<field name="trigger_expr_id">move_line_id_payment_get()</field>
<field name="condition">test_paid()</field>
</record>
<record id="pro2_to_cancel" model="workflow.transition">
<field name="act_from" ref="act_proforma2"/>
<field name="act_to" ref="account.act_cancel"/>
<field name="signal">invoice_cancel</field>
</record>
</data>
</openerp>

View File

@ -9,11 +9,13 @@
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="8"/>
<menuitem id="menu_finance_legal_statement" name="Legal Statements" parent="account.menu_finance" sequence="8"/>
<menuitem id="menu_finance_entries" name="Entries Encoding" parent="account.menu_finance" sequence="2"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="account.menu_finance_entries" sequence="15"/>
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="account.menu_finance" sequence="3"/>
<menuitem id="menu_account_end_year_treatments" name="End of Year Treatments" parent="account.menu_finance_periodical_processing" sequence="20"/>
<menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance" sequence="8"/>
</data>
</openerp>

View File

@ -141,7 +141,7 @@
<field name="name">List of Accounts</field>
<field name="res_model">account.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
</record>
<menuitem id="account_account_menu" name="Financial Accounts" parent="account.menu_finance_accounting"/>
<menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu"/>
@ -166,6 +166,7 @@
<field name="name">Chart of Accounts</field>
<field name="res_model">account.account</field>
<field name="view_type">tree</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_account_tree"/>
<field name="domain">[('parent_id','=',False)]</field>
</record>
@ -583,7 +584,7 @@
<field name="tax_code_id"/>
<field name="tax_sign"/>
<separator colspan="4" string="Refund Invoices"/>
<separator colspan="4" string="Credit Notes"/>
<field name="ref_base_code_id"/>
<field name="ref_base_sign"/>
<field name="ref_tax_code_id"/>
@ -1094,7 +1095,7 @@
<field name="name"/>
<field name="value"/>
<field name="days"/>
<field name="condition"/>
<field name="days2"/>
</tree>
</field>
</record>
@ -1112,7 +1113,7 @@
<field name="value_amount"/>
<newline/>
<field name="days"/>
<field name="condition"/>
<field name="days2"/>
</form>
</field>
</record>
@ -1508,7 +1509,7 @@
<field name="tax_code_id"/>
<field name="tax_sign"/>
<separator colspan="4" string="Refund Invoices"/>
<separator colspan="4" string="Credit Notes"/>
<field name="ref_base_code_id"/>
<field name="ref_base_sign"/>
<field name="ref_tax_code_id"/>
@ -1629,6 +1630,17 @@
<menuitem parent="account.account_account_menu" action="action_wizard_multi_chart" id="menu_wizard"/>
<record id="account_account_graph" model="ir.ui.view">
<field name="name">account.account.graph</field>
<field name="model">account.account</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="name"/>
<field name="balance" operator="+"/>
</graph>
</field>
</record>
</data>
</openerp>

View File

@ -2,7 +2,7 @@
<openerp>
<data>
<wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Refund invoice"/>
<wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note"/>
<wizard id="wizard_invoice_pay" model="account.invoice" name="account.invoice.pay" string="Pay invoice"/>
@ -78,5 +78,14 @@
<!-- account.invoice -->
<wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open"/>
<!-- generic report wizard -->
<wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account balance"/>
<menuitem icon="STOCK_PRINT" action="wizard_account_balance_report" id="menu_account_balance_report" parent="account.menu_generic_report" type="wizard"/>
<wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General ledger"/>
<menuitem icon="STOCK_PRINT" action="wizard_general_ledger" id="menu_general_ledger" parent="account.menu_generic_report" type="wizard"/>
</data>
</openerp>

View File

@ -6,13 +6,13 @@
Payment term
-->
<record id="account_payment_term" model="account.payment.term">
<field name="name">30 Days Net</field>
<field name="name">30 Days End of Month</field>
</record>
<record id="account_payment_term_line" model="account.payment.term.line">
<field name="name">30 days</field>
<field name="name">30 Days End of Month</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field name="condition">net days</field>
<field eval="-1" name="days2"/>
<field eval="account_payment_term" name="payment_id"/>
</record>

File diff suppressed because it is too large Load Diff

View File

@ -165,6 +165,7 @@ class account_invoice(osv.osv):
'state': fields.selection([
('draft','Draft'),
('proforma','Pro-forma'),
('proforma2','Pro-forma'),
('open','Open'),
('paid','Done'),
('cancel','Canceled')

View File

@ -38,7 +38,7 @@ class res_partner(osv.osv):
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context):
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
cr.execute(("""select
l.partner_id, a.type, sum(l.debit-l.credit)
l.partner_id, a.type, sum(l.debit-l.credit)
from
account_move_line l
left join
@ -116,6 +116,7 @@ class res_partner(osv.osv):
string="Default Supplier Tax",
method=True,
view_load=True,
domain=[('parent_id','=',False)],
help="This tax will be used, instead of the default one for supplier invoices."),
'property_account_tax': fields.property(
'account.tax',
@ -124,6 +125,7 @@ class res_partner(osv.osv):
string="Default Tax",
method=True,
view_load=True,
domain=[('parent_id','=',False)],
help="This tax will be used, instead of the default one for customers."),
'property_payment_term': fields.property(
'account.payment.term',

View File

@ -0,0 +1,174 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_invoiceworkflow0" model="process.process">
<field eval="&quot;&quot;&quot;Invoice flow for services companies.&quot;&quot;&quot;" name="note"/>
<field eval="1" name="active"/>
<field eval="&quot;&quot;&quot;Invoice Workflow&quot;&quot;&quot;" name="name"/>
</record>
<!--
Process Node
-->
<record id="process_node_analytic0" model="process.node">
<field name="menu_id" ref="account.account_analytic_def_account"/>
<field name="model_id" ref="account.model_account_analytic_account"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Analytic&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;From analytic accounts, It creates invoice.&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'close')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_draftinvoices0" model="process.node">
<field name="menu_id" ref="account.menu_invoice_draft"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Draft Invoices&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Proposed invoice to be checked, validated and printed&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_invoiceinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_finance_invoice"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Invoice_invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Have a number and entries are generated&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_accountingentries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_line_form"/>
<field name="model_id" ref="account.model_account_move"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Accounting Entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Validated accounting entries.&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_bankstatement0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree2"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Bank Statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Statement encoding produces payment entries&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_paymententries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_line_form"/>
<field name="model_id" ref="account.model_account_move_line"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Payment Entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Can be draft or validated&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'valid')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_reconciliation0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_line_search"/>
<field name="model_id" ref="account.model_account_move_reconcile"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Reconciliation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Reconciliation of entries from end of the payment &quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='valid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_paidinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Paid invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Paid invoice when reconciled.&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_analyticinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;analytic Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;From analytic accounts, Create invoice.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
</record>
<record id="process_transition_customerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Customer Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Number of entries are generated&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
</record>
<record id="process_transition_validentries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Valid Entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Valid entries from invoice&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
</record>
<record id="process_transition_entriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Entries Reconcile&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Reconcile Entries.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
</record>
<record id="process_transition_statemententries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Statement Entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;From statement, create entries&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
<field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
</record>
<record id="process_transition_paymentreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment Reconcile&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Reconcilate the entries from payment&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
</record>
<record id="process_transition_reconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reconcile Paid&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Paid invoice when reconciled.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,135 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_statementworkflow0" model="process.process">
<field eval="&quot;&quot;&quot;Statement flow for services companies.&quot;&quot;&quot;" name="note"/>
<field eval="1" name="active"/>
<field eval="&quot;&quot;&quot;Statement workflow&quot;&quot;&quot;" name="name"/>
</record>
<!--
Process Node
-->
<record id="process_node_electronicfile0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree2"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Electronic File&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import from your bank statements&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_statementworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_importinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree2"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Import invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import from invoices or payments&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_statementworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_draftstatement0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree2"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Draft statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Set starting and ending balance if bank statement&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_statementworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_confirmedstatement0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Confirmed statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Confirmed with/with out Reconciliation and Real balance=Computed balance&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_statementworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_accountingstatemententries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_line_search"/>
<field name="model_id" ref="account.model_account_move_line"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Accounting Statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries can be draft or validated&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_statementworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'valid')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_reconciliationofentries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_line_search"/>
<field name="model_id" ref="account.model_account_move_line"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Reconciliation of Entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Reconcilation of the entries with invoice.&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_statementworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='valid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_filestatement0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;File statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import file from your bank statement&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_electronicfile0"/>
</record>
<record id="process_transition_invoiceimport0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice import&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import invoice from statement&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_importinvoice0"/>
</record>
<record id="process_transition_confirmstatementfromdraft0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm statement from draft&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Confirm statement with/without reconciliation from draft statement&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_confirmedstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_draftstatement0"/>
</record>
<record id="process_transition_confirmaccountingentries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;After confirming statement, it creates Entries and its entry lines&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedstatement0"/>
</record>
<record id="process_transition_accountentryreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Account entry reconcile&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Reconciliation of entries of accounting entries&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliationofentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_accountingstatemententries0"/>
</record>
</data>
</openerp>

View File

@ -73,6 +73,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
</record>
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
@ -84,6 +85,7 @@
<field name="res_model">account.analytic.account</field>
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_mode">form,graph</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
</record>
@ -105,7 +107,7 @@
<field name="name">New Analytic Account</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_mode">form,tree,graph</field>
<field eval="view_account_analytic_account_form" name="view_id"/>
</record>
<menuitem action="analytic_account_form" id="account_analytic_form" parent="account.account_analytic_def_account"/>
@ -365,5 +367,17 @@
</field>
</record>
<record id="analytic_accounts_graph" model="ir.ui.view">
<field name="name">analytic.accounts.graph</field>
<field name="model">account.analytic.account</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Analytic Account Statistics" type="bar">
<field name="complete_name"/>
<field name="balance" operator="+"/>
</graph>
</field>
</record>
</data>
</openerp>

View File

@ -32,6 +32,7 @@ import pooler
import time
from report import report_sxw
class account_analytic_balance(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(account_analytic_balance, self).__init__(cr, uid, name, context)

View File

@ -3,6 +3,37 @@
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<!--logo-->
<!--<fill color="darkblue"/>-->
<!--<stroke color="darkblue"/>-->
<!--TITLE COMPANY-->
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">Analytic Balance</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
@ -10,65 +41,30 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockTableStyle id="Table1">
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
</blockTableStyle>
<blockTableStyle id="Tableau8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockTableStyle id="tbl_content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockTableStyle id="tbl_data">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau10">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Times-Bold" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Times-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Times-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Times-Roman"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="6.0" leading="8"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P15" fontName="Times-Roman" fontSize="6.0" leading="8"/>
<paraStyle name="P16" fontName="Times-Bold" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Times-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
@ -76,152 +72,130 @@
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" 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="9.0" leading="11" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_right_bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<blockTable colWidths="161.0,161.0,161.0" repeatRows="1" style="Tableau1">
<tr>
<td>
<para style="P1">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P2">Analytic Balance</para>
</td>
<td>
<para style="P3">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P1">[[ company.name ]]</para>
</td>
<td>
<para style="P17">Period from [[ data['form']['date1'] ]] </para>
<para style="P17">to [[ data['form']['date2'] ]]</para>
</td>
<td>
<para style="P4">Currency: [[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P11">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="57.0,227.0,50.0,50.0,50.0,49.0" style="Tableau8">
<tr>
<td>
<para style="P5">Code</para>
</td>
<td>
<para style="P5">Account Name</para>
</td>
<td>
<para style="P5">Debit </para>
</td>
<td>
<para style="P5">Credit</para>
</td>
<td>
<para style="P5">Balance</para>
</td>
<td>
<para style="P5">Quantity</para>
</td>
</tr>
</blockTable>
<para style="P15">
<font color="white"> </font>
</para>
<section>
<para style="P15">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="482.0" style="Table2">
<blockTable colWidths="57.0,280.0,50.0,50.0,50.0,50.0" style="Table1" repeatRows="1">
<tr>
<td>
<para style="P6">[[ o.code ]] <font face="Times-Bold" size="9.0">[[ o.complete_name ]]</font></para>
<para style="terp_tblheader_Details">Code</para>
</td>
<td>
<para style="terp_tblheader_Details">Account Name</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">Quantity</para>
</td>
</tr>
<tr>
<td>
<para style="terp_tblheader_General">Total</para>
</td>
<td></td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ sum_debit(objects,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ sum_credit(objects,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ sum_balance(objects,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ sum_quantity(objects,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="51.0,280.0,50.0,50.0,50.0,50.0" style="tbl_data">
<tr>
<td>
<para style="terp_default_8_bold">[[ o.code ]]</para>
</td>
<td>
<para style="terp_default_8_bold">[[ o.complete_name ]]</para>
</td>
<td>
<para style="terp_default_8_right_bold"><u>[[ move_sum_debit(o.id,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
<td>
<para style="terp_default_8_right_bold"><u>[[ move_sum_credit(o.id,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
<td>
<para style="terp_default_8_right_bold"><u>[[ move_sum_balance(o.id,data['form']['date1'],data['form']['date2']) or '0.0' ]]</u></para>
</td>
<td>
<para style="terp_default_8_right_bold"><u>[[ move_sum_quantity(o.id,data['form']['date1'],data['form']['date2']) or '0.0']]</u></para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8">[[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
<para style="terp_default_8">[[ move_g['code'] ]]</para>
</td>
<td>
<para style="terp_default_8">[[ move_g['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ move_g['debit'] or '0.0']]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ move_g['credit'] or '0.0']]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ move_g['balance'] or '0.0']]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ (move_g['quantity'] or '0.0') ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="57.0,227.0,50.0,50.0,49.0,50.0" style="Tableau2">
<tr>
<td>
<para style="P7">[[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
<para style="P7">[[ move_g['code'] ]]</para>
</td>
<td>
<para style="P7">[[ move_g['name'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % move_g['debit'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % move_g['credit'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % move_g['balance'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % (move_g['quantity'] or 0.0) ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="284.0,50.0,50.0,49.0,50.0" style="Table1">
<tr>
<td>
<para style="P9">Total ([[ o.code ]])</para>
</td>
<td>
<para style="P9">[[ '%.2f' % (move_sum_debit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % (move_sum_credit(o.id,data['form']['date1'],data['form']['date2']) or 0.0 )]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % (move_sum_balance(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % move_sum_quantity(o.id,data['form']['date1'],data['form']['date2']) or 0.0]]</para>
</td>
</tr>
</blockTable>
<para style="P15">
<para style="terp_default_8">
<font color="white"> </font>
</para>
</section>
<para style="P12">
<font color="white"> </font>
</para>
<blockTable colWidths="284.0,50.0,50.0,50.0,49.0" style="Tableau10">
<tr>
<td>
<para style="P3">Total</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_debit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_credit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_balance(objects,data['form']['date1'],data['form']['date2']) or 0.0)]]</para>
</td>
<td>
<para style="P3">[[ '%.2f' % sum_quantity(objects,data['form']['date1'],data['form']['date2']) or 0.0 ]]</para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
<para style="P14">
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -49,11 +49,12 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
'delta_debit': self._delta_deb,
'delta_credit': self._delta_cred,
})
def _lines_p(self, date1, date2):
res = []
acc_obj = self.pool.get('account.account')
for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code', 'sign']):
# print"3333333acc_obj3333333",acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code','user_type'])
for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code']):
self.cr.execute("SELECT sum(debit), sum(credit) \
FROM account_move_line \
WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %d", (date1, date2, a['id']))
@ -63,12 +64,12 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
self.cr.execute("SELECT abs(sum(amount)) AS balance \
FROM account_analytic_line \
WHERE date>=%s AND date<=%s AND amount*%d>0 AND general_account_id = %d", (date1, date2, a['sign'], a['id']))
WHERE date>=%s AND date<=%s AND amount>0 AND general_account_id = %d", (date1, date2, a['id']))
(ad,) = self.cr.fetchone()
ad = ad or 0.0
self.cr.execute("SELECT abs(sum(amount)) AS balance \
FROM account_analytic_line \
WHERE date>=%s AND date<=%s AND amount*%d<0 AND general_account_id = %d", (date1, date2, a['sign'], a['id']))
WHERE date>=%s AND date<=%s AND amount<0 AND general_account_id = %d", (date1, date2, a['id']))
(ac,) = self.cr.fetchone()
ac = ac or 0.0
@ -83,8 +84,44 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
self.sum_gen_cred += gc
self.sum_ana_deb += ad
self.sum_ana_cred += ac
return res
# def _lines_p(self, date1, date2):
# res = []
# acc_obj = self.pool.get('account.account')
# for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code','sign']):
# self.cr.execute("SELECT sum(debit), sum(credit) \
# FROM account_move_line \
# WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %d", (date1, date2, a['id']))
# (gd, gc) = self.cr.fetchone()
# gd = gd or 0.0
# gc = gc or 0.0
#
# self.cr.execute("SELECT abs(sum(amount)) AS balance \
# FROM account_analytic_line \
# WHERE date>=%s AND date<=%s AND amount*%d>0 AND general_account_id = %d", (date1, date2, a['sign'], a['id']))
# (ad,) = self.cr.fetchone()
# ad = ad or 0.0
# self.cr.execute("SELECT abs(sum(amount)) AS balance \
# FROM account_analytic_line \
# WHERE date>=%s AND date<=%s AND amount*%d<0 AND general_account_id = %d", (date1, date2, a['sign'], a['id']))
# (ac,) = self.cr.fetchone()
# ac = ac or 0.0
#
# res.append({'code': a['code'], 'name': a['name'],
# 'gen_debit': gd,
# 'gen_credit': gc,
# 'ana_debit': ad,
# 'ana_credit': ac,
# 'delta_debit': gd - ad,
# 'delta_credit': gc - ac,})
# self.sum_gen_deb += gd
# self.sum_gen_cred += gc
# self.sum_ana_deb += ad
# self.sum_ana_cred += ac
# return res
def _gen_deb(self, date1, date2):
return self.sum_gen_deb
@ -99,7 +136,7 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
def _delta_deb(self, date1, date2):
return (self._gen_deb(date1,date2)-self._ana_deb(date1,date2))
def _delta_cred(self, date1, date2):
return (self._gen_cred(date1,date2)-self._ana_cred(date1,date2))
@ -107,4 +144,3 @@ report_sxw.report_sxw('report.account.analytic.account.analytic.check', 'account
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -3,6 +3,36 @@
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<!--logo-->
<!--<fill color="darkblue"/>-->
<!--<stroke color="darkblue"/>-->
<!--TITLE COMPANY-->
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">Analytic Check</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
@ -10,45 +40,36 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="1,2"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau4">
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P8" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P1" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
@ -58,149 +79,112 @@
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Preformatted Text" fontName="Courier" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.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_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_R" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<blockTable colWidths="161.0,161.0,161.0" repeatRows="1" style="Tableau1">
<blockTable colWidths="46.0,135.0,60.0,59.0,60.0,59.0,59.0,60.0" style="Table4" repeatRows="1">
<tr>
<td>
<para style="P1">
<font color="white"> </font>
</para>
<para style="terp_tblheader_General">Code</para>
</td>
<td>
<para style="P2">Analytic Check</para>
<para style="terp_tblheader_General">Account Name</para>
</td>
<td>
<para style="P10">
<font color="white"> </font>
</para>
<para style="terp_tblheader_General_R">General Debit</para>
</td>
<td>
<para style="terp_tblheader_General_R">General Credit</para>
</td>
<td>
<para style="terp_tblheader_General_R">Analytic Debit</para>
</td>
<td>
<para style="terp_tblheader_General_R">Analytic Credit</para>
</td>
<td>
<para style="terp_tblheader_General_R">Delta Debit</para>
</td>
<td>
<para style="terp_tblheader_General_R">Delta Credit</para>
</td>
</tr>
<tr>
<td>
<para style="P1">[[ company.name ]]</para>
<para style="terp_tblheader_Details">[[ (lines_p(data['form']['date1'],data['form']['date2']),'acc') == False or removeParentNode('para') ]]</para>
<para style="terp_tblheader_Details">Total</para>
</td>
<td></td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ '%.2f' % general_debit(data['form']['date1'],data['form']['date2']) ]]</u></para>
</td>
<td>
<para style="P9">Periods from [[ data['form']['date1'] ]]</para>
<para style="P9">to [[ data['form']['date2'] ]]</para>
<para style="terp_tblheader_General_Right"><u>[[ '%.2f' % general_credit(data['form']['date1'],data['form']['date2']) ]]</u></para>
</td>
<td>
<para style="P10">Currency: [[ company.currency_id.name ]]</para>
<para style="terp_tblheader_General_Right"><u>[[ '%.2f' % analytic_debit(data['form']['date1'],data['form']['date2']) ]]</u></para>
</td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ '%.2f' % analytic_credit(data['form']['date1'],data['form']['date2']) ]]</u></para>
</td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ '%.2f' % delta_debit(data['form']['date1'],data['form']['date2']) ]]</u></para>
</td>
<td>
<para style="terp_tblheader_General_Right"><u>[[ '%.2f' % delta_credit(data['form']['date1'],data['form']['date2']) ]]</u></para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8"><font face="Times-Roman">[[ repeatIn(lines_p(data['form']['date1'],data['form']['date2']),'acc') ]] </font>[[ acc['code'] ]]</para>
</td>
<td>
<para style="terp_default_8">[[ acc['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % acc['gen_debit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % acc['gen_credit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % acc['ana_debit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % acc['ana_credit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % acc['delta_debit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % acc['delta_credit'] ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P6">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P6">
<font color="white"> </font>
</para>
<blockTable colWidths="28.0,96.0,60.0,59.0,60.0,59.0,59.0,59.0" style="Tableau2">
<tr>
<td>
<para style="P3">Code</para>
</td>
<td>
<para style="P3">Account Name</para>
</td>
<td>
<para style="P3">
<font face="Times-Roman" size="10.0">General</font>
</para>
<para style="P3">Debit</para>
</td>
<td>
<para style="P3">
<font face="Times-Roman" size="10.0">General</font>
</para>
<para style="P3">Credit</para>
</td>
<td>
<para style="P3">
<font face="Times-Roman" size="10.0">Analytic</font>
</para>
<para style="P3">Debit</para>
</td>
<td>
<para style="P3">
<font face="Times-Roman" size="10.0">Analytic</font>
</para>
<para style="P3">Credit</para>
</td>
<td>
<para style="P3">Delta</para>
<para style="P3">Debit</para>
</td>
<td>
<para style="P3">Delta</para>
<para style="P3">Credit</para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
<blockTable colWidths="28.0,96.0,59.0,59.0,59.0,59.0,59.0,59.0" style="Tableau3">
<tr>
<td>
<para style="P4">[[ repeatIn(lines_p(data['form']['date1'],data['form']['date2']),'acc') ]]</para>
<para style="P4">[[ acc['code'] ]]</para>
</td>
<td>
<para style="P4">[[ acc['name'] ]]</para>
</td>
<td>
<para style="P4">[[ '%.2f' % acc['gen_debit'] ]]</para>
</td>
<td>
<para style="P4">[[ '%.2f' % acc['gen_credit'] ]]</para>
</td>
<td>
<para style="P4">[[ '%.2f' % acc['ana_debit'] ]]</para>
</td>
<td>
<para style="P4">[[ '%.2f' % acc['ana_credit'] ]]</para>
</td>
<td>
<para style="P4">[[ '%.2f' % acc['delta_debit'] ]]</para>
</td>
<td>
<para style="P4">[[ '%.2f' % acc['delta_credit'] ]]</para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
<blockTable colWidths="125.0,59.0,59.0,59.0,59.0,59.0,59.0" style="Tableau4">
<tr>
<td>
<para style="P5">Total</para>
</td>
<td>
<para style="P5">[[ '%.2f' % general_debit(data['form']['date1'],data['form']['date2']) ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % general_credit(data['form']['date1'],data['form']['date2']) ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % analytic_debit(data['form']['date1'],data['form']['date2']) ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % analytic_credit(data['form']['date1'],data['form']['date2']) ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % delta_debit(data['form']['date1'],data['form']['date2']) ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % delta_credit(data['form']['date1'],data['form']['date2']) ]]</para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -3,6 +3,30 @@
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">Cost Ledger-[[ company.currency_id.name ]]</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
@ -10,75 +34,71 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau4">
<blockTableStyle id="Table_Heading_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau7">
<blockTableStyle id="Table_Date_Sub_detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Tableau6">
<blockTableStyle id="Table_Sub_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Tableau5">
<blockTableStyle id="Table_Header_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau10">
<blockTableStyle id="Table_Grant_Total">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<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="Table_Account_Detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="Table_Move_Line_Detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="1,1"/>
<lineStyle kind="LINEBELOW" colorName="white" start="0,1" stop="-1,1"/>
</blockTableStyle>
<blockTableStyle id="Table_Move_Line_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="white" start="0,0" stop="1,1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Times-Roman"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="3.0" leading="4" alignment="LEFT"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT"/>
<paraStyle name="P15" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P16" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P17" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P18" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P21" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
@ -86,195 +106,217 @@
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="12.0" spaceAfter="6.0"/>
<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="9.0" leading="11" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.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="terp_Default_Bold_Right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_Default_Bold_Right_9_U" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_Default_Right_9_U" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_Italic" fontName="Times-Italic" fontSize="9.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_italic_Rignt" fontName="Times-Italic" fontSize="9.0" leading="7" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<blockTable colWidths="161.0,161.0,161.0" repeatRows="1" style="Tableau1">
<!--blockTable colWidths="161.0,161.0,161.0" repeatRows="1" style="Table_Heading_Content">
<tr>
<td>
<para style="P1">
<para style="terp_default_9">[[ company.name ]]</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P2">Cost Ledger</para>
</td>
<td>
<para style="P3">
<font color="white"> </font>
</para>
<para style="P6">
<font color="white"> </font>
</para>
<para style="terp_header_Right">Cost Ledger-[[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable-->
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="161.0,161.0,161.0" style="Table_Date_Sub_detail">
<tr>
<td>
<para style="P1">[[ company.name ]]</para>
<para style="terp_tblheader_General_Centre">Period from </para>
</td>
<td>
<para style="P21">Period from [[ data['form']['date1'] ]] </para>
<para style="P21">
<font face="Times-Roman" size="10.0">to [[ data['form']['date2'] ]]</font>
</para>
<para style="terp_tblheader_General_Centre">Period to</para>
</td>
<td>
<para style="P6">Currency: [[ company.currency_id.name ]]</para>
<para style="terp_tblheader_General_Centre">Printing date</para>
</td>
</tr>
</blockTable>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P11">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="57.0,28.0,43.0,184.0,57.0,57.0,56.0" style="Tableau3">
<blockTable colWidths="161.0,161.0,161.0" style="Table_Sub_Content">
<tr>
<td>
<para style="P4">Date</para>
<para style="terp_tblheader_General_Centre">[[ data['form']['date1'] ]]</para>
</td>
<td>
<para style="P4">J.C.</para>
<para style="terp_tblheader_General_Centre">[[ data['form']['date2'] ]]</para>
</td>
<td>
<para style="P4">Code</para>
</td>
<td>
<para style="P4">Move name</para>
</td>
<td>
<para style="P4">Debit </para>
</td>
<td>
<para style="P4">Credit</para>
</td>
<td>
<para style="P4">Balance</para>
<para style="terp_tblheader_General_Centre">[[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
</td>
</tr>
</blockTable>
<para style="P13">
<para style="terp_default_8">
<font color="white"> </font>
</para>
<section>
<para style="P12">[[ repeatIn(objects,'o') ]]</para>
<para style="P14">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" style="Tableau2">
<tr>
<td>
<para style="P17">[[ o.code ]]<font face="Times-Roman" size="10.0"> [[ o.complete_name ]]</font></para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
<section>
<para style="P12">[[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
<para style="P13">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" style="Tableau4">
<tr>
<td>
<para style="P5">[[ move_g['code'] ]] <font face="Times-Bold" size="10.0">[[ move_g['name'] ]]</font></para>
</td>
</tr>
</blockTable>
<blockTable colWidths="57.0,28.0,42.0,184.0,57.0,57.0,56.0" style="Tableau7">
<tr>
<td>
<para style="P8">[[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]]</para>
<para style="P8">[[ move_a['date'] ]]</para>
</td>
<td>
<para style="P8">[[ move_a['cj'] ]]</para>
</td>
<td>
<para style="P8">[[ move_a['code'] ]]</para>
</td>
<td>
<para style="P9">[[ move_a['name'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % move_a['debit'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % move_a['credit'] ]]</para>
</td>
<td>
<para style="P8">[[ '%.2f' % move_a['balance'] ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="312.0,57.0,57.0,57.0" style="Tableau6">
<tr>
<td>
<para style="P7">Total ([[ move_g['code'] ]])</para>
</td>
<td>
<para style="P7">[[ '%.2f' % move_g['debit'] ]]</para>
</td>
<td>
<para style="P7">[[ '%.2f' % move_g['credit'] ]]</para>
</td>
<td>
<para style="P7">[[ '%.2f' % move_g['balance'] ]]</para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
</section>
<para style="P13">
<font color="white"> </font>
</para>
<blockTable colWidths="312.0,57.0,57.0,56.0" style="Tableau5">
<tr>
<td>
<para style="P3">Total ([[ o.code ]])</para>
</td>
<td>
<para style="P6">[[ '%.2f' % (account_sum_debit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P6">[[ '%.2f' % (account_sum_credit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P6">[[ '%.2f' % (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']) or 0.0)]]</para>
</td>
</tr>
</blockTable>
<para style="P14">
<font color="white"> </font>
</para>
</section>
<para style="P16">
<font color="white"> </font>
</para>
<blockTable colWidths="312.0,57.0,57.0,57.0" style="Tableau10">
<blockTable colWidths="67.0,245.0,59.0,59.0,58.0" style="Table_Header_Title" repeatRows="1">
<tr>
<td>
<para style="P3">Total</para>
<para style="terp_tblheader_Details">Code / Date</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_debit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
<para style="terp_tblheader_Details">J.C. / Move name</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_credit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
<para style="terp_tblheader_Details_Right">Debit </para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_balance(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
</blockTable>
<para style="P15">
<tr>
<td>
<blockTable colWidths="62.0,249.0,57.0,57.0,57.0" style="Table_Grant_Total">
<tr>
<td>
<para style="terp_Default_Bold_Right_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_Default_Bold_Right_9_U"><u>[[ '%.2f' % (sum_debit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
<td>
<para style="terp_Default_Bold_Right_9_U"><u>[[ '%.2f' % (sum_credit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
<td>
<para style="terp_Default_Bold_Right_9_U"><u>[[ '%.2f' % (sum_balance(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
</tr>
</blockTable>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="62.0,249.0,57.0,57.0,57.0" style="Table_Account_Detail">
<tr>
<td>
<para style="terp_default_Bold_9">[[ o.code ]]</para>
</td>
<td>
<para style="terp_default_Bold_9">[[ o.complete_name ]]</para>
</td>
<td>
<para style="terp_Default_Bold_Right_9_U"><u>[[ '%.2f' % (account_sum_debit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
<td>
<para style="terp_Default_Bold_Right_9_U"><u>[[ '%.2f' % (account_sum_credit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
<td>
<para style="terp_Default_Bold_Right_9_U"><u>[[ '%.2f' % (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']) or 0.0)]]</u></para>
</td>
</tr>
<tr>
<td>
<para style="Standard">[[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
<blockTable colWidths="55.0,249.0,58.0,56.0,57.0" style="Table_Move_Line_Detail">
<tr>
<td>
<para style="terp_default_9">[[ move_g['code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ move_g['name'] ]]</para>
</td>
<td>
<para style="terp_Default_Right_9_U"><u>[[ '%.2f' % move_g['debit'] ]]</u></para>
</td>
<td>
<para style="terp_Default_Right_9_U"><u>[[ '%.2f' % move_g['credit'] ]]</u></para>
</td>
<td>
<para style="terp_Default_Right_9_U"><u>[[ '%.2f' % move_g['balance'] ]]</u></para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">[[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]]</para>
<blockTable colWidths="47.0,46.0,204.0,59.0,55.0,58.0" style="Table_Move_Line_Content">
<tr>
<td>
<para style="terp_default_9_Italic">[[ move_a['date'] ]]</para>
</td>
<td>
<para style="terp_default_9_Italic">[[ move_a['cj'] ]]</para>
</td>
<td>
<para style="terp_default_9_Italic">[[ move_a['name'] ]]</para>
</td>
<td>
<para style="terp_default_9_italic_Rignt">[[ '%.2f' % move_a['debit'] ]]</para>
</td>
<td>
<para style="terp_default_9_italic_Rignt">[[ '%.2f' % move_a['credit'] ]]</para>
</td>
<td>
<para style="terp_default_9_italic_Rignt">[[ '%.2f' % move_a['balance'] ]]</para>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</td>
</tr>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</blockTable>
</section>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -2,7 +2,37 @@
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<!--logo-->
<!--<fill color="darkblue"/>-->
<!--<stroke color="darkblue"/>-->
<!--TITLE COMPANY-->
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">Inverted Analytic Balance</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
@ -10,67 +40,35 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockTableStyle id="tbl_header1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
</blockTableStyle>
<blockTableStyle id="Tableau8">
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau4">
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau10">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Times-Bold" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Times-Bold" fontSize="9.0" leading="11" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Times-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="9.0" leading="11" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Times-Roman"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="6.0" leading="8"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="6.0" leading="8"/>
<paraStyle name="P15" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" fontName="Times-Bold" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" fontName="Times-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P1" fontName="Times-Bold" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="6.0" leading="8"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
@ -78,154 +76,129 @@
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.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_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<blockTable colWidths="161.0,161.0,161.0" repeatRows="1" style="Tableau1">
<blockTable colWidths="60.0,280.0,48.0,50.0,50.0,48.0" style="tbl_header1" repeatRows="1">
<tr>
<td>
<para style="P1">
<font color="white"> </font>
</para>
<para style="terp_tblheader_General">Code</para>
</td>
<td>
<para style="P2">Inverted Analytic Balance</para>
<para style="terp_tblheader_General">Account Name</para>
</td>
<td>
<para style="P3">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="terp_tblheader_General_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_General_Right">Credit</para>
</td>
<td>
<para style="terp_tblheader_General_Right">Balance</para>
</td>
<td>
<para style="terp_tblheader_General_Right">Quantity</para>
</td>
</tr>
<tr>
<td>
<para style="P1">[[ company.name ]]</para>
</td>
<td>
<para style="P18">Period from [[ data['form']['date1'] ]]</para>
<para style="P18">to [[ data['form']['date2'] ]]</para>
</td>
<td>
<para style="P4">Currency: [[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P11">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="59.0,225.0,50.0,50.0,50.0,49.0" style="Tableau8">
<tr>
<td>
<para style="P5">Code</para>
</td>
<td>
<para style="P5">Account Name</para>
</td>
<td>
<para style="P5">Debit </para>
</td>
<td>
<para style="P5">Credit</para>
</td>
<td>
<para style="P5">Balance</para>
</td>
<td>
<para style="P5">Quantity</para>
</td>
</tr>
</blockTable>
<para style="P14">
<font color="white"> </font>
</para>
<section>
<para style="P14">[[ repeatIn(lines_g(objects,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
<blockTable colWidths="482.0" style="Tableau3">
<tr>
<td>
<para style="P6">[[ move_g['code'] ]] <font face="Times-Bold" size="9.0">[[ move_g['name'] ]]</font></para>
</td>
</tr>
</blockTable>
<para style="P14">[[ repeatIn(lines_a(objects,move_g['id'],data['form']['date1'],data['form']['date2']),'move_a') ]]</para>
<section>
<blockTable colWidths="60.0,224.0,50.0,50.0,50.0,49.0" style="Tableau2">
<tr>
<td>
<para style="P8">[[ move_a['code'] ]]</para>
</td>
<td>
<para style="P8">[[ move_a['complete_name'] ]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % move_a['debit'] ]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % move_a['credit'] ]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % move_a['balance'] ]]</para>
</td>
<td>
<para style="P9">[[ '%.2f' % (move_a['quantity'] or 0.0) ]]</para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="284.0,50.0,50.0,50.0,49.0" style="Tableau4">
<tr>
<td>
<para style="P7">Total ([[ move_g['code'] ]])</para>
</td>
<td>
<para style="P7">[[ '%.2f' % (move_g['debit'] or 0.0)]]</para>
</td>
<td>
<para style="P7">[[ '%.2f' % (move_g['credit'] or 0.0)]]</para>
</td>
<td>
<para style="P7">[[ '%.2f' % (move_g['balance'] or 0.0)]]</para>
</td>
<td>
<para style="P7">[[ '%.2f' % (move_g['quantity'] or 0.0) ]]</para>
</td>
</tr>
</blockTable>
<para style="P14">
<font color="white"> </font>
</para>
</section>
<para style="P12">
<font color="white"> </font>
</para>
<blockTable colWidths="284.0,50.0,50.0,50.0,49.0" style="Tableau10">
<tr>
<td>
<para style="P3">Sum</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_debit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_credit(objects,data['form']['date1'],data['form']['date2']) or 0.0)]]</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_balance(objects,data['form']['date1'],data['form']['date2']) or 0.0)]]</para>
</td>
<td>
<para style="P3">[[ '%.2f' % (sum_quantity(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
</story>
</document>
<tr>
<td>
<para style="terp_tblheader_Details">Total</para>
</td>
<td></td>
<td>
<para style="terp_tblheader_Details_Right"><u>[[ '%.2f' % (sum_debit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
<td>
<para style="terp_tblheader_Details_Right"><u>[[ '%.2f' % (sum_credit(objects,data['form']['date1'],data['form']['date2']) or 0.0)]]</u></para>
</td>
<td>
<para style="terp_tblheader_Details_Right"><u>[[ '%.2f' % (sum_balance(objects,data['form']['date1'],data['form']['date2']) or 0.0)]]</u></para>
</td>
<td>
<para style="terp_tblheader_Details_Right"><u>[[ '%.2f' % (sum_quantity(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]]</u></para>
</td>
</tr>
<tr>
<td>
<para style="P1">[[ repeatIn(lines_g(objects,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
<blockTable colWidths="56.0,278.0,48.0,50.0,50.0,47.0" style="Table4">
<tr>
<td>
<para style="terp_default_8"><b>[[ move_g['code'] ]]</b> </para>
</td>
<td>
<para style="terp_default_8"><b>[[ move_g['name'] ]]</b></para>
</td>
<td>
<para style="terp_default_Right_8"><b><u>[[ '%.2f' % (move_g['debit'] or 0.0)]]</u></b></para>
</td>
<td>
<para style="terp_default_Right_8"><b><u>[[ '%.2f' % (move_g['credit'] or 0.0)]]</u></b></para>
</td>
<td>
<para style="terp_default_Right_8"><b><u>[[ '%.2f' % (move_g['balance'] or 0.0)]]</u></b></para>
</td>
<td>
<para style="terp_default_Right_8"><b><u>[[ '%.2f' % (move_g['quantity'] or 0.0) ]]</u></b></para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8">[[ repeatIn(lines_a(objects,move_g['id'],data['form']['date1'],data['form']['date2']),'move_a') ]] </para>
<para style="terp_default_8">[[ move_a['code'] ]]</para>
</td>
<td>
<para style="terp_default_8">[[ move_a['complete_name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % move_a['debit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % move_a['credit'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % move_a['balance'] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ '%.2f' % (move_a['quantity'] or 0.0) ]]</para>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</story>
</document>

File diff suppressed because one or more lines are too long

61
addons/account/report/account_balance.py Normal file → Executable file
View File

@ -35,7 +35,7 @@ import datetime
from report import report_sxw
class account_balance(report_sxw.rml_parse):
_name = 'report.account.account.balance'
def __init__(self, cr, uid, name, context):
super(account_balance, self).__init__(cr, uid, name, context)
@ -53,27 +53,30 @@ class account_balance(report_sxw.rml_parse):
'get_periods':self.get_periods,
})
self.context = context
def get_fiscalyear(self, form):
res=[]
if form.has_key('fiscalyear'):
if form.has_key('fiscalyear'):
fisc_id = form['fiscalyear']
if not (fisc_id):
return ''
self.cr.execute("select name from account_fiscalyear where id = %d" %(int(fisc_id)))
res=self.cr.fetchone()
return res and res[0] or ''
def get_periods(self, form):
result=''
if form.has_key('periods'):
if form.has_key('periods'):
period_ids = ",".join([str(x) for x in form['periods'][0][2] if x])
self.cr.execute("select name from account_period where id in (%s)" % (period_ids))
res=self.cr.fetchall()
for r in res:
result+=r[0]+", "
if (r == res[res.__len__()-1]):
result+=r[0]+". "
else:
result+=r[0]+", "
return str(result and result[:-1]) or ''
def lines(self, form, ids={}, done=None, level=1):
if not ids:
ids = self.ids
@ -81,10 +84,13 @@ class account_balance(report_sxw.rml_parse):
return []
if not done:
done={}
if form.has_key('Account_list') and form['Account_list']:
ids = [form['Account_list']]
del form['Account_list']
res={}
result_acc=[]
ctx = self.context.copy()
if form.has_key('fiscalyear'):
if form.has_key('fiscalyear'):
self.transform_period_into_date_array(form)
ctx['fiscalyear'] = form['fiscalyear']
ctx['periods'] = form['periods'][0][2]
@ -92,7 +98,7 @@ class account_balance(report_sxw.rml_parse):
self.transform_date_into_date_array(form)
ctx['date_from'] = form['date_from']
ctx['date_to'] = form['date_to']
accounts = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx)
def cmp_code(x, y):
return cmp(x.code, y.code)
@ -100,7 +106,7 @@ class account_balance(report_sxw.rml_parse):
for account in accounts:
if account.id in done:
continue
done[account.id] = 1
done[account.id] = 1
res = {
'lid' :'',
'date':'',
@ -118,6 +124,7 @@ class account_balance(report_sxw.rml_parse):
'credit': account.credit,
'balance': account.balance,
'leef': not bool(account.child_id),
'bal_type':'',
}
self.sum_debit += account.debit
self.sum_credit += account.credit
@ -136,7 +143,7 @@ class account_balance(report_sxw.rml_parse):
if form['display_account'] == 'bal_mouvement':
if res['credit'] <> 0 or res['debit'] <> 0 or res['balance'] <> 0:
result_acc.append(res)
elif form['display_account'] == 'bal_solde':
elif form['display_account'] == 'bal_solde':
if res['balance'] <> 0:
result_acc.append(res)
else:
@ -152,7 +159,7 @@ class account_balance(report_sxw.rml_parse):
ids2.sort()
result_acc += self.lines(form, [x[1] for x in ids2], done, level+1)
return result_acc
def moveline(self,form,ids,level):
res={}
self.date_lst_string = '\'' + '\',\''.join(map(str,self.date_lst)) + '\''
@ -164,7 +171,7 @@ class account_balance(report_sxw.rml_parse):
"WHERE l.account_id = '"+str(ids)+"' " \
"AND l.date IN (" + self.date_lst_string + ") " \
"ORDER BY l.id")
res = self.cr.dictfetchall()
res = self.cr.dictfetchall()
sum = 0.0
for r in res:
sum = r['debit1'] - r['credit1']
@ -177,8 +184,12 @@ class account_balance(report_sxw.rml_parse):
r['credit']=''
r['balance']=''
r['leef']=''
if sum > 0.0:
r['bal_type']=" Dr."
else:
r['bal_type']=" Cr."
return res or ''
def date_range(self,start,end):
start = datetime.date.fromtimestamp(time.mktime(time.strptime(start,"%Y-%m-%d")))
end = datetime.date.fromtimestamp(time.mktime(time.strptime(end,"%Y-%m-%d")))
@ -190,7 +201,7 @@ class account_balance(report_sxw.rml_parse):
for date in date_array:
full_str_date.append(str(date))
return full_str_date
#
def transform_period_into_date_array(self,form):
## Get All Period Date
@ -198,23 +209,23 @@ class account_balance(report_sxw.rml_parse):
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',form['fiscalyear'])])
else:
periods_id = form['periods'][0][2]
date_array = []
date_array = []
for period_id in periods_id:
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
date_array = date_array + self.date_range(period_obj.date_start,period_obj.date_stop)
self.date_lst = date_array
self.date_lst.sort()
def transform_date_into_date_array(self,form):
return_array = self.date_range(form['date_from'],form['date_to'])
self.date_lst = return_array
self.date_lst.sort()
def _sum_credit(self):
return self.sum_credit
def _sum_debit(self):
return self.sum_debit
report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=2)
def _sum_credit(self):
return self.sum_credit
def _sum_debit(self):
return self.sum_debit
report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=False)

200
addons/account/report/account_balance.rml Normal file → Executable file
View File

@ -19,6 +19,7 @@
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</pageTemplate>
</template>
@ -40,7 +41,7 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P2" fontName="Helvetica" fontSize="2.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="2.0" leading="0" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
@ -51,46 +52,53 @@
<paraStyle name="P12a" fontName="Helvetica" fontSize="9.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<blockTableStyle id="TrLevel8">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel7">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel6">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
</blockTableStyle>
<blockTableStyle id="TrLevel5">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel4">
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel3">
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="-1,0"/>
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel2">
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="-1,0"/>
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel1">
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
</blockTableStyle>
<paraStyle
name="Level8"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level7"
fontName="Helvetica"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level6"
fontName="Helvetica"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level5"
fontName="Helvetica"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level4"
fontName="Helvetica"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level3"
@ -102,15 +110,111 @@
/>
<paraStyle name="Level1"
fontSize="8.0"
fontName="Helvetica-Bold"
/>
<paraStyle
name="Amt_Level8"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level7"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level6"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level5"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level4"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level3"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Amt_Level2"
fontSize="8.0"
fontName="Helvetica-Bold" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
<paraStyle name="Amt_Level1"
fontSize="8.0"
fontName="Helvetica-Bold" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
<paraStyle
name="Det_Level8"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level7"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level6"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level5"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level4"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level3"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle name="Det_Level2"
fontSize="8.0" leading="5"
fontName="Times-Italic"
/>
<paraStyle name="Det_Level1"
fontSize="8.0" leading="5"
fontName="Times-Italic"
/>
<paraStyle
name="Det_Amt_Level8"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level7"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level6"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level5"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level4"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level3"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Det_Amt_Level2"
fontSize="8.0"
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
<paraStyle name="Det_Amt_Level1"
fontSize="8.0"
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
</stylesheet>
<images/>
<story>
<para style="P2">
<font color="white"> </font>
</para>
<blockTable colWidths="527.00" style="Table4" repeatRows="1">
<tr>
<td>
@ -140,44 +244,36 @@
<para style="P10">Balance</para>
</td>
</tr>
<tr>
<td>
<blockTable colWidths="50.0,248.0,73.0,72.0,82.0" style="Table3">
<para style="P2">[[ repeatIn(lines(data['form']), 'a') ]]</para>
<tr>
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
<td>
<para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]]<font color="white">[[ (a['level']&lt;6 and removeParentNode('font') or '... '*(a['level']-4)) ]]</font>[[ setTag('blockTable','blockTable',{'style':'TrLevel'+str(a['level'])}) ]][[ a['name'] ]]</para>
</td>
<td>
<para style="P3">[[ formatLang(a['debit']) and '%.2f'%a['debit'] or '']]</para>
</td>
<td>
<para style="P3">[[ formatLang(a['credit']) and '%.2f'%a['credit'] or '']]</para>
</td>
<td>
<para style="P3">[[ (a['level']&lt;4) and setTag('para','para',{'style':'P3a'}) ]]<u>[[ (a['leef'] and removeParentNode('para')) or formatLang(a['balance']) and '%.2f'%a['balance'] or '' ]]</u></para>
<para style="P3">[[ ((not a['leef']) and removeParentNode('para')) or formatLang(a['balance']) and formatLang(a['balance']) or '' ]]</para>
</td>
</tr>
<tr>
<td><para style="P14">[[ a['jname'] or removeParentNode('tr') ]]</para></td>
<td>
<para style="P14"><font color="white">[[ '... '*(a['level']-3) ]]</font>[[ a['lname'] ]]</para>
</td>
<td>
<para style="P3">[[ formatLang(a['debit1']) and '%.2f'%a['debit1'] or '']]</para>
</td>
<td>
<para style="P3">[[ formatLang(a['credit1']) and '%.2f'%a['credit1'] or '']]</para>
</td>
<td>
<para style="P3">[[ formatLang(a['balance1']) and '%.2f'%a['balance1'] or '']]</para>
</td>
</tr>
</blockTable>
</td>
</tr>
<tr>
<td>
<blockTable colWidths="50.0,248.0,73.0,72.0,82.0" style="Table3">
<para style="P2">[[ repeatIn(lines(data['form']), 'a') ]]</para>
<tr>
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]][[ setTag('blockTable','blockTable',{'style':'TrLevel'+str(a['level'])}) ]][[ a['name'] ]]</para></td>
<td>
<para style="P3"><font><u>[[ a['level']&gt;3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) and '%.2f'%a['debit'] or '0.00' ]]</u></font>
<font>[[ a['level']&lt;4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) and '%.2f'%a['debit'] or '0.00' ]]</font></para>
</td>
<td>
<para style="P3"><font><u>[[ a['level']&gt;3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) and '%.2f'%a['credit'] or '0.00' ]]</u></font>
<font>[[ a['level']&lt;4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) and '%.2f'%a['credit'] or '0.00' ]]</font></para>
</td>
<td>
<para style="P3"><font><u>[[ a['level']&gt;3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) and '%.2f'%a['balance'] or '0.00' ]]</u></font>
<font>[[ a['level']&lt;4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) and '%.2f'%a['balance'] or '0.00' ]]</font></para>
</td>
</tr>
<tr>
<td><para style="P14">[[ setTag('para','para',{'style':('Det_Level'+str(a['level']))}) ]][[ a['jname'] or removeParentNode('tr') ]]</para></td>
<td><para style="P14"><font color="white">[[ a['level']&lt;4 and removeParentNode('font') or '...'*(2) ]]</font>[[ setTag('para','para',{'style':('Det_Level'+str(a['level']))}) ]]<font>[ref: [[ a['ref'] or removeParentNode('font') ]] ]</font> [[ a['lname'] ]]</para></td>
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit1']) and '%.2f'%a['debit1'] or '0.00']]</para></td>
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit1']) and '%.2f'%a['credit1'] or '0.00']]</para></td>
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance1']) and '%.2f'%a['balance1'] or '0.00' ]]</para></td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</story>
</document>

View File

@ -242,7 +242,7 @@
<blockTable colWidths="54.0,125.0,66.0,20.0,100.0,50.0,50.0,50.0,40.0" style="tbl_content" >
<tr>
<td>
<blockTable colWidths="259.00,100.0,50.0,50.0,49.0" style="Table5">
<blockTable colWidths="259.00,100.0,50.0,50.0,49.0,40.00" style="Table5">
<tr>
<td><para style="Standard">[[ o.code ]] [[ o.name ]]</para></td>
<td><para style="Standard"></para></td>
@ -255,6 +255,10 @@
<td>
<para style="P9b"><u>[[sum_solde_account(o, data['form']) or '0.0' ]]</u></para>
</td>
<td>
<para style="P9b"><u> [[ sum_currency_amount_account(a, data['form']) or '0.0' ]]</u></para>
</td>
</tr>
</blockTable>
</td>

View File

@ -1,9 +1,6 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id$
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
@ -30,11 +27,15 @@
import pooler
import time
import re
import datetime
from report import report_sxw
class partner_balance(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(partner_balance, self).__init__(cr, uid, name, context)
self.date_lst = []
self.date_lst_string = ''
self.localcontext.update( {
'time': time,
'lines': self.lines,
@ -47,44 +48,138 @@ class partner_balance(report_sxw.rml_parse):
'solde_credit': self._solde_balance_credit,
'get_company': self._get_company,
'get_currency': self._get_currency,
'comma_me' : self.comma_me,
})
## Compute account list one time
#
# Date Management
#
def date_range(self,start,end):
start = datetime.date.fromtimestamp(time.mktime(time.strptime(start,"%Y-%m-%d")))
end = datetime.date.fromtimestamp(time.mktime(time.strptime(end,"%Y-%m-%d")))
full_str_date = []
#
r = (end+datetime.timedelta(days=1)-start).days
#
date_array = [start+datetime.timedelta(days=i) for i in range(r)]
for date in date_array:
full_str_date.append(str(date))
return full_str_date
#
def transform_period_into_date_array(self,data):
## Get All Period Date
#
# If we have no period we will take all perdio in the FiscalYear.
if not data['form']['periods'][0][2] :
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
else:
periods_id = data['form']['periods'][0][2]
date_array = []
for period_id in periods_id:
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
date_array = date_array + self.date_range(period_obj.date_start,period_obj.date_stop)
self.date_lst = date_array
self.date_lst.sort()
def transform_date_into_date_array(self,data):
return_array = self.date_range(data['form']['date1'],data['form']['date2'])
self.date_lst = return_array
self.date_lst.sort()
def comma_me(self,amount):
if type(amount) is float :
amount = str('%.2f'%amount)
else :
amount = str(amount)
if (amount == '0'):
return ' '
orig = amount
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
if orig == new:
return new
else:
return self.comma_me(new)
def preprocess(self, objects, data, ids):
# Transformation des date
#
#
if data['form'].has_key('fiscalyear'):
self.transform_period_into_date_array(data)
else:
self.transform_date_into_date_array(data)
##
self.date_lst_string = '\'' + '\',\''.join(map(str,self.date_lst)) + '\''
## Compute Code
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='line',
context={'fiscalyear': data['form']['fiscalyear']})
self.cr.execute('SELECT DISTINCT line.partner_id ' \
'FROM account_move_line AS line, account_account AS account ' \
'WHERE line.partner_id IS NOT NULL ' \
'AND line.date >= %s ' \
'AND line.date <= %s ' \
'AND ' + line_query + ' ' \
'AND line.account_id = account.id ' \
'AND account.company_id = %d ' \
'AND account.active',
(data['form']['date1'], data['form']['date2'],
data['form']['company_id']))
new_ids = [id for (id,) in self.cr.fetchall()]
#
if (data['form']['result_selection'] == 'customer' ):
self.ACCOUNT_TYPE = "('receivable')"
elif (data['form']['result_selection'] == 'supplier'):
self.ACCOUNT_TYPE = "('payable')"
else:
self.ACCOUNT_TYPE = "('payable','receivable')"
#
self.cr.execute('SELECT a.id ' \
'FROM account_account a ' \
'LEFT JOIN account_account_type t ' \
'ON (a.type = t.code) ' \
'WHERE t.partner_account = TRUE ' \
'AND a.company_id = %d ' \
'AND a.type IN ' + self.ACCOUNT_TYPE + " " \
'AND a.active', (data['form']['company_id'],))
self.account_ids = ','.join([str(a) for (a,) in self.cr.fetchall()])
self.partner_ids = ','.join(map(str, new_ids))
objects = self.pool.get('res.partner').browse(self.cr, self.uid, new_ids)
super(partner_balance, self).preprocess(objects, data, new_ids)
super(partner_balance, self).preprocess(objects, data, ids)
def lines(self,data):
def lines(self):
if not self.partner_ids:
return []
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='l',
context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']})
full_account = []
result_tmp = 0.0
#
#
#
if data['form']['soldeinit'] :
self.cr.execute(
"SELECT p.ref, p.name,l.account_id,ac.name as account_name,ac.code as code , sum(debit) as debit, sum(credit) as credit, " \
"CASE WHEN sum(debit) > sum(credit) " \
"THEN sum(debit) - sum(credit) " \
"ELSE 0 " \
"END AS sdebit, " \
"CASE WHEN sum(debit) < sum(credit) " \
"THEN sum(credit) - sum(debit) " \
"ELSE 0 " \
"END AS scredit, " \
"(SELECT sum(debit-credit) " \
"FROM account_move_line l " \
"WHERE partner_id = p.id " \
"AND date < %s " \
"AND blocked = TRUE AND l.reconcile_id IS NULL " \
") AS enlitige " \
"FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \
"JOIN account_account ac ON (l.account_id = ac.id)" \
"WHERE " \
# " account_id IN (" + self.account_ids + ") " \
"l.date < %s AND l.reconcile_id IS NULL " \
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
"ORDER BY l.account_id,p.name",
(self.date_lst[0],self.date_lst[0]))
res = self.cr.dictfetchall()
for r in res:
full_account.append(r)
#
#
#
self.cr.execute(
"SELECT p.ref, p.name, sum(debit) as debit, sum(credit) as credit, " \
"SELECT p.ref,l.account_id,ac.name as account_name,ac.code as code ,p.name, sum(debit) as debit, sum(credit) as credit, " \
"CASE WHEN sum(debit) > sum(credit) " \
"THEN sum(debit) - sum(credit) " \
"ELSE 0 " \
@ -96,129 +191,315 @@ class partner_balance(report_sxw.rml_parse):
"(SELECT sum(debit-credit) " \
"FROM account_move_line l " \
"WHERE partner_id = p.id " \
"AND date >= %s " \
"AND date <= %s " \
"AND l.date IN (" + self.date_lst_string + ") " \
"AND blocked = TRUE " \
"AND " + line_query + " " \
") AS enlitige " \
"FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \
"WHERE partner_id IN (" + self.partner_ids + ") " \
"AND account_id IN (" + self.account_ids + ") " \
"AND l.date >= %s " \
"AND l.date <= %s " \
"AND " + line_query + " " \
"GROUP BY p.id, p.ref, p.name " \
"ORDER BY p.ref, p.name",
(self.datas['form']['date1'], self.datas['form']['date2'],
self.datas['form']['date1'], self.datas['form']['date2']))
"JOIN account_account ac ON (l.account_id = ac.id)" \
"WHERE " \
# " account_id IN (" + self.account_ids + ") " \
" l.date IN (" + self.date_lst_string + ") " \
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
"ORDER BY l.account_id,p.name")
res = self.cr.dictfetchall()
return res
print"=====res=====",res
for r in res:
full_account.append(r)
## We will now compute Total
return self._add_subtotal(full_account)
def _sum_debit(self):
def _add_subtotal(self,cleanarray):
i=0
completearray = []
tot_debit = 0.0
tot_credit = 0.0
tot_scredit = 0.0
tot_sdebit = 0.0
tot_enlitige = 0.0
for r in cleanarray:
# For the first element we always add the line
# type = 1 is the line is the first of the account
# type = 2 is an other line of the account
if i==0:
# We add the first as the header
#
##
new_header = {}
new_header['ref'] = ''
new_header['name'] = r['account_name']
new_header['code'] = r['code']
new_header['debit'] = 0
new_header['credit'] = 0
new_header['scredit'] = 0
new_header['sdebit'] = 0
new_header['enlitige'] = 0
new_header['balance'] = 0
new_header['type'] = 3
##
completearray.append(new_header)
#
r['type'] = 1
r['balance'] = float(r['sdebit']) - float(r['scredit'])
completearray.append(r)
#
tot_debit = r['debit']
tot_credit = r['credit']
tot_scredit = r['scredit']
tot_sdebit = r['sdebit']
tot_enlitige = (r['enlitige'] or 0.0)
#
else:
if cleanarray[i]['account_id'] <> cleanarray[i-1]['account_id']:
##
new_tot = {}
new_tot['ref'] = 'Total'
new_tot['name'] = cleanarray[i-1]['account_name']
new_tot['code'] = cleanarray[i-1]['code']
new_tot['debit'] = tot_debit
new_tot['credit'] = tot_credit
new_tot['scredit'] = tot_scredit
new_tot['sdebit'] = tot_sdebit
new_tot['enlitige'] = tot_enlitige
new_tot['balance'] = float(tot_sdebit) - float(tot_scredit)
new_tot['type'] = 3
##
completearray.append(new_tot)
# we reset the counter
tot_debit = r['debit']
tot_credit = r['credit']
tot_scredit = r['scredit']
tot_sdebit = r['sdebit']
tot_enlitige = (r['enlitige'] or 0.0)
#
##
new_header = {}
new_header['ref'] = ''
new_header['name'] = r['account_name']
new_header['code'] = r['code']
new_header['debit'] = 0
new_header['credit'] = 0
new_header['scredit'] = 0
new_header['sdebit'] = 0
new_header['enlitige'] = 0
new_header['balance'] = 0
new_header['type'] = 3
##
##
completearray.append(new_header)
##
#
r['type'] = 1
#
r['balance'] = float(r['sdebit']) - float(r['scredit'])
#
completearray.append(r)
if cleanarray[i]['account_id'] == cleanarray[i-1]['account_id']:
# we reset the counter
tot_debit = tot_debit + r['debit']
tot_credit = tot_credit + r['credit']
tot_scredit = tot_scredit + r['scredit']
tot_sdebit = tot_sdebit + r['sdebit']
tot_enlitige = tot_enlitige + (r['enlitige'] or 0.0)
#
r['type'] = 2
#
r['balance'] = float(r['sdebit']) - float(r['scredit'])
#
completearray.append(r)
i = i + 1
return completearray
def _sum_debit(self,data):
if not self.ids:
return 0.0
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid,
obj='account_move_line',
context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']})
result_tmp = 0.0
#
#
if data['form']['soldeinit'] :
self.cr.execute(
'SELECT sum(debit) ' \
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' l.reconcile_id IS NULL ' \
'AND date < %s ',
(self.date_lst[0],))
result_tmp = float(self.cr.fetchone()[0] or 0.0)
#
#
self.cr.execute(
'SELECT sum(debit) ' \
'FROM account_move_line ' \
'WHERE partner_id IN (' + self.partner_ids + ') ' \
'AND account_id IN (' + self.account_ids + ') ' \
'AND date >=%s ' \
'AND date <= %s ' \
'AND ' + line_query,
(self.datas['form']['date1'], self.datas['form']['date2']))
return self.cr.fetchone()[0] or 0.0
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' l.date IN (' + self.date_lst_string + ') ' )
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
return result_tmp
def _sum_credit(self):
def _sum_credit(self,data):
if not self.ids:
return 0.0
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid,
obj='account_move_line',
context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']})
result_tmp = 0.0
#
#
if data['form']['soldeinit'] :
self.cr.execute(
'SELECT sum(credit) ' \
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' l.reconcile_id IS NULL ' \
'AND date < %s ' ,
(self.date_lst[0],))
result_tmp = float(self.cr.fetchone()[0] or 0.0)
#
#
self.cr.execute(
'SELECT sum(credit) ' \
'FROM account_move_line ' \
'WHERE partner_id IN (' + self.partner_ids + ') ' \
'AND account_id IN (' + self.account_ids + ') ' \
'AND date >= %s ' \
'AND date <= %s ' \
'AND ' + line_query,
(self.datas['form']['date1'], self.datas['form']['date2']))
return self.cr.fetchone()[0] or 0.0
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' l.date IN (' + self.date_lst_string + ') ' )
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
return result_tmp
def _sum_litige(self):
def _sum_litige(self,data):
if not self.ids:
return 0.0
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid,
obj='account_move_line',
context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']})
result_tmp = 0.0
#
#
if data['form']['soldeinit'] :
self.cr.execute(
'SELECT sum(debit-credit) ' \
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' l.reconcile_id IS NULL ' \
'AND date < %s ' \
'AND blocked=TRUE ' ,
(self.date_lst[0],))
result_tmp = float(self.cr.fetchone()[0] or 0.0)
#
#
self.cr.execute(
'SELECT sum(debit-credit) ' \
'FROM account_move_line ' \
'WHERE partner_id IN (' + self.partner_ids + ') ' \
'AND account_id IN (' + self.account_ids + ') ' \
'AND date >= %s ' \
'AND date <= %s ' \
'AND blocked=TRUE ' \
'AND ' + line_query,
(self.datas['form']['date1'], self.datas['form']['date2']))
return self.cr.fetchone()[0] or 0.0
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' l.date IN (' + self.date_lst_string + ') ' \
'AND blocked=TRUE ' )
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
return result_tmp
def _sum_sdebit(self):
def _sum_sdebit(self,data):
if not self.ids:
return 0.0
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid,
obj='account_move_line',
context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']})
result_tmp = 0.0
#
#
if data['form']['soldeinit'] :
self.cr.execute(
'SELECT CASE WHEN sum(debit) > sum(credit) ' \
'THEN sum(debit) - sum(credit) ' \
'ELSE 0 ' \
'END ' \
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' date < %s ' \
'AND reconcile_id IS NULL ' \
'GROUP BY partner_id',
(self.date_lst[0],))
if self.cr.fetchone() != None:
result_tmp = float(self.cr.fetchone()[0])
else:
result_tmp = 0.0
#
#
self.cr.execute(
'SELECT CASE WHEN sum(debit) > sum(credit) ' \
'THEN sum(debit - credit) ' \
'THEN sum(debit) - sum(credit) ' \
'ELSE 0 ' \
'END ' \
'FROM account_move_line ' \
'WHERE partner_id IN (' + self.partner_ids + ') ' \
'AND account_id IN (' + self.account_ids + ') ' \
'AND date >= %s ' \
'AND date <= %s ' \
'AND ' + line_query + ' ' \
'GROUP BY partner_id',
(self.datas['form']['date1'], self.datas['form']['date2']))
return self.cr.fetchone()[0] or 0.0
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
'l.date IN (' + self.date_lst_string + ') ' \
'GROUP BY partner_id')
if self.cr.fetchone() != None:
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
else:
result_tmp = 0.0
return result_tmp
def _sum_scredit(self):
def _sum_scredit(self,data):
if not self.ids:
return 0.0
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
line_query = account_move_line_obj._query_get(self.cr, self.uid,
obj='account_move_line',
context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']})
result_tmp = 0.0
#
#
if data['form']['soldeinit'] :
self.cr.execute(
'SELECT CASE WHEN sum(debit) < sum(credit) ' \
'THEN sum(credit) - sum(debit) ' \
'ELSE 0 ' \
'END ' \
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
' date <= %s ' \
'AND l.reconcile_id IS NULL ' \
'GROUP BY partner_id',
(self.date_lst[0],))
if self.cr.fetchone() != None:
result_tmp = float(self.cr.fetchone()[0])
else:
result_tmp = 0.0
#
#
self.cr.execute(
'SELECT CASE WHEN sum(debit) < sum(credit) ' \
'THEN sum(credit - debit) ' \
'THEN sum(credit) - sum(debit) ' \
'ELSE 0 ' \
'END ' \
'FROM account_move_line ' \
'WHERE partner_id IN (' + self.partner_ids + ') ' \
'AND account_id IN (' + self.account_ids + ') ' \
'AND date >= %s ' \
'AND date <= %s ' \
'AND ' + line_query + ' ' \
'GROUP BY partner_id',
(self.datas['form']['date1'], self.datas['form']['date2']))
return self.cr.fetchone()[0] or 0.0
def _solde_balance_debit(self):
debit, credit = self._sum_debit(), self._sum_credit()
'FROM account_move_line AS l ' \
'WHERE ' \
# ' account_id IN (' + self.account_ids + ') ' \
'l.date IN (' + self.date_lst_string + ') ' \
'GROUP BY partner_id')
if self.cr.fetchone() != None:
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
else:
result_tmp = 0.0
return result_tmp
def _solde_balance_debit(self,data):
debit, credit = self._sum_debit(data), self._sum_credit(data)
return debit > credit and debit - credit
def _solde_balance_credit(self):
debit, credit = self._sum_debit(), self._sum_credit()
def _solde_balance_credit(self,data):
debit, credit = self._sum_debit(data), self._sum_credit(data)
return credit > debit and credit - debit
def _get_company(self, form):
@ -228,9 +509,5 @@ class partner_balance(report_sxw.rml_parse):
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name
report_sxw.report_sxw('report.account.partner.balance', 'res.partner',
'addons/account/report/partner_balance.rml',parser=partner_balance,
'account/report/partner_balance.rml',parser=partner_balance,
header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,8 +1,37 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<document filename="HipHop.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<pageGraphics>
<!--logo-->
<!--<fill color="darkblue"/>-->
<!--<stroke color="darkblue"/>-->
<!--TITLE COMPANY-->
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawString x="12.7cm" y="28.1cm">Third Party Balance [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]] - [[ get_currency(data['form']) ]]</drawString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%m-%d-%y %H:%M", time.localtime()) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</pageTemplate>
</template>
<stylesheet>
@ -13,55 +42,24 @@
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-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="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-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="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-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="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-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="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-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="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-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="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
@ -70,197 +68,63 @@
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-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="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-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="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-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="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,1" stop="5,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="5,1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" />
<lineStyle kind="OUTLINE" colorName="#e6e6e6" />
<blockBackground colorName="white" start="0,0" stop="-1,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="8.0" leading="10"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9b" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10"/>
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
</stylesheet>
<images/>
<story>
<blockTable colWidths="145.0,186.0,151.0" repeatRows="1" style="Table1">
<tr>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P1">Third party balance</para>
</td>
<td>
<para style="P2"><font face="Times-Roman">From</font> [[ formatLang(data['form']['date1'], date=True) ]]</para>
<para style="P2"><font face="Times-Roman">to</font> [[ formatLang(data['form']['date2'], date=True) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Table Contents">[[ get_company(data['form']) ]]</para>
</td>
<td>
<para style="P5">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P6"><font face="Times-Roman">Currency:</font> [[ get_currency(data['form']) ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P10"><font face="Times-Roman">Printing date:</font> [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] <font face="Times-Roman">at</font> [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P10">
<font color="white"> </font>
</para>
<blockTable colWidths="60.0,137.0,118.0,109.0,58.0" repeatRows="1" style="Table6">
<tr>
<td>
<para style="P12">Account number</para>
</td>
<td>
<para style="P12">Account name</para>
</td>
<td>
<para style="P12">Transactions</para>
</td>
<td>
<para style="P12">Balances</para>
</td>
<td>
<para style="P12">In dispute</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="197.0,60.0,58.0,55.0,54.0,58.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">Debit</para>
</td>
<td>
<para style="P12">Credit</para>
</td>
<td>
<para style="P12">Debit</para>
</td>
<td>
<para style="P12">Credit</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
<blockTable colWidths="61.0,137.0,60.0,58.0,55.0,54.0,57.0" style="Table3">
<tr>
<td>
<para style="P14">[[ repeatIn(lines(), 'a') ]]<font face="Times-Roman">[[ a['ref'] ]]</font></para>
</td>
<td>
<para style="P3">[[ a['name'] ]]</para>
</td>
<td>
<para style="P4">[[ formatLang(a['debit']) ]]</para>
</td>
<td>
<para style="P4">[[ formatLang(a['credit']) ]]</para>
</td>
<td>
<para style="P4">[[ formatLang(a['sdebit']) ]]</para>
</td>
<td>
<para style="P4">[[ formatLang(a['scredit']) ]]</para>
</td>
<td>
<para style="P4">[[ formatLang((a['enlitige'] or 0.0)) ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="198.0,60.0,58.0,56.0,53.0,57.0" style="Table4">
<blockTable colWidths="247.0,60.0,58.0,55.0,54.0,57.0" style="Tableau3">
<tr>
<td>
<para style="P7">Grand total</para>
</td>
<td>
<para style="P8">[[ formatLang(sum_debit()) ]]</para>
<para style="P8">[[ comma_me(sum_debit(data)) ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(sum_credit()) ]]</para>
<para style="P8">[[ comma_me(sum_credit(data)) ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(sum_sdebit()) ]]</para>
<para style="P8">[[ comma_me(sum_sdebit(data)) ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(sum_scredit()) ]]</para>
<para style="P8">[[ comma_me(sum_scredit(data)) ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(sum_litige()) ]]</para>
<para style="P8">[[ comma_me(sum_litige(data)) ]]</para>
</td>
</tr>
<tr>
@ -278,10 +142,10 @@
</para>
</td>
<td>
<para style="P8">[[ formatLang(solde_debit()) ]]</para>
<para style="P8">[[ comma_me(solde_debit(data)) ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(solde_credit()) ]]</para>
<para style="P8">[[ comma_me(solde_credit(data)) ]]</para>
</td>
<td>
<para style="P8">
@ -290,10 +154,55 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="61.0,196.0,60.0,58.0,109.0,57.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P12a">Code</para>
</td>
<td>
<para style="P12a">Partner name</para>
</td>
<td>
<para style="P12">Débit</para>
</td>
<td>
<para style="P12">Crédit</para>
</td>
<td>
<para style="P12">Balance</para>
</td>
<td>
<para style="P12">In dispute</para>
</td>
</tr>
<tr>
<td>
<para style="P3">[[ repeatIn(lines(data), 'a') ]]<font face="Helvetica">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ a['ref'] ]]</font></para>
</td>
<td>
<para style="P3">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ a['type']==3 and a['code'] ]] [[ a['name'] ]] </para>
</td>
<td>
<para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ comma_me(a['debit']) ]]</para>
</td>
<td>
<para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ comma_me(a['credit']) ]]</para>
</td>
<td>
<para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ comma_me(a['balance']) ]]</para>
</td>
<td>
<para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ comma_me(a['enlitige']) ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P11"/>
<para style="P9">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -102,6 +102,15 @@
<paraStyle name="Caption" fontName="Helvetica" fontSize="1.0" leading="1" spaceBefore="0" spaceAfter="0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<blockTableStyle id="TrLevelaaaaaaaaaa">
<blockLeftPadding length="140" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevelaaaaaaaaa">
<blockLeftPadding length="120" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevelaaaaaaaa">
<blockLeftPadding length="100" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevelaaaaaaa">
<blockLeftPadding length="80" start="1,0" stop="1,0"/>
</blockTableStyle>
@ -134,6 +143,18 @@
<blockFont name="Times-Bold" start="0,0" stop="-1,-1"/>
</blockTableStyle>
<paraStyle
name="Levelaaaaaaaaaa"
fontName="Helvetica"
fontSize="8.0" />
<paraStyle
name="Levelaaaaaaaaa"
fontName="Helvetica"
fontSize="8.0" />
<paraStyle
name="Levelaaaaaaaa"
fontName="Helvetica"
fontSize="8.0" />
<paraStyle
name="Levelaaaaaaa"
fontName="Helvetica"

View File

@ -165,13 +165,13 @@
<para style="Balance">Balance brought forward</para>
</td>
<td>
<para style="P8"><u>[[ (sum_debit(data)) ]]</u></para>
<para style="P8"><u>[[ (sum_debit(data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P8"><u>[[ (sum_credit(data)) ]]</u></para>
<para style="P8"><u>[[ (sum_credit(data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P8"><u>[[ (sum_debit(data) - sum_credit(data)) ]]</u></para>
<para style="P8"><u>[[ (sum_debit(data) - sum_credit(data)) or '0.0' ]]</u></para>
</td>
</tr>
</blockTable>
@ -192,13 +192,13 @@
<para style="total"></para>
</td>
<td>
<para style="P9b"><u>[[ (sum_debit_partner(p,data)) ]]</u></para>
<para style="P9b"><u>[[ (sum_debit_partner(p,data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P9b"><u>[[ (sum_credit_partner(p,data)) ]]</u></para>
<para style="P9b"><u>[[ (sum_credit_partner(p,data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P9b"><u>[[ (sum_debit_partner(p,data) - sum_credit_partner(p,data)) ]]</u></para>
<para style="P9b"><u>[[ (sum_debit_partner(p,data) - sum_credit_partner(p,data)) or '0.0' ]]</u></para>
</td>
</tr>
</blockTable>

View File

@ -40,7 +40,7 @@ dates_form = '''<?xml version="1.0"?>
<field name="date_from" colspan="4"/>
<field name="date_to" colspan="4"/>
<field name="display_account" colspan="4"/>
</form>'''
dates_fields = {
@ -55,7 +55,7 @@ period_form = '''<?xml version="1.0"?>
<field name="fiscalyear" colspan="4"/>
<field name="periods" colspan="4"/>
<field name="display_account" colspan="4"/>
</form>'''
@ -73,7 +73,7 @@ account_form = '''<?xml version="1.0"?>
</form>'''
account_fields = {
'Account_list': {'string':'Account', 'type':'many2one', 'relation':'account.account', 'required':True},
'Account_list': {'string':'Account', 'type':'many2one', 'relation':'account.account', 'required':True ,'domain':[('parent_id','=',False)]},
}
@ -97,7 +97,7 @@ class wizard_report(wizard.interface):
else:
return 'account_selection'
def _check_date(self, cr, uid, data, context):
sql = """
SELECT f.id, f.date_start, f.date_stop FROM account_fiscalyear f Where '%s' between f.date_start and f.date_stop """%(data['form']['date_from'])
@ -108,12 +108,12 @@ class wizard_report(wizard.interface):
raise wizard.except_wizard('UserError','Date to must be set between ' + res[0]['date_start'] + " and " + res[0]['date_stop'])
else:
return 'report'
else:
raise wizard.except_wizard('UserError','Date not in a defined fiscal year')
states = {
'init': {
'actions': [],
'result': {'type':'choice','next_state':_check_path}

View File

@ -61,7 +61,7 @@ account_form = '''<?xml version="1.0"?>
</form>'''
account_fields = {
'Account_list': {'string':'Account', 'type':'many2one', 'relation':'account.account', 'required':True},
'Account_list': {'string':'Account', 'type':'many2one', 'relation':'account.account', 'required':True ,'domain':[('parent_id','=',False)]},
}
@ -110,7 +110,7 @@ def _check_date(self, cr, uid, data, context):
raise wizard.except_wizard('UserError','Date to must be set between ' + res[0]['date_start'] + " and " + res[0]['date_stop'])
else:
return 'checkreport'
else:
raise wizard.except_wizard('UserError','Date not in a defined fiscal year')
@ -119,13 +119,13 @@ class wizard_report(wizard.interface):
def _get_defaults(self, cr, uid, data, context):
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid)
data['form']['sortbydate'] = 'sort_date'
data['form']['sortbydate'] = 'sort_date'
data['form']['display_account']='bal_all'
data['form']['landscape']=True
data['form']['amount_currency'] = True
return data['form']
def _get_defaults_fordate(self, cr, uid, data, context):
data['form']['sortbydate'] = 'sort_date'
data['form']['sortbydate'] = 'sort_date'
data['form']['display_account']='bal_all'
data['form']['landscape']=True
data['form']['amount_currency'] = True

View File

@ -1,9 +1,6 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id$
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
@ -32,28 +29,51 @@ import time
import wizard
import pooler
report_type = '''<?xml version="1.0"?>
<form string="Select Report Type">
</form>'''
dates_form = '''<?xml version="1.0"?>
<form string="Select period">
<field name="company_id" colspan="4"/>
<newline/>
<field name="fiscalyear" colspan="4"/>
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal year)"/>
<newline/>
<field name="date1"/>
<field name="date2"/>
<newline/>
<field name="state" colspan="4"/>
<field name="result_selection"/>
<field name="soldeinit"/>
</form>'''
dates_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
'result_selection':{'string':"Display partner ",'type':'selection','selection':[('customer','Debiteur'),('supplier','Creancier'),('all','Tous')]},
'soldeinit':{'string':"Inclure les soldes initiaux",'type':'boolean'},
'date1': {'string':'Start date', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-01-01')},
'date2': {'string':'End date', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
}
period_form = '''<?xml version="1.0"?>
<form string="Select period">
<field name="company_id" colspan="4"/>
<newline/>
<field name="fiscalyear" colspan="4"/>
<field name="periods" colspan="4"/>
<newline/>
<field name="result_selection"/>
<field name="soldeinit"/>
</form>'''
period_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
'fiscalyear': {'string': 'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear',
'help': 'Keep empty for all open fiscal year'},
'date1': {'string':'Start of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-01-01')},
'date2': {'string':'End of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
'state':{'string':'Target Moves','type':'selection','selection': [('all','All Entries'),('posted','All Posted Entries')]}
'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty'},
'result_selection':{'string':"Display partner",'type':'selection','selection':[('customer','Debiteur'),('supplier','Creancier'),('all','Tous')]},
'soldeinit':{'string':"Inclure les soldes initiaux",'type':'boolean'},
}
class wizard_report(wizard.interface):
def _get_defaults(self, cr, uid, data, context):
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
@ -65,22 +85,57 @@ class wizard_report(wizard.interface):
else:
company_id = pooler.get_pool(cr.dbname).get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
data['form']['company_id'] = company_id
data['form']['state']='all'
data['form']['soldeinit'] = True
data['form']['result_selection'] = 'all'
return data['form']
def _get_defaults_fordate(self, cr, uid, data, context):
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
company_id = user.company_id.id
else:
company_id = pooler.get_pool(cr.dbname).get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
data['form']['company_id'] = company_id
data['form']['soldeinit'] = True
data['form']['result_selection'] = 'all'
return data['form']
def _check_date(self, cr, uid, data, context):
sql = """
SELECT f.id, f.date_start, f.date_stop FROM account_fiscalyear f Where '%s' between f.date_start and f.date_stop """%(data['form']['date1'])
cr.execute(sql)
res = cr.dictfetchall()
if res:
if (data['form']['date2'] > res[0]['date_stop'] or data['form']['date2'] < res[0]['date_start']):
raise wizard.except_wizard('UserError','Date to must be set between ' + res[0]['date_start'] + " and " + res[0]['date_stop'])
else:
return 'report'
else:
raise wizard.except_wizard('UserError','Date not in a defined fiscal year')
states = {
'init': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel'),('report','Print') ]}
'actions': [],
'result': {'type':'form', 'arch':report_type,'fields':{}, 'state':[('with_period','Use with Period'),('with_date','Use with Date')]}
},
'with_period': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel'),('report','Print')]}
},
'with_date': {
'actions': [_get_defaults_fordate],
'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel'),('checkdate','Print')]}
},
'checkdate': {
'actions': [],
'result': {'type':'choice','next_state':_check_date}
},
'report': {
'actions': [],
'result': {'type':'print', 'report':'account.partner.balance', 'state':'end'}
}
}
wizard_report('account.partner.balance.report')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -32,7 +32,7 @@ import wizard
import pooler
sur_form = '''<?xml version="1.0"?>
<form string="Refund Invoice">
<form string="Credit Note">
<label string="Are you sure you want to refund this invoice ?"/>
</form>'''
@ -56,7 +56,7 @@ class wiz_refund(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type':'form', 'arch':sur_form, 'fields':sur_fields, 'state':[('end','Cancel'),('refund','Refund Invoice')]}
'result': {'type':'form', 'arch':sur_form, 'fields':sur_fields, 'state':[('end','Cancel'),('refund','Credit Note')]}
},
'refund': {
'actions': [],

View File

@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
@ -638,12 +638,13 @@ class account_analytic_account_summary_month(osv.osv):
'month': fields.char('Month', size=25, readonly=True),
}
def init(self, cr):
cr.execute('CREATE OR REPLACE VIEW account_analytic_analysis_summary_month AS (' \
cr.execute('DROP VIEW IF EXISTS account_analytic_analysis_summary_month')
cr.execute('CREATE VIEW account_analytic_analysis_summary_month AS (' \
'SELECT ' \
'(TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') + (d.account_id * 1000000))::integer AS id, ' \
'd.account_id AS account_id, ' \
'TO_CHAR(d.month, \'Mon YYYY\') AS month, ' \
'TO_CHAR(d.month, \'YYYYMM\') AS month_id, ' \
'TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') AS month_id, ' \
'COALESCE(SUM(l.unit_amount), 0.0) AS unit_amount ' \
'FROM ' \
'(SELECT ' \

View File

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem icon="terp-project" id="menu_main" name="Project Management"/>
<record id="action_account_analytic_managed" model="ir.actions.act_window">
<field name="name">My managed accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('user_id','=',uid)]</field>
</record>
<menuitem id="next_id_71" name="Analytic Accounts" parent="account_analytic_analysis.menu_main"/><menuitem action="action_account_analytic_managed" id="menu_analytic_account_managed" parent="next_id_71"/>
<record id="action_hr_tree_invoiced_my" model="ir.actions.act_window">
<field name="name">Uninvoiced entries of my accounts</field>
<field name="res_model">account.analytic.line</field>
@ -20,85 +21,93 @@
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False),('account_id.user_id','=',uid)]</field>
</record>
<menuitem action="action_hr_tree_invoiced_my" id="menu_action_hr_tree_invoiced_my" parent="account_analytic_analysis.next_id_71"/>
<record id="action_account_analytic_managed_open" model="ir.actions.act_window">
<field name="name">My Open Managed Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
</record>
<menuitem action="action_account_analytic_managed_open" id="menu_analytic_account_to_valid_open" parent="account_analytic_analysis.menu_analytic_account_managed"/>
<record id="action_account_analytic_managed_pending" model="ir.actions.act_window">
<field name="name">My Pending Managed Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
</record>
<menuitem action="action_account_analytic_managed_pending" id="menu_analytic_account_to_valid_pending" parent="account_analytic_analysis.menu_analytic_account_managed"/>
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
<field name="name">Overpassed accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('date','&lt;=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
</record>
<menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" parent="account_analytic_analysis.next_id_71"/>
<record id="action_account_analytic_all" model="ir.actions.act_window">
<field name="name">All Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[]</field>
</record>
<menuitem action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="account_analytic_analysis.next_id_71"/>
<record id="action_account_analytic_all_draft" model="ir.actions.act_window">
<field name="name">Draft Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','draft')]</field>
</record>
<menuitem id="next_id_72" name="All Analytic Accounts" parent="account_analytic_analysis.next_id_71"/><menuitem action="action_account_analytic_all_draft" id="menu_action_account_analytic_all_draft" parent="next_id_72"/>
<record id="action_account_analytic_all_open" model="ir.actions.act_window">
<field name="name">Open Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','open')]</field>
</record>
<menuitem action="action_account_analytic_all_open" id="menu_action_account_analytic_all_open" parent="account_analytic_analysis.next_id_72"/>
<record id="action_account_analytic_all_pending" model="ir.actions.act_window">
<field name="name">Pending Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','pending')]</field>
</record>
<menuitem action="action_account_analytic_all_pending" id="menu_action_account_analytic_all_pending" parent="account_analytic_analysis.next_id_72"/>
<record id="action_account_analytic_all_simplified" model="ir.actions.act_window">
<field name="name">Simplified View Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_account_analytic_simplified"/>
<field name="domain">[]</field>
</record>
<menuitem action="action_account_analytic_all_simplified" id="menu_action_account_analytic_all_simplified" parent="account_analytic_analysis.next_id_72"/>
</data>
</openerp>

View File

@ -1,24 +1,28 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_analytic_analysis
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:42+0000"
"PO-Revision-Date: 2008-09-11 15:41:42+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:28+0000\n"
"PO-Revision-Date: 2008-10-09 12:57+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 13:04+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_ca:0
@ -34,19 +38,13 @@ msgstr "Tous les comptes analytiques"
#. module: account_analytic_analysis
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue"
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_main
msgid "Project Management"
msgstr "Gestion de projet"
#. module: account_analytic_analysis
#, python-format
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:0
msgid "AccessError"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_date:0
msgid "Last worked date"
@ -124,12 +122,6 @@ msgstr "Utilisateur"
msgid "Analytic Accounts"
msgstr "Comptabilité analytique"
#. module: account_analytic_analysis
#, python-format
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:0
msgid "You try to bypass an access rule (Document type: %s)."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,revenue_per_hour:0
msgid "Revenue per hours (real)"
@ -181,7 +173,7 @@ msgstr "Comptes expirés"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Analytic accounts"
msgstr "Compte Analytique "
msgstr "Compte Analytique"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_hours:0
@ -214,7 +206,7 @@ msgstr "Mois"
#: field:account_analytic_analysis.summary.month,account_id:0
#: field:account_analytic_analysis.summary.user,account_id:0
msgid "Analytic Account"
msgstr "Compte Analytique "
msgstr "Compte Analytique"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_invoiced:0
@ -225,4 +217,3 @@ msgstr "Heures facturées"
#: field:account.analytic.account,theorical_margin:0
msgid "Theorical margin"
msgstr "Marge théorique"

View File

@ -1,96 +1,98 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_analytic_default
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:42+0000"
"PO-Revision-Date: 2008-09-11 15:41:42+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:25+0000\n"
"PO-Revision-Date: 2008-10-09 13:01+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 13:08+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_default
#: field:account.analytic.default,analytic_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,product_id:0
msgid "Product"
msgstr ""
#. module: account_analytic_default
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Seq"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,date_stop:0
msgid "End Date"
msgstr ""
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_partner
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_product
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_user
msgid "Analytic Rules"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_analytic_default
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.action_analytic_default_form
#: model:ir.ui.menu,name:account_analytic_default.menu_analytic_defaul_form
#: view:account.analytic.default:0
msgid "Analytic Defaults"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,date_stop:0
msgid "End Date"
msgstr "Date de fin"
#. module: account_analytic_default
#: field:account.analytic.default,product_id:0
msgid "Product"
msgstr "Produit"
#. module: account_analytic_default
#: 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 avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Seq"
msgstr "Séq"
#. module: account_analytic_default
#: field:account.analytic.default,sequence:0
msgid "Sequence"
msgstr "Séquence"
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rules_partner_action
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rules_product_action
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rules_user_action
msgid "Analytic Rules"
msgstr "Règles Analytiques"
#. module: account_analytic_default
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML non valide pour l'architecture de la vue"
#. module: account_analytic_default
#: field:account.analytic.default,analytic_id:0
msgid "Analytic Account"
msgstr "Compte analytique"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_account_analytic_default
msgid "Analytic Distributions"
msgstr ""
msgstr "Distributions Analytiques"
#. module: account_analytic_default
#: field:account.analytic.default,user_id:0
msgid "User"
msgstr ""
msgstr "Utilisateur"
#. module: account_analytic_default
#: field:account.analytic.default,partner_id:0
msgid "Partner"
msgstr ""
msgstr "Partenaire"
#. module: account_analytic_default
#: field:account.analytic.default,date_start:0
msgid "Start Date"
msgstr ""
msgstr "Date de début"
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Conditions"
msgstr ""
msgstr "Conditions"
#. module: account_analytic_default
#: field:account.analytic.default,company_id:0
msgid "Company"
msgstr ""
msgstr "Société"

View File

@ -1,29 +1,33 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_analytic_plans
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:42+0000"
"PO-Revision-Date: 2008-09-11 15:41:42+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:29+0000\n"
"PO-Revision-Date: 2008-10-09 13:24+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 13:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
msgstr ""
msgstr "Identifiant du Compte4"
#. module: account_analytic_plans
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@ -35,52 +39,42 @@ msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
msgstr ""
msgstr "Identifiant du Compte5"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,rate:0
msgid "Rate (%)"
msgstr ""
msgstr "Taux (%)"
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Line"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
msgstr ""
msgstr "Ligne de Distribution Analytique"
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Lines"
msgstr ""
msgstr "Lignes de Distribution Analytique"
#. module: account_analytic_plans
#: wizard_button:wizard.crossovered.analytic,init,print:0
msgid "Print"
msgstr ""
msgstr "Imprimer"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Printing date:"
msgstr ""
msgstr "Date d'impression :"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_instance_action
msgid "Analytic Distribution's Models"
msgstr ""
msgstr "Modèles de la Distribution Analytique"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
msgstr ""
msgstr "Nom du compte"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action
@ -89,86 +83,86 @@ msgstr ""
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_action
#: view:account.analytic.plan:0
msgid "Analytic Plan"
msgstr ""
msgstr "Plan Analytique"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Currency:"
msgstr ""
msgstr "Devise"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Percentage"
msgstr ""
msgstr "Pourcentage"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,name:0
msgid "Plan Name"
msgstr ""
msgstr "Nom du Plan"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,empty_line:0
msgid "Dont show empty lines"
msgstr ""
msgstr "Ne pas afficher les lignes vides"
#. module: account_analytic_plans
#: wizard_view:wizard.crossovered.analytic,init:0
msgid "Select Information"
msgstr ""
msgstr "Sélectionner l'information"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
msgstr "Compte analytique"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0
msgid "Distribution Code"
msgstr ""
msgstr "Code de la Distribution"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "%"
msgstr ""
msgstr "%"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "100.00%"
msgstr ""
msgstr "100.00%"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,ref:0
msgid "Analytic Account Ref."
msgstr ""
msgstr "Réf. du Compte Analytique"
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
#: field:account.analytic.plan.instance,name:0
#: field:account.invoice.line,analytics_id:0
#: field:account.move.line,analytics_id:0
#: field:product.product,property_account_distribution:0
#: view:account.analytic.plan.instance:0
msgid "Analytic Distribution"
msgstr ""
msgstr "Distribution Analytique"
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Line"
msgstr ""
msgstr "Ligne du Plan Analytique"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
msgstr ""
msgstr "Référence de Compte Analytique"
#. module: account_analytic_plans
#: model:ir.actions.wizard,name:account_analytic_plans.create_model
msgid "Create Model"
msgstr ""
msgstr "Créer un modèle"
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
msgstr ""
msgstr "Entrées par défaut"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@ -181,143 +175,160 @@ msgstr ""
#: field:account.journal,plan_id:0
#: view:account.analytic.plan:0
msgid "Analytic Plans"
msgstr ""
msgstr "Plans Analytiques"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
msgstr ""
msgstr "Identifiant du Compte1"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
msgid "Maximum Allowed (%)"
msgstr ""
msgstr "Maximum Permis (%)"
#. module: account_analytic_plans
#: wizard_view:create.model,info:0
msgid "Distribution Model Saved"
msgstr ""
msgstr "Modèle de la Distribution Sauvegardé"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,date2:0
msgid "End Date"
msgstr ""
msgstr "Date de fin"
#. module: account_analytic_plans
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML non valide pour l'architecture de la vue"
#. module: account_analytic_plans
#: help:product.product,property_account_distribution:0
msgid ""
"This Analytic Distribution will be use in sale order line and invoice lines"
msgstr ""
"Cette Distribution Analytique sera utilisée dans les lignes de commandes de "
"vente et dans les lignes de factures"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Lines"
msgstr ""
msgstr "Lignes du Plan Analytique"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,min_required:0
msgid "Minimum Allowed (%)"
msgstr ""
msgstr "Minimum Permis (%)"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,plan_id:0
msgid "Model's Plan"
msgstr ""
msgstr "Plan du Modèle"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
msgstr ""
msgstr "Identifiant du Compte2"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Amount"
msgstr ""
msgstr "Montant"
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
msgstr ""
msgstr "Compte Racine de ce plan."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
msgstr ""
msgstr "Identifiant du Compte6"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,journal_ids:0
#: field:account.analytic.plan.instance,journal_id:0
msgid "Analytic Journal"
msgstr "Journal analytique"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Object for create analytic entries from invoice lines"
msgstr ""
"Objet pour créer les entrées analytiques à partir des lignes de factures"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Quantity"
msgstr ""
msgstr "Quantité"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
msgstr ""
msgstr "Identifiant du Compte"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Code"
msgstr ""
msgstr "Code"
#. module: account_analytic_plans
#: wizard_button:create.model,info,end:0
#: wizard_button:create.model,endit,end:0
msgid "OK"
msgstr ""
msgstr "Ok"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
msgstr ""
msgstr "Compte Racine"
#. module: account_analytic_plans
#: wizard_view:create.model,info:0
msgid "This distribution model has been saved. You will be able to reuse it later."
msgid ""
"This distribution model has been saved. You will be able to reuse it later."
msgstr ""
"Ce modèle de distribution a été sauvegardé. Vous pourrez le réutiliser plus "
"tard."
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
msgstr ""
msgstr "Séquence"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Period from"
msgstr ""
msgstr "Période du"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
msgstr ""
msgstr "Identifiant du Compte3"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
msgid "Plan Id"
msgstr ""
msgstr "Identifiant du Plan"
#. module: account_analytic_plans
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_instance_action
msgid "Analytic Distribution's models"
msgstr ""
msgstr "Modèles de la Distribution Analytique"
#. module: account_analytic_plans
#: wizard_button:wizard.crossovered.analytic,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Annuler"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,date1:0
msgid "Start Date"
msgstr ""
msgstr "Date de début"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "at"
msgstr ""

View File

@ -1,35 +1,31 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_balance
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:29+0000\n"
"PO-Revision-Date: 2008-10-09 14:13+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 14:16+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
msgid "Show Debit/Credit Information"
msgstr ""
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "(If you do not select Fiscal year it will take all open fiscal year)"
msgstr ""
msgstr "Afficher les informations de Débit/Crédit"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,zero_years:0
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "Notification"
msgstr ""
msgstr "Notification"
#. module: account_balance
#: model:ir.actions.report.xml,name:account_balance.account_account_balance
@ -41,13 +37,13 @@ msgstr "Balance des comptes"
#. module: account_balance
#: wizard_button:account.balance.account.balance.report,init,checkyear:0
msgid "Print"
msgstr ""
msgstr "Imprimer"
#. module: account_balance
#: rml:account.balance.account.balance:0
#: rml:account.account.balance.landscape:0
msgid "Printing date:"
msgstr ""
msgstr "Date d'impression :"
#. module: account_balance
#: rml:account.balance.account.balance:0
@ -59,18 +55,18 @@ msgstr ""
#: rml:account.balance.account.balance:0
#: rml:account.account.balance.landscape:0
msgid "Account Name"
msgstr ""
msgstr "Nom du compte"
#. module: account_balance
#: rml:account.balance.account.balance:0
#: rml:account.account.balance.landscape:0
msgid "Currency:"
msgstr ""
msgstr "Devise"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period(s)"
msgstr ""
msgstr "Sélectioner la(les) Période(s)"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
@ -80,17 +76,21 @@ msgstr ""
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr ""
msgstr "Sélectionner la ou les Années Fiscales (Maximum Trois Ans)"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "3. You have selected 'Percentage' option with more than 2 years,but you have not selected landscape format."
msgid ""
"3. You have selected 'Percentage' option with more than 2 years,but you have "
"not selected landscape format."
msgstr ""
"3. Vous avez sélectionné l'option 'Pourcentage' avec plus de 2 années, mais "
"vous n'avez pas sélectionner le format paysage."
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You can select maximum 3 years.Please check again."
msgstr ""
msgstr "Vous pouvez sélectionner 3 années au maximum. Veuillez revérifier."
#. module: account_balance
#: model:ir.actions.wizard,name:account_balance.wizard_account_balance_report
@ -100,54 +100,58 @@ msgstr ""
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,landscape:0
msgid "Show Report in Landscape Form"
msgstr ""
msgstr "Afficher le Rapport au Format Paysage"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
msgid "Show Comparision in %"
msgstr ""
msgstr "Afficher la Comparaison en %"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period"
msgstr ""
msgstr "Sélectionnez une Période"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,periods:0
msgid "Periods"
msgstr ""
msgstr "Périodes"
#. module: account_balance
#: wizard_button:account.balance.account.balance.report,zero_years,end:0
#: wizard_button:account.balance.account.balance.report,backtoinit,end:0
msgid "Ok"
msgstr ""
msgstr "Ok"
#. module: account_balance
#: rml:account.balance.account.balance:0
#: rml:account.account.balance.landscape:0
msgid "Total:"
msgstr ""
msgstr "Total:"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You have to select 'Landscape' option.Please Check it."
msgstr ""
"Vous devez sélectionner l'option 'paysage'. Cochez la s'il vous plait."
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
msgid "Show Accounts"
msgstr ""
msgstr "Afficher les Comptes"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You might have done following mistakes.Please correct them and try again."
msgid ""
"You might have done following mistakes.Please correct them and try again."
msgstr ""
"Vous pourriez avoir fait les erreurs suivantes. Veuillez les corriger et ré-"
"essayez."
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "1. You have selected more than 3 years in any case."
msgstr ""
msgstr "1. Vous avez sélectionner plus de 3 années dans tous les cas."
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,select_periods:0
@ -156,53 +160,62 @@ msgstr ""
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "2. You have not selected 'Percentage' option,but you have selected more than 2 years."
msgid ""
"2. You have not selected 'Percentage' option,but you have selected more than "
"2 years."
msgstr ""
"2. Vous n'avez pas sélectionné l'option 'Pourcentage', mais vous avez "
"sélectionner plus de 2 années."
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr ""
msgstr "Sélectionner le COmpte Référence (pour la comparaison en %)"
#. module: account_balance
#: rml:account.balance.account.balance:0
#: rml:account.account.balance.landscape:0
msgid "Code"
msgstr ""
msgstr "Code"
#. module: account_balance
#: rml:account.balance.account.balance:0
#: rml:account.account.balance.landscape:0
msgid "Account Information"
msgstr ""
msgstr "Informations du compte"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,fiscalyear:0
msgid "Fiscal year"
msgstr ""
msgstr "Année fiscale"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "You have to select atleast 1 Fiscal Year. Try again."
msgstr ""
msgstr "Vous devez sélectionner au moins une Année Fiscale. Réessayez."
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Report Options"
msgstr ""
msgstr "Options du Rapport"
#. module: account_balance
#: wizard_button:account.balance.account.balance.report,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Annuler"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "You may have selected the compare opions with more than 1 years with credit/debit columns and % option.This can lead contents to be printed out of the paper.Please try again."
msgid ""
"You may have selected the compare opions with more than 1 years with "
"credit/debit columns and % option.This can lead contents to be printed out "
"of the paper.Please try again."
msgstr ""
"Vous avez choisi les options de comparaison avec plus de 1 an avec les "
"colonnes de crédit/débit et l'option %. Ceci peut avoir pour conséquence une "
"perte de contenu (texte imprimé en dehors du papier). Veuillez réessayer."
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Customize Report"
msgstr ""
msgstr "Personnaliser le Rapport"

View File

@ -89,8 +89,8 @@ back_fields={
zero_form='''<?xml version="1.0"?>
<form string="Notification">
<separator string="You have to select atleast 1 Fiscal Year. Try again." colspan="4"/>
<label string="You may have selected the compare opions with more than 1 years with credit/debit columns and % option.This can lead contents to be printed out of the paper.Please try again."/>
<separator string="You have to select at least 1 Fiscal Year. Try again." colspan="4"/>
<label string="You may have selected the compare options with more than 1 year with credit/debit columns and % option.This can lead contents to be printed out of the paper.Please try again."/>
</form>'''
zero_fields={

View File

@ -277,11 +277,7 @@
<field name="view_id" ref="view_crossovered_budget_line_tree"/>
</record>
<menuitem name="Budgets" parent="menu_action_account_budget_post_tree"
id="menu_financial_reporting_budget_budget"/>
<menuitem name="Entries" parent="menu_financial_reporting_budget_budget"
id="menu_financial_reporting_budget_budget_entries"/>
<menuitem parent="menu_financial_reporting_budget_budget_entries"
<menuitem parent="menu_action_account_budget_post_tree"
id="menu_act_crossovered_budget_lines_view"
action="act_crossovered_budget_lines_view" />

View File

@ -10,73 +10,106 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,1" stop="1,1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#b3b3b3" start="0,0" stop="0,0"/>
<blockBackground colorName="#b3b3b3" start="1,0" stop="1,0"/>
<blockBackground colorName="#b3b3b3" start="2,0" stop="2,0"/>
<blockBackground colorName="#b3b3b3" start="3,0" stop="3,0"/>
<blockBackground colorName="#b3b3b3" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="10.0" leading="10" alignment="LEFT"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Times-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.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_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="499.0" repeatRows="1" style="Table1">
<para style="P5">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="499.0" style="Table2">
<tr>
<td>
<para style="P10">[[ company.name ]]</para>
<para style="terp_header_Centre">[[ company.name ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="250.0,250.0" repeatRows="1" style="Table6">
<blockTable colWidths="249.0,249.0" style="Table1">
<tr>
<td>
<para style="P6">Currency: [[ company.currency_id.name ]]</para>
@ -85,21 +118,24 @@
<para style="P7">Printed at: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S')]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="250.0,250.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P6">Analysis from [[ data['form']['date_from'] ]] to [[ data['form']['date_to'] ]]</para>
<para style="terp_default_address">
Analysis from [[ data['form']['date_from'] ]] to [[ data['form']['date_to'] ]]
</para>
</td>
<td>
<para style="P7">Analytic Account : [[ o.name ]]</para>
<para style="P8">Analytic Account : <font color="blue">[[ o.name ]]</font></para>
</td>
</tr>
</blockTable>
<para style="Standard">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="185.0,83.0,75.0,91.0,65.0" style="Table3">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="191.0,82.0,81.0,83.0,62.0" style="Table3">
<tr>
<td>
<para style="P4">Description</para>
@ -114,59 +150,58 @@
<para style="P4">Practical Amount</para>
</td>
<td>
<para style="P4">%</para>
<para style="P4">Perc(%)</para>
</td>
</tr>
</blockTable>
<para style="P5">
<font color="white"> </font>
</para>
<section>
<para style="P2">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
<blockTable colWidths="185.0,83.0,75.0,91.0,64.0" style="Table4">
<tr>
<td>
<para style="P1">
<font>[['.....'*(a['status']-1) ]][[ setTag('font','font',{'color':'white'}) ]]</font><font>[[ a['status']==1 and ( setTag('font','font',{'name':'Times-bold'})) ]][[ a['name'] ]]</font>
</para>
</td>
<td>
<para style="P5">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['theo'] ]]</para>
</td>
<td>
<para style="P5">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['pln'] ]]</para>
</td>
<td>
<para style="P5">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['prac'] ]]</para>
</td>
<td>
<para style="P5">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['perc'] ]]%</para>
</td>
</tr>
</blockTable>
<para style="P5">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
<blockTable colWidths="191.0,82.0,80.0,84.0,61.0" style="Table4">
<tr>
<td>
<para style="P1"><font>[['.....' *(a['status']-1) ]] [[ setTag('font','font',{'color':'white'}) ]]</font><font>[[ a['status']==1 and (setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]]</font></para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['theo'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['pln'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['prac'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['perc'] ]]%</para>
</td>
</tr>
</blockTable>
</section>
<para style="Text body">
<font color="white"> </font>
</para>
<blockTable colWidths="185.0,83.0,75.0,91.0,64.0" style="Table5">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="191.0,83.0,80.0,84.0,61.0" style="Table5">
<tr>
<td>
<para style="P5">Total:</para>
<para style="P3"><font face="Times-Roman">[[ repeatIn(funct_total(data['form']),'b') ]]</font> <b>Total :</b></para>
</td>
<td>
<para style="P5">
[[ repeatIn(funct_total(data['form']),'b') ]] <font face="Times-Roman">[[ '%.2f' % b['tot_theo'] ]]</font>
</para>
<para style="P3">[[ '%.2f' % b['tot_theo'] ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % b['tot_pln'] ]]</para>
<para style="P2">[[ '%.2f' % b['tot_pln'] ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % b['tot_prac'] ]]</para>
<para style="P2">[[ '%.2f' % b['tot_prac'] ]]</para>
</td>
<td>
<para style="P5">[[ '%.2f' % b['tot_perc'] ]]%</para>
<para style="P2">[[ '%.2f' % b['tot_perc'] ]]%</para>
</td>
</tr>
</blockTable>
<para style="P2">
<para style="P5">
<font color="white"> </font>
</para>
</story>

View File

@ -59,22 +59,21 @@ class budget_report(report_sxw.rml_parse):
prev_1=prev * period_days / total_days
return [{'prev': prev, 'prev_period': prev_1, 'achievements': achievements}]
def budget_total(self, post_objs, date1, date2):
def budget_total(self, post_obj, date1, date2):
res = {'prev': 0.0, 'prev_period': 0.0, 'achievements': 0.0}
for post_obj in post_objs:
r = self.post_total(post_obj, date1, date2)[0]
for k in r:
res[k] += r[k]
r = self.post_total(post_obj, date1, date2)[0]
for k in r:
res[k] += r[k]
return [res]
def lines(self, post_obj, date1, date2):
res = []
for a in post_obj.account_ids:
self.cr.execute("SELECT COALESCE(SUM(debit-credit), 0) FROM account_move_line WHERE account_id=%d AND date>=%s AND date<=%s and state<>'draft'", (a.id, date1, date2))
achievements = float(self.cr.fetchone()[0]) * (post_obj.sens=='produit' and -1 or 1)
achievements = float(self.cr.fetchone()[0])
res.append({'name': a.name, 'code': a.code, 'achievements': achievements})
return res
report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml',parser=budget_report)
report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml',parser=budget_report,header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -10,233 +10,293 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<blockBackground colorName="#ffffff" start="0,0" stop="0,-1"/>
<blockBackground colorName="#ffffff" start="1,0" stop="1,-1"/>
<blockBackground colorName="#ffffff" start="2,0" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-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"/>
</blockTableStyle>
<blockTableStyle id="Table9">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table10">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEAFTER" colorName="#c0c0c0" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Times-Bold" fontSize="18.0" leading="22" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P7" fontName="Times-BoldItalic" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Times-Roman"/>
<paraStyle name="P9" fontName="Times-Bold"/>
<paraStyle name="P10" fontName="Times-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P11" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P14" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P15" fontName="Times-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P16" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P17" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P18" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P1" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" rightIndent="-0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" 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="9.0" leading="11" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<blockTable colWidths="145.0,189.0,164.0" repeatRows="1" style="Table2">
<blockTable colWidths="499.0" style="Table3">
<tr>
<td>
<para style="P1">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P2">Budget Analysis</para>
</td>
<td>
<para style="P3">From [[ data['form']['date1'] ]]</para>
<para style="P3">to [[ data['form']['date2'] ]]</para>
<para style="P14">Budget Analysis</para>
</td>
</tr>
</blockTable>
<para style="Text body">
<font color="white"> </font>
</para>
<blockTable colWidths="137.0,237.0,125.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P4">[[ company.name ]]</para>
<para style="P15">[[ company.name ]]</para>
</td>
<td>
<para style="P5">
<font color="white"> </font>
</para>
<para style="P8">From [[ data['form']['date1'] ]] to [[ data['form']['date2'] ]]</para>
</td>
<td>
<para style="P3">Currency: <font face="Times-Roman" size="11.0">[[ company.currency_id.name ]]</font></para>
<para style="P9">Currency: [[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P6">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P6">
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="104.0,53.0,60.0,72.0,73.0,63.0,73.0" repeatRows="1" style="Table5">
<para style="P10">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<blockTable colWidths="104.0,55.0,58.0,72.0,77.0,59.0,73.0" repeatRows="1" style="Table1">
<tr>
<td>
<para style="P7">Budget item detail</para>
<para style="P13">Budget Item Detail</para>
</td>
<td>
<para style="P7">Account Number</para>
<para style="P13">A/c No.</para>
</td>
<td>
<para style="P7">Budget</para>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P13">Budget</para>
</td>
<td>
<para style="P7">Period Budget</para>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P13">Period Budget</para>
</td>
<td>
<para style="P7">Performance</para>
<para style="P13">Performance</para>
</td>
<td>
<para style="P7">Spread</para>
<para style="P13">Spread</para>
</td>
<td>
<para style="P7">% performance</para>
<para style="P13">% performance</para>
</td>
</tr>
</blockTable>
<para style="P8">
<para style="Standard">
<font color="white"> </font>
</para>
<para style="Standard">[[ repeatIn(objects,'o') ]]</para>
<section>
<para style="P8">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="75.0,424.0" style="Table8">
<tr>
<td>
<para style="P9">[[ o.code ]]</para>
<para style="P6"><font color="blue">[[ o.code ]]</font></para>
</td>
<td>
<para style="P10">[[ o.name ]]</para>
<para style="P5"><font color="blue">[[ o.name ]]</font></para>
</td>
</tr>
</blockTable>
<blockTable colWidths="103.0,53.0,61.0,72.0,72.0,66.0,71.0" style="Table9">
<blockTable colWidths="103.0,53.0,62.0,72.0,77.0,62.0,71.0" style="Table9">
<tr>
<td>
<para style="P11">
<font face="Times-Roman">[[ repeatIn(lines(o, data['form']['date1'], data['form']['date2']), 'a') ]] </font>
<font face="Times-Roman">[[ a['name'] ]]</font>
</para>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(lines(o, data['form']['date1'], data['form']['date2']), 'a') ]]</font>[[ a['name'] ]]</para>
</td>
<td>
<para style="P12">[[ a['code'] ]]</para>
<para style="P2">[[ a['code'] ]]</para>
</td>
<td>
<para style="P13">
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P13">
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P14">[[ '%.2f' % a['achievements'] ]]</para>
<para style="P3">[[ '%.2f' % a['achievements'] ]]</para>
</td>
<td>
<para style="P13">
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P13">
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="156.0,61.0,72.0,72.0,66.0,70.0" style="Table10">
<para style="Text body">
<font color="white"> </font>
</para>
<blockTable colWidths="156.0,61.0,72.0,76.0,62.0,71.0" style="Table10">
<tr>
<td>
<para style="P15">Total [[ o.code ]]</para>
<para style="P5">Total : [[ o.code ]]</para>
<para style="Table Contents">[[ repeatIn( post_total(o, data['form']['date1'], data['form']['date2']), 'total') ]]</para>
</td>
<td>
<para style="P16">[[ '%.2f' % total['prev'] ]]</para>
<para style="P4">[[ '%.2f' % total['prev'] ]]</para>
</td>
<td>
<para style="P16">[[ '%.2f' % total['prev_period'] ]]</para>
<para style="P4">[[ '%.2f' % total['prev_period'] ]]</para>
</td>
<td>
<para style="P16">[[ '%.2f' % total['achievements'] ]]</para>
<para style="P4">[[ '%.2f' % total['achievements'] ]]</para>
</td>
<td>
<para style="P16">[[ '%.2f' % (total['prev_period'] - total['achievements']) ]]</para>
<para style="P4">[[ '%.2f' % (total['prev_period'] - total['achievements']) ]]</para>
</td>
<td>
<para style="P16">[[ total['prev_period'] and ('%.2f' % (total['achievements'] / total['prev_period'] * 100.0)) or 0.0]] %</para>
<para style="P4">[[ total['prev_period'] and ('%.2f' % (total['achievements'] / total['prev_period'] * 100.0)) or 0.0]] %</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="Standard">
<font color="white"> </font>
</para>
</section>
<blockTable colWidths="156.0,61.0,72.0,72.0,67.0,68.0" style="Table7">
<blockTable colWidths="156.0,61.0,72.0,76.0,64.0,68.0" style="Table7">
<tr>
<td>
<para style="P17">Results</para>
<para style="Table Contents">[[ repeatIn( budget_total(objects, data['form']['date1'], data['form']['date2']), 'total') ]]</para>
<para style="P5">Results</para>
<para style="Table Contents">[[ repeatIn( budget_total(o, data['form']['date1'], data['form']['date2']), 'total') ]]</para>
</td>
<td>
<para style="P18">[[ '%.2f' % total['prev'] ]]</para>
<para style="P4">[[ '%.2f' % total['prev'] ]]</para>
</td>
<td>
<para style="P18">[[ '%.2f' % total['prev_period'] ]]</para>
<para style="P4">[[ '%.2f' % total['prev_period'] ]]</para>
</td>
<td>
<para style="P18">[[ '%.2f' % total['achievements'] ]]</para>
<para style="P4">[[ '%.2f' % total['achievements'] ]]</para>
</td>
<td>
<para style="P18">[[ '%.2f' % (total['prev_period'] - total['achievements']) ]]</para>
<para style="P4">[[ '%.2f' % (total['prev_period'] - total['achievements']) ]]</para>
</td>
<td>
<para style="P18">[[ '%.2f' % (total['achievements'] / total['prev_period'] * 100.0) ]] %</para>
<para style="P4">[[ '%.2f' % (total['achievements'] / total['prev_period'] * 100.0) ]] %</para>
</td>
</tr>
</blockTable>
@ -244,5 +304,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -10,167 +10,199 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,1" stop="1,1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#b3b3b3" start="0,0" stop="0,0"/>
<blockBackground colorName="#b3b3b3" start="1,0" stop="1,0"/>
<blockBackground colorName="#b3b3b3" start="2,0" stop="2,0"/>
<blockBackground colorName="#b3b3b3" start="3,0" stop="3,0"/>
<blockBackground colorName="#b3b3b3" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.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_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.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_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" 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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="499.0" repeatRows="1" style="Table1">
<para style="P5">[[ repeatIn(objects,'o') ]]</para>
<blockTable colWidths="499.0" style="Table2">
<tr>
<td>
<para style="P2">
<font face="Times-Roman">[[ company.name ]]</font>
</para>
<para style="terp_header_Centre">[[ company.name ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="250.0,250.0" repeatRows="1" style="Table6">
<blockTable colWidths="249.0,249.0" style="Table1">
<tr>
<td>
<para style="P7">
<font face="Times-Roman">Currency: [[ company.currency_id.name ]]</font>
<para style="P6">Currency: [[ company.currency_id.name ]]</para>
</td>
<td>
<para style="P7">Printed at: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S')]]</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_address">
Analysis from [[ data['form']['date_from'] ]] to [[ data['form']['date_to'] ]]
</para>
</td>
<td>
<para style="P8">Printed at: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S')]]</para>
<para style="P8">Budget : <font color="blue">[[ o.name ]]</font></para>
</td>
</tr>
</blockTable>
<blockTable colWidths="250.0,250.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P7">Analysis from [[ data['form']['date_from'] ]] to [[ data['form']['date_to'] ]]</para>
</td>
<td>
<para style="P8">Budget : [[ o.name ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="185.0,83.0,75.0,91.0,64.0" style="Table3">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="191.0,82.0,81.0,83.0,62.0" style="Table3">
<tr>
<td>
<para style="P5">Description</para>
<para style="P4">Description</para>
</td>
<td>
<para style="P5">Theoretical Amount</para>
<para style="P4">Theoretical Amount</para>
</td>
<td>
<para style="P5">Planned Amount</para>
<para style="P4">Planned Amount</para>
</td>
<td>
<para style="P5">Practical Amount</para>
<para style="P4">Practical Amount</para>
</td>
<td>
<para style="P5">%</para>
<para style="P4">Perc(%)</para>
</td>
</tr>
</blockTable>
<para style="P5">
<font color="white"> </font>
</para>
<section>
<para style="P4">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
<blockTable colWidths="185.0,83.0,75.0,91.0,64.0" style="Table4">
<tr>
<td>
<para style="P3">
<font>[['.....'*(a['status']-1) ]][[ setTag('font','font',{'color':'white'}) ]]</font><font>[[ a['status']==1 and ( setTag('font','font',{'name':'Times-bold'})) ]][[ a['name'] ]]</font>
</para>
</td>
<td>
<para style="P6">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['theo'] ]]</para>
</td>
<td>
<para style="P6">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['pln'] ]]</para>
</td>
<td>
<para style="P6">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['prac'] ]]</para>
</td>
<td>
<para style="P6">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ '%.2f' % a['perc'] ]]%</para>
</td>
</tr>
</blockTable>
<para style="P5">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
<blockTable colWidths="191.0,82.0,80.0,84.0,61.0" style="Table4">
<tr>
<td>
<para style="P1"><font>[['.....' *(a['status']-1) ]] [[ setTag('font','font',{'color':'white'}) ]]</font><font>[[ a['status']==1 and (setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]]</font></para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['theo'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['pln'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['prac'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['perc'] ]]%</para>
</td>
</tr>
</blockTable>
</section>
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="185.0,83.0,75.0,91.0,64.0" style="Table5">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="191.0,83.0,80.0,84.0,61.0" style="Table5">
<tr>
<td>
<para style="P10">Total:</para>
<para style="P3"><font face="Times-Roman">[[ repeatIn(funct_total(data['form']),'b') ]]</font> <b>Total :</b></para>
</td>
<td>
<para style="P6">[[ repeatIn(funct_total(data['form']),'b') ]] <font face="Times-Roman">[[ '%.2f' % b ['tot_theo'] ]]</font></para>
<para style="P3">[[ '%.2f' % b['tot_theo'] ]]</para>
</td>
<td>
<para style="P6">[[ '%.2f' % b['tot_pln'] ]]</para>
<para style="P2">[[ '%.2f' % b['tot_pln'] ]]</para>
</td>
<td>
<para style="P6">[[ '%.2f' % b['tot_prac'] ]]</para>
<para style="P2">[[ '%.2f' % b['tot_prac'] ]]</para>
</td>
<td>
<para style="P6">[[ '%.2f' % b['tot_perc'] ]]%</para>
<para style="P2">[[ '%.2f' % b['tot_perc'] ]]%</para>
</td>
</tr>
</blockTable>
<para style="P4">
<para style="P5">
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -1,22 +1,22 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\""
"POT-Creation-Date: 2008-09-05 16:23+0000\n"
"PO-Revision-Date: 2008-10-10 06:24+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-10 06:28+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue!"

View File

@ -1,24 +1,25 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_followup
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:26+0000\n"
"PO-Revision-Date: 2008-10-10 06:38+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-10 06:40+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,next,partner_ids:0
msgid "Partners"
msgstr ""
msgstr "Partenaires"
#. module: account_followup
#: field:account_followup.followup.line,start:0
@ -31,12 +32,6 @@ msgstr "Type de terme"
msgid "All payable entries"
msgstr "Toutes les entrées payables"
#. module: account_followup
#, python-format
#: code:addons/account_followup/wizard/wizard_followup_print.py:0
msgid "No Follow up Defined"
msgstr ""
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Date:"
@ -60,7 +55,7 @@ msgstr "Montant total dû :"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(user_signature)s: User name"
msgstr ""
msgstr "%(user_signature)s: nom de l'utilisateur"
#. module: account_followup
#: field:account_followup.stat,account_type:0
@ -70,7 +65,7 @@ msgstr "Type de compte"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "Select partners"
msgstr ""
msgstr "Sélectionnez les partenaires"
#. module: account_followup
#: field:account_followup.followup,followup_line:0
@ -81,12 +76,12 @@ msgstr "Suivis"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,sendmail:0
msgid "Mail"
msgstr ""
msgstr "Message"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,sendmail,mail_sent:0
msgid "Number of Mail sent"
msgstr ""
msgstr "Nombre de Messages envoyés"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -101,12 +96,12 @@ msgstr "Réf"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(followup_amount)s: Total Amount Due"
msgstr ""
msgstr "%(followup_amount)s: Montant Total Dû"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(date)s: Current Date"
msgstr ""
msgstr "%(date)s: Date Courante"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -138,8 +133,11 @@ msgstr "Relevé de compte"
#. module: account_followup
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_followup
#: field:account_followup.stat,debit:0
@ -149,7 +147,7 @@ msgstr "Débit"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,next,email_subject:0
msgid "Email Subject"
msgstr ""
msgstr "Sujet du Message"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -158,13 +156,20 @@ msgstr "Payé"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Exception made if there was a mistake of ours, it seems that the following bills staid unpaid. Please, take appropriate measures in order to carry out this payment in the next 8 days."
msgstr "Sauf erreur de notre part, il ressort de nos comptes que les montants suivants demeurent impayés à ce jour. Nous vous invitons dès lors à faire le nécessaire pour procéder à ce paiement afin qu'il nous parvienne dans les 10 jours."
msgid ""
"Exception made if there was a mistake of ours, it seems that the following "
"bills staid unpaid. Please, take appropriate measures in order to carry out "
"this payment in the next 8 days."
msgstr ""
"Sauf erreur de notre part, il ressort de nos comptes que les montants "
"suivants demeurent impayés à ce jour. Nous vous invitons dès lors à faire le "
"nécessaire pour procéder à ce paiement afin qu'il nous parvienne dans les 10 "
"jours."
#. module: account_followup
#: wizard_button:account_followup.followup.print.all,sendmail,end:0
msgid "Ok"
msgstr ""
msgstr "Ok"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -174,7 +179,7 @@ msgstr "."
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(line)s: Account Move lines"
msgstr ""
msgstr "%(line)s: lignes de Mouvement de Compte"
#. module: account_followup
#: field:account_followup.stat,date_followup:0
@ -184,7 +189,7 @@ msgstr "Derniere relance"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "Email confirmation"
msgstr ""
msgstr "Confirmation du Message"
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_followup_line
@ -194,7 +199,7 @@ msgstr "Critère de relance"
#. module: account_followup
#: wizard_button:account_followup.followup.print.all,next,print:0
msgid "Print Follow Ups"
msgstr ""
msgstr "Imprimer les Suivis"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -210,32 +215,38 @@ msgstr ":"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "Legend"
msgstr ""
msgstr "Légende"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,next,email_conf:0
msgid "Send email confirmation"
msgstr ""
msgstr "Envoyer un Message de confirmation"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(company_name)s: User's Company name"
msgstr ""
msgstr "%(company_name)s: nom de la Société de l'utilisateur"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "FollowUp selection"
msgstr ""
msgstr "Sélection du Suivi"
#. module: account_followup
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue!"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Would your payment have been carried out after this mail was sent, please consider the present one as void. Do not hesitate to contact our accounting departement at (+32).10.68.94.39."
msgstr "Si votre paiement a croisé le présent rappel, veuillez considérer celui-ci comme nul et non-avenu. N'hésitez pas à prendre contact avec notre service comptabilité si besoin."
msgid ""
"Would your payment have been carried out after this mail was sent, please "
"consider the present one as void. Do not hesitate to contact our accounting "
"departement at (+32).10.68.94.39."
msgstr ""
"Si votre paiement a croisé le présent rappel, veuillez considérer celui-ci "
"comme nul et non-avenu. N'hésitez pas à prendre contact avec notre service "
"comptabilité si besoin."
#. module: account_followup
#: field:account_followup.followup.line,name:0
@ -261,12 +272,12 @@ msgstr "Lit."
#. module: account_followup
#: model:ir.ui.menu,name:account_followup.menu_account_move_open_unreconcile
msgid "All receivable entries"
msgstr ""
msgstr "Toutes les entrées recevables"
#. module: account_followup
#: field:account_followup.followup.line,description:0
msgid "Printed Message"
msgstr ""
msgstr "Imprimer le Message"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -277,12 +288,7 @@ msgstr "Cher Monsieur"
#: wizard_view:account_followup.followup.print.all,sendmail:0
msgid "Mail not sent to following Partners , Email not available !"
msgstr ""
#. module: account_followup
#, python-format
#: code:addons/account_followup/wizard/wizard_followup_print.py:0
msgid "You must define at least one follow up for your company !"
msgstr ""
"Message non envoyé aux Partenaires suivants, adresse Email non disponible !"
#. module: account_followup
#: rml:account_followup.followup.print:0
@ -292,22 +298,22 @@ msgstr "Échu"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,init:0
msgid "Select a date"
msgstr ""
msgstr "Sélectionnez une date"
#. module: account_followup
#: wizard_button:account_followup.followup.print.all,init,next:0
msgid "Continue"
msgstr ""
msgstr "Continuer"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,sendmail,mail_notsent:0
msgid "Error Messages"
msgstr ""
msgstr "Messages d'erreur"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(heading)s: Move line header"
msgstr ""
msgstr "%(heading)s: entête de la ligne de Mouvement"
#. module: account_followup
#: field:account_followup.stat,name:0
@ -329,7 +335,7 @@ msgstr "Envoyer relances"
#. module: account_followup
#: wizard_button:account_followup.followup.print.all,next,sendmail:0
msgid "Send Mail"
msgstr ""
msgstr "Envoyer le message"
#. module: account_followup
#: view:account.move.line:0
@ -344,7 +350,9 @@ msgstr "Sous-total:"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Best regards."
msgstr "Nous vous prions d'agréer, Madame, Monsieur, l'expression de nos sentiments distingués."
msgstr ""
"Nous vous prions d'agréer, Madame, Monsieur, l'expression de nos sentiments "
"distingués."
#. module: account_followup
#: selection:account_followup.followup.line,start:0
@ -364,7 +372,7 @@ msgstr "Relances"
#: wizard_field:account_followup.followup.print.all,next,email_body:0
#: wizard_view:account_followup.followup.print.all,next:0
msgid "Email body"
msgstr ""
msgstr "Corps du Message"
#. module: account_followup
#: field:account_followup.stat,date_move_last:0
@ -414,7 +422,7 @@ msgstr "Echéance"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(partner_name)s: Partner name"
msgstr ""
msgstr "%(partner_name)s: nom du Partenaire"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
@ -451,4 +459,3 @@ msgstr "Entreprise"
#: field:account.move.line,followup_line_id:0
msgid "Follow-up Level"
msgstr "Dernier suivi"

View File

@ -1,155 +1,161 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_invoice_layout
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:12+0000\n"
"PO-Revision-Date: 2008-10-10 06:56+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-10 07:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Sub Total"
msgstr ""
msgstr "Sous-Total"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Invoice Date:"
msgstr ""
msgstr "Date de Facture :"
#. module: account_invoice_layout
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
#: field:notify.message,name:0
msgid "Title"
msgstr ""
msgstr "Titre"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Disc. (%)"
msgstr ""
msgstr "Rem. (%)"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Note"
msgstr ""
msgstr "Note"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Invoice"
msgstr ""
msgstr "Facture fournisseur"
#. module: account_invoice_layout
#: help:notify.message,msg:0
msgid "This notification will appear at the bottom of the Invoices when printed."
msgid ""
"This notification will appear at the bottom of the Invoices when printed."
msgstr ""
"Cette notification apparaîtra en bas de la facture lorsqu'elle sera imprimée."
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Unit Price"
msgstr ""
msgstr "Prix unitaire"
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
msgid "Notify By Messages"
msgstr ""
msgstr "Notifier par Messages"
#. module: account_invoice_layout
#: wizard_button:wizard.notify_message,init,print:0
msgid "Print"
msgstr ""
msgstr "Imprimer"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Document"
msgstr ""
msgstr "Document"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "PRO-FORMA"
msgstr ""
msgstr "PRO-FORMA"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Taxes:"
msgstr ""
msgstr "Taxes :"
#. module: account_invoice_layout
#: view:account.invoice.line:0
msgid "Seq."
msgstr ""
msgstr "Séq."
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
msgid "Notification Message"
msgstr ""
msgstr "Message de Notification"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Customer Ref:"
msgstr ""
msgstr "Réf. client :"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description"
msgstr ""
msgstr "Description"
#. module: account_invoice_layout
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_1
msgid "Formatted Inv."
msgstr ""
msgstr "Fact. Formattée"
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
msgid "Type"
msgstr ""
msgstr "Type"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Price"
msgstr ""
msgstr "Prix"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Canceled Invoice"
msgstr ""
msgstr "Facture annulée"
#. module: account_invoice_layout
#: field:account.invoice,abstract_line_ids:0
msgid "Invoice Lines"
msgstr ""
msgstr "Lignes de facture"
#. module: account_invoice_layout
#: field:account.invoice.line,functional_field:0
msgid "Source Account"
msgstr ""
msgstr "Compte d'origine"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Base"
msgstr ""
msgstr "Base"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Fax :"
msgstr ""
msgstr "Fax :"
#. module: account_invoice_layout
#: field:notify.message,msg:0
msgid "Special Message"
msgstr ""
msgstr "Message Spécial"
#. module: account_invoice_layout
#: view:notify.message:0
@ -159,125 +165,124 @@ msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid ":"
msgstr ""
msgstr ":"
#. module: account_invoice_layout
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue!"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Invoice"
msgstr ""
msgstr "Facture"
#. module: account_invoice_layout
#: wizard_view:wizard.notify_message,init:0
msgid "Select Message"
msgstr ""
msgstr "Sélectionnez le Message"
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Messages"
msgstr ""
msgstr "Messages"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Product"
msgstr ""
msgstr "Produit"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Taxes"
msgstr ""
msgstr "Taxes"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Page Break"
msgstr ""
msgstr "Saut de page"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Amount"
msgstr ""
msgstr "Montant"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Separator Line"
msgstr ""
msgstr "Ligne de séparation"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total (excl. taxes):"
msgstr ""
msgstr "Total (Hors Taxes) :"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Draft Invoice"
msgstr ""
msgstr "Facture brouillon"
#. module: account_invoice_layout
#: field:account.invoice.line,sequence:0
msgid "Sequence Number"
msgstr ""
msgstr "Numéro Séquence"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Quantity"
msgstr ""
msgstr "Quantité"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Refund"
msgstr ""
msgstr "Note de crédit"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "VAT :"
msgstr ""
msgstr "TVA :"
#. module: account_invoice_layout
#: model:ir.actions.wizard,name:account_invoice_layout.wizard_notify_message
msgid "Formatted Inv. + Message"
msgstr ""
msgstr "Fact. Formattée + Message"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tax"
msgstr ""
msgstr "Taxe"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "(incl. taxes):"
msgstr ""
msgstr "(taxes incl.):"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tel. :"
msgstr ""
msgstr "Tél. :"
#. module: account_invoice_layout
#: wizard_button:wizard.notify_message,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Annuler"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Refund"
msgstr ""
msgstr "Note de Crédit Fournisseur"
#. module: account_invoice_layout
#: wizard_field:wizard.notify_message,init,message:0
msgid "Message"
msgstr ""
msgstr "Message"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total"
msgstr ""
msgstr "Total"
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form
msgid "All Notification Messages"
msgstr ""
msgstr "Tous les Messages de Notification"

View File

@ -1,73 +1,77 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:42+0000"
"PO-Revision-Date: 2008-09-11 15:41:42+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:29+0000\n"
"PO-Revision-Date: 2008-10-10 08:14+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-10 08:16+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
#: field:payment.order,date_planned:0
msgid "Scheduled date if fixed"
msgstr ""
msgstr "Date prévue si fixé"
#. module: account_payment
#: view:payment.order:0
msgid "Set to draft"
msgstr ""
msgstr "Remettre en brouillon"
#. module: account_payment
#: field:payment.order,line_ids:0
msgid "Payment lines"
msgstr ""
msgstr "Lignes de paiement"
#. module: account_payment
#: field:payment.line,info_owner:0
#: view:payment.line:0
#: view:payment.order:0
msgid "Owner Account"
msgstr ""
msgstr "Compte du Partenaire principal"
#. module: account_payment
#: field:account.invoice,amount_to_pay:0
msgid "Amount to be paid"
msgstr ""
msgstr "Montant à payer"
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_open
#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_open
msgid "Payment orders to validate"
msgstr ""
msgstr "Payment orders to validate"
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
msgid "The amount which should be paid at the current date\n"
msgid ""
"The amount which should be paid at the current date\n"
"minus the amount which is already in payment order"
msgstr ""
"Le montant qui doit être payé à la date courante\n"
"moins le montant qui se trouve déjà dans l'ordre de paiement"
#. module: account_payment
#: selection:payment.line,state:0
msgid "Free"
msgstr ""
msgstr "Libre"
#. module: account_payment
#: wizard_field:populate_payment,search,entries:0
msgid "Entries"
msgstr ""
msgstr "Entrées"
#. module: account_payment
#: wizard_field:populate_payment,init,duedate:0
msgid "Due Date"
msgstr ""
msgstr "Date d'échéance"
#. module: account_payment
#: view:account.move.line:0
@ -77,29 +81,29 @@ msgstr "Écritures comptables"
#. module: account_payment
#: wizard_button:populate_payment,search,create:0
msgid "_Add to payment order"
msgstr ""
msgstr "_Ajouter à l'ordre de paiement"
#. module: account_payment
#: rml:payement.order:0
#: view:payment.order:0
msgid "Amount"
msgstr ""
msgstr "Montant"
#. module: account_payment
#: rml:payement.order:0
msgid "Execution date:"
msgstr ""
msgstr "Date d'exécution :"
#. module: account_payment
#: selection:payment.order,state:0
msgid "Cancelled"
msgstr ""
msgstr "Annulé"
#. module: account_payment
#: rml:payement.order:0
#: field:payment.order,reference:0
msgid "Reference"
msgstr ""
msgstr "Référence"
#. module: account_payment
#: view:account.move.line:0
@ -109,90 +113,84 @@ msgstr "Total débit"
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Directly"
msgstr ""
msgstr "Directement"
#. module: account_payment
#: selection:payment.order,state:0
msgid "Draft"
msgstr ""
msgstr "Brouillon"
#. module: account_payment
#: field:payment.type,suitable_bank_types:0
msgid "Suitable bank types"
msgstr ""
msgstr "Types de banques appropriés"
#. module: account_payment
#: view:payment.line:0
msgid "Amount Total"
msgstr ""
msgstr "Montant Total"
#. module: account_payment
#: selection:payment.order,state:0
msgid "Confirmed"
msgstr ""
msgstr "Confirmé"
#. module: account_payment
#: help:payment.line,ml_date_created:0
msgid "Invoice Effective Date"
msgstr ""
msgstr "Date effective de la Facture"
#. module: account_payment
#: selection:payment.line,state:0
msgid "Structured"
msgstr ""
msgstr "Structuré"
#. module: account_payment
#: field:payment.order,state:0
msgid "State"
msgstr ""
msgstr "État"
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Transaction Information"
msgstr ""
msgstr "Information sur la Transaction"
#. module: account_payment
#: field:payment.line,ml_date_created:0
msgid "Effective Date"
msgstr ""
msgstr "Date Effective"
#. module: account_payment
#: field:payment.line,move_line_id:0
msgid "Entry line"
msgstr ""
#. module: account_payment
#, python-format
#: code:addons/account_payment/account_move_line.py:0
msgid "Error !"
msgstr ""
msgstr "Ligne d'entrée"
#. module: account_payment
#: field:payment.order,date_done:0
msgid "Execution date"
msgstr ""
msgstr "Date d'exécution"
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Fixed date"
msgstr ""
msgstr "Date fixée"
#. module: account_payment
#: field:payment.line,info_partner:0
msgid "Destination Account"
msgstr ""
msgstr "Compte de destination"
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Desitination Account"
msgstr ""
msgstr "Compte de destination"
#. module: account_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue!"
#. module: account_payment
#: wizard_button:populate_payment,init,end:0
@ -204,51 +202,51 @@ msgstr "_Annuler"
#. module: account_payment
#: field:payment.line,create_date:0
msgid "Created"
msgstr ""
msgstr "Créé"
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Currency Amount Total"
msgstr ""
msgstr "Montant Total dans la devise"
#. module: account_payment
#: field:payment.line,state:0
msgid "Communication Type"
msgstr ""
msgstr "Type de communication"
#. module: account_payment
#: rml:payement.order:0
#: field:payment.line,partner_id:0
msgid "Partner"
msgstr ""
msgstr "Partenaire"
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Due date"
msgstr ""
msgstr "Date de l'échéance"
#. module: account_payment
#: field:payment.line,communication:0
msgid "Communication"
msgstr ""
msgstr "Communication"
#. module: account_payment
#: field:payment.line,company_currency:0
#: field:payment.line,currency:0
msgid "Currency"
msgstr ""
msgstr "Devise"
#. module: account_payment
#: help:payment.line,amount_currency:0
msgid "Payment amount in the partner currency"
msgstr ""
msgstr "Montant du paiement dans la devise du partenaire"
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_draft
#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_draft
msgid "Draft payment order"
msgstr ""
msgstr "Ordre de Paiement Brouillon"
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
@ -256,28 +254,22 @@ msgstr ""
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment Line"
msgstr ""
#. module: account_payment
#, python-format
#: code:addons/account_payment/account_move_line.py:0
msgid "No partner defined on entry line"
msgstr ""
msgstr "Ligne de paiement"
#. module: account_payment
#: field:payment.line,order_id:0
msgid "Order"
msgstr ""
msgstr "Commande"
#. module: account_payment
#: model:ir.actions.wizard,name:account_payment.wizard_populate_payment
msgid "Populate payment"
msgstr ""
msgstr "Remplir le paiement"
#. module: account_payment
#: field:payment.order,user_id:0
msgid "User"
msgstr ""
msgstr "Utilisateur"
#. module: account_payment
#: wizard_field:populate_statement,init,lines:0
@ -287,22 +279,22 @@ msgstr "Lignes de paiement"
#. module: account_payment
#: rml:payement.order:0
msgid "Date"
msgstr ""
msgstr "Date"
#. module: account_payment
#: rml:payement.order:0
msgid "Reference:"
msgstr ""
msgstr "Réference :"
#. module: account_payment
#: field:payment.line,date:0
msgid "Payment Date"
msgstr ""
msgstr "Date de Paiement"
#. module: account_payment
#: field:payment.order,date_created:0
msgid "Creation date"
msgstr ""
msgstr "Date de création"
#. module: account_payment
#: field:payment.line,ml_maturity_date:0
@ -312,128 +304,135 @@ msgstr ""
#. module: account_payment
#: view:account.bank.statement:0
msgid "Import payment lines"
msgstr ""
msgstr "Importer les lignes de paiement"
#. module: account_payment
#: field:account.move.line,amount_to_pay:0
msgid "Amount to pay"
msgstr ""
msgstr "Montant à payer"
#. module: account_payment
#: field:payment.line,amount:0
msgid "Amount in Company Currency"
msgstr ""
msgstr "Montant dans la devise de la société"
#. module: account_payment
#: field:payment.line,ml_inv_ref:0
msgid "Invoice Ref"
msgstr ""
msgstr "Réf. Facture"
#. module: account_payment
#: field:payment.type,code:0
msgid "Code"
msgstr ""
msgstr "Code"
#. module: account_payment
#: field:payment.line,name:0
msgid "Your Reference"
msgstr ""
msgstr "Votre Référence"
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_form
#: view:payment.order:0
msgid "Payment order"
msgstr ""
msgstr "Ordre de paiement"
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "General Information"
msgstr ""
msgstr "Infos générales"
#. module: account_payment
#: selection:payment.order,state:0
msgid "Done"
msgstr ""
msgstr "Terminé"
#. module: account_payment
#: view:payment.order:0
msgid "Select Invoices to Pay"
msgstr ""
msgstr "Sélectionnez les Factures à Payer"
#. module: account_payment
#: view:payment.order:0
msgid "Cancel"
msgstr ""
msgstr "Annuler"
#. module: account_payment
#: view:payment.order:0
msgid "Open"
msgstr ""
msgstr "Ouvrir"
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Information"
msgstr ""
msgstr "Information"
#. module: account_payment
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_payment
#: model:ir.actions.wizard,name:account_payment.wizard_pay_payment
msgid "Pay"
msgstr ""
msgstr "Payer"
#. module: account_payment
#: model:ir.actions.report.xml,name:account_payment.payment_order
#: model:ir.model,name:account_payment.model_payment_order
msgid "Payment Order"
msgstr ""
msgstr "Ordre de Paiement"
#. module: account_payment
#: help:payment.line,amount:0
msgid "Payment amount in the company currency"
msgstr ""
msgstr "Montant du paiement dans la devise de la société"
#. module: account_payment
#: wizard_view:populate_payment,init:0
msgid "Search Payment lines"
msgstr ""
msgstr "Rechercher des lignes de paiement"
#. module: account_payment
#: field:payment.line,amount_currency:0
msgid "Amount in Partner Currency"
msgstr ""
msgstr "Montant dans la Devise du Partenaire"
#. module: account_payment
#: field:payment.line,communication2:0
msgid "Communication 2"
msgstr ""
msgstr "Communication 2"
#. module: account_payment
#: field:payment.line,bank_id:0
msgid "Destination Bank account"
msgstr ""
msgstr "Compte banquaire de destination"
#. module: account_payment
#: field:payment.mode,journal:0
msgid "Journal"
msgstr ""
msgstr "Journal"
#. module: account_payment
#: rml:payement.order:0
#: field:payment.mode,bank_id:0
msgid "Bank account"
msgstr ""
msgstr "Compte banquaire"
#. module: account_payment
#: help:payment.line,date:0
msgid "If no payment date is specified, the bank will treat this payment line direclty"
msgid ""
"If no payment date is specified, the bank will treat this payment line "
"direclty"
msgstr ""
"Si aucune date de paiement n'est spécifiée, la banque traitera ce paiement "
"immediatement"
#. module: account_payment
#: model:ir.ui.menu,name:account_payment.menu_main
@ -441,35 +440,29 @@ msgstr ""
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment"
msgstr ""
msgstr "Paiement"
#. module: account_payment
#: field:payment.mode,name:0
#: field:payment.type,name:0
msgid "Name"
msgstr ""
msgstr "Nom"
#. module: account_payment
#: wizard_button:populate_payment,init,search:0
msgid "_Search"
msgstr ""
msgstr "Re_chercher"
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Entry Information"
msgstr ""
#. module: account_payment
#, python-format
#: code:addons/account_payment/account_move_line.py:0
msgid "Partner '+ line.partner_id.name+ ' has no bank account defined"
msgstr ""
msgstr "Information sur l'entrée"
#. module: account_payment
#: model:ir.actions.wizard,name:account_payment.wizard_populate_statement
msgid "Populate Statement with Payment lines"
msgstr ""
msgstr "Remplir la déclaration avec les lignes de paiement"
#. module: account_payment
#: view:account.move.line:0
@ -481,12 +474,12 @@ msgstr "Total crédit"
#: field:payment.mode,type:0
#: view:payment.type:0
msgid "Payment type"
msgstr ""
msgstr "Type de paiement"
#. module: account_payment
#: view:payment.order:0
msgid "Make Payment"
msgstr ""
msgstr "Effectuer le paiement"
#. module: account_payment
#: wizard_button:populate_statement,init,add:0
@ -496,7 +489,7 @@ msgstr "_Ajouter"
#. module: account_payment
#: field:payment.order,date_prefered:0
msgid "Prefered date"
msgstr ""
msgstr "Date de préférence"
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_mode_form
@ -505,10 +498,9 @@ msgstr ""
#: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form
#: view:payment.mode:0
msgid "Payment mode"
msgstr ""
msgstr "Mode de paiement"
#. module: account_payment
#: field:payment.order,total:0
msgid "Total"
msgstr ""
msgstr "Total"

View File

@ -30,6 +30,7 @@
import account
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -40,6 +40,7 @@
"security/ir.model.access.csv",
"account_view.xml",
"account_report.xml",
"account_wizard.xml",
],
# "translations" : {
# "fr": "i18n/french_fr.csv"

View File

@ -30,7 +30,7 @@
import time
import netsvc
from osv import fields, osv
import pooler
from tools.misc import currency
import mx.DateTime
@ -40,25 +40,25 @@ from mx.DateTime import RelativeDateTime, now, DateTime, localtime
class account_report(osv.osv):
_name = "account.report.report"
_description = "Account reporting"
_color = [
('', ''),
('green','Green'),
('red','Red'),
('pink','Pink'),
('blue','Blue'),
('yellow','Yellow'),
('cyan','Cyan'),
('lightblue','Light Blue'),
('orange','Orange'),
]
_style = [
('1','Header 1'),
('2','Header 2'),
('3','Header 3'),
('4','Header 4'),
('5','Normal'),
('6', 'Small'),
]
# _color = [
# ('', ''),
# ('green','Green'),
# ('red','Red'),
# ('pink','Pink'),
# ('blue','Blue'),
# ('yellow','Yellow'),
# ('cyan','Cyan'),
# ('lightblue','Light Blue'),
# ('orange','Orange'),
# ]
# _style = [
# ('1','Header 1'),
# ('2','Header 2'),
# ('3','Header 3'),
# ('4','Header 4'),
# ('5','Normal'),
# ('6', 'Small'),
# ]
def _amount_get(self, cr, uid, ids, field_name, arg, context={}):
def _calc_credit(*code):
@ -85,25 +85,26 @@ class account_report(osv.osv):
'balance': _calc_balance,
'report': _calc_report,
}
if field_name=='status':
fld_name = 'expression_status'
else:
fld_name = 'expression'
# if field_name=='status':
# fld_name = 'expression_status'
# else:
# fld_name = 'expression'
try:
val = eval(getattr(rep, fld_name), objdict)
val = eval(getattr(rep,'expression'), objdict)
except:
val = 0.0
if field_name=='status':
if val<-1:
if val<rep.badness_limit:
result[rep.id] = 'very bad'
elif val<0:
elif val==rep.badness_limit:
result[rep.id] = 'bad'
elif val==0:
elif val<rep.goodness_limit:
result[rep.id] = 'normal'
elif val<1:
elif val==rep.goodness_limit:
result[rep.id] = 'good'
else:
result[rep.id] = 'excellent'
result[rep.id] = 'very good'
else:
result[rep.id] = val
return result
@ -113,8 +114,8 @@ class account_report(osv.osv):
if parent_id:
acc=self.pool.get('account.report.report').browse(cr,uid,parent_id)
v['type']=acc.type
if int(acc.style) < 6:
v['style'] = str(int(acc.style)+1)
# if int(acc.style) < 6:
# v['style'] = str(int(acc.style)+1)
return {'value': v}
_columns = {
@ -125,10 +126,13 @@ class account_report(osv.osv):
'type': fields.selection([
('fiscal', 'Fiscal statement'),
('indicator','Indicator'),
('view','View'),
('other','Others')],
'Type', required=True),
'expression': fields.char('Expression', size=240, required=True),
'expression_status': fields.char('Status expression', size=240, required=True),
# 'expression_status': fields.char('Status expression', size=240, required=True),
'badness_limit' :fields.float('Badness Indicator Limit', digits=(16,2),help='This Value depicts the limit of badness.'),
'goodness_limit' :fields.float('Goodness Indicator Limit', digits=(16,2),help='This Value depicts the limit of goodness.'),
'parent_id': fields.many2one('account.report.report', 'Parent'),
'child_ids': fields.one2many('account.report.report', 'parent_id', 'Childs'),
'note': fields.text('Note'),
@ -139,17 +143,19 @@ class account_report(osv.osv):
selection=[
('very bad', 'Very Bad'),
('bad', 'Bad'),
('normal', ''),
('normal', 'Normal'),
('good', 'Good'),
('excellent', 'Excellent')
('very good', 'Very Good')
],
string='Status'),
'style': fields.selection(_style, 'Style', required=True),
'color_font' : fields.selection(_color, 'Font Color', help="Font Color for the report"),
'color_back' : fields.selection(_color, 'Back Color')
'disp_tree':fields.boolean('Display Tree',help='When the indicators will be printed, if one indicator is set with this field to True, then it will display one more graph with all its children in tree'),
'disp_graph':fields.boolean('Display as a Graph',help='If the field is set to True,information will be printed as a Graph; as an array otherwise.'),
# 'style': fields.selection(_style, 'Style', required=True),
# 'color_font' : fields.selection(_color, 'Font Color', help="Font Color for the report"),
# 'color_back' : fields.selection(_color, 'Back Color')
}
_defaults = {
'style': lambda *args: '5',
# 'style': lambda *args: '5',
'active': lambda *args: True,
'type': lambda *args: 'indicator',
}
@ -177,5 +183,37 @@ class account_report(osv.osv):
account_report()
class account_report_history(osv.osv):
def _calc_value(self, cr, uid, ids, name, args, context):
acc_report_id=self.read(cr,uid,ids,['tmp','period_id'])
tmp_ids={}
for a in acc_report_id:
period_val=pooler.get_pool(cr.dbname).get('account.period').read(cr,uid,[a['period_id'][0]])[0]
period_id=pooler.get_pool(cr.dbname).get('account.period').search(cr,uid,[('date_start','<=',period_val['date_start']),('fiscalyear_id','=',period_val['fiscalyear_id'][0])])
tmp_ids[a['id']] = pooler.get_pool(cr.dbname).get('account.report.report').read(cr,uid,[a['tmp']],context={'periods':period_id})[0]['amount']
return tmp_ids
_name = "account.report.history"
_description = "Indicator"
_table = "account_report"
_auto = False
_order='name'
_columns = {
'period_id': fields.many2one('account.period','Period', readonly=True, select=True),
'fiscalyear_id': fields.many2one('account.fiscalyear','Fiscal Year', readonly=True, select=True),
'name': fields.many2one('account.report.report','Indicator', readonly=True, select=True),
'val': fields.function(_calc_value, method=True, string='Value', readonly=True),
'tmp' : fields.integer(string='temp',readonly=True)
}
def init(self, cr):
cr.execute('''create or replace view account_report as (select ar.id as tmp,((pr.id*100000)+ar.id) as id,ar.id as name,pr.id as period_id,pr.fiscalyear_id as fiscalyear_id from account_report_report as ar cross join account_period as pr group by ar.id,pr.id,pr.fiscalyear_id)''')
def unlink(self, cr, uid, ids, context={}):
raise osv.except_osv(_('Error !'), _('You can not delete an indicator history record. You may have to delete the concerned Indicator!'))
account_report_history()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,5 +2,8 @@
<openerp>
<data>
<report auto="False" id="fiscal_statements" model="account.report.report" name="accounting.report" rml="account_report/report/accounting_report.rml" string="Fiscal Statements"/>
<report auto="False" id="report_print_indicators" model="account.report.report" name="report.print.indicators" rml="account_report/report/report_print_indicators.rml" string="Indicators"/>
</data>
</openerp>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_report_form" model="ir.ui.view">
<field name="name">account.report.report.form</field>
<field name="model">account.report.report</field>
@ -10,18 +10,22 @@
<form string="Accounting reporting">
<notebook>
<page string="General">
<field colspan="3" name="name" select="1"/>
<field colspan="4" name="name" select="1"/>
<field name="code" select="1"/>
<field name="active" select="1"/>
<field name="parent_id" on_change="onchange_parent_id(parent_id)"/>
<field name="sequence"/>
<field name="type" select="1"/>
<field name="style"/>
<field name="color_font"/>
<field name="color_back"/>
<newline/>
<!-- <field name="style"/>
<field name="color_font"/>
<field name="color_back"/>-->
<field name="badness_limit"/>
<field name="goodness_limit"/>
<field colspan="4" name="expression"/>
<field colspan="4" name="expression_status"/>
<field name="disp_tree"/>
<field name="disp_graph"/>
<!-- <field colspan="4" name="expression_status"/>-->
<separator colspan="4" string="Legend of operators"/>
<label align="1.0" string="Account debit:"/>
<label align="0.0" string="debit('ACCOUNT_CODE')"/>
@ -33,20 +37,22 @@
<label align="0.0" string="report('REPORT_CODE')"/>
<label align="1.0" string="Operators:"/>
<label align="0.0" string="+ - * / ( )"/>
<label colspan="4" string="Exemple: (balance('6','45') - credit('7')) / report('RPT1')"/>
<label colspan="4" string="Example: (balance('6','45') - credit('7')) / report('RPT1')"/>
<separator colspan="4" string="Return value for status"/>
<group col="2" colspan="1">
<label align="1.0" string="&lt; -1:"/>
<group col="2" colspan="2">
<label align="1.0" string="&lt; Badness Indicator Limit:"/>
<label align="0.0" string="Very bad"/>
<label align="1.0" string="-1:"/>
<label align="1.0" string="= Badness Indicator Limit:"/>
<label align="0.0" string="Bad"/>
<label align="1.0" string="0:"/>
<label align="0.0" string="Normal"/>
<label align="1.0" string="1:"/>
<!--<label align="1.0" string="0:"/>
<label align="0.0" string="Normal"/>-->
<label align="1.0" string="= Goodness Indicator Limit:"/>
<label align="0.0" string="Good"/>
<label align="1.0" string="&gt; 1:"/>
<label align="1.0" string="&gt; Goodness Indicator Limit:"/>
<label align="0.0" string="Very Good"/>
</group>
<group col="2" colspan="2">
</group>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
@ -55,7 +61,7 @@
</form>
</field>
</record>
<record id="view_account_report_tree_simple" model="ir.ui.view">
<field name="name">account.report.report.tree.simple</field>
<field name="model">account.report.report</field>
@ -67,7 +73,7 @@
</tree>
</field>
</record>
<record id="action_account_report_tree" model="ir.actions.act_window">
<field name="name">Custom reporting</field>
<field name="res_model">account.report.report</field>
@ -76,8 +82,9 @@
<field name="domain"/>
<field name="view_id" ref="view_account_report_tree_simple"/>
</record>
<menuitem action="action_account_report_tree" id="menu_action_account_report_tree_define" parent="account.menu_finance_configuration"/>
<record id="action_account_report_form" model="ir.actions.act_window">
<field name="name">New Reporting Item Formula</field>
<field name="res_model">account.report.report</field>
@ -85,7 +92,7 @@
<field name="view_mode">form,tree</field>
</record>
<menuitem action="action_account_report_form" id="menu_action_account_report_form" parent="account_report.menu_action_account_report_tree_define"/>
<record id="view_account_report_tree" model="ir.ui.view">
<field name="name">account.report.report.tree</field>
<field name="model">account.report.report</field>
@ -101,7 +108,7 @@
</tree>
</field>
</record>
<record id="action_account_report_tree_view" model="ir.actions.act_window">
<field name="name">Custom reporting</field>
<field name="res_model">account.fiscalyear</field>
@ -110,8 +117,8 @@
<field name="domain">[('parent_id','=',False)]</field>
</record>
<menuitem action="action_account_report_tree_view" id="menu_action_account_report_tree_view" parent="account.menu_finance_reporting"/>
<record id="action_account_report_tree_view_fiscal" model="ir.actions.act_window">
<field name="name">Fiscal Statements reporting</field>
<field name="res_model">account.fiscalyear</field>
@ -120,7 +127,7 @@
<field name="domain">[('type','=','fiscal'),('parent_id','=',False)]</field>
</record>
<menuitem action="action_account_report_tree_view_fiscal" id="menu_action_account_report_tree_view_fiscal" parent="account_report.menu_action_account_report_tree_view"/>
<record id="action_account_report_tree_view_indicator" model="ir.actions.act_window">
<field name="name">Indicators reporting</field>
<field name="res_model">account.fiscalyear</field>
@ -129,7 +136,7 @@
<field name="domain">[('type','=','indicator'),('parent_id','=',False)]</field>
</record>
<menuitem action="action_account_report_tree_view_indicator" id="menu_action_account_report_tree_view_indicator" parent="account_report.menu_action_account_report_tree_view"/>
<record id="action_account_report_tree_view_other" model="ir.actions.act_window">
<field name="name">Others reportings</field>
<field name="res_model">account.fiscalyear</field>
@ -138,7 +145,75 @@
<field name="domain">[('type','=','other'),('parent_id','=',False)]</field>
</record>
<menuitem action="action_account_report_tree_view_other" id="menu_action_account_report_tree_view_other" parent="account_report.menu_action_account_report_tree_view"/>
<record model="ir.ui.view" id="account_report_history_tree">
<field name="name">account.report.history1</field>
<field name="model">account.report.history</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Report History">
<field name="period_id"/>
<field name="fiscalyear_id"/>
<field name="name"/>
<field name="val"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="account_report_history_form">
<field name="name">account.report.history2</field>
<field name="model">account.report.history</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Report History">
<field name="period_id" select="2"/>
<field name="fiscalyear_id" select="1"/>
<field name="name" select="1"/>
<field name="val"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="account_report_history_graph">
<field name="name">account.report.history3</field>
<field name="model">account.report.history</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Account Report History" type="bar">
<field name="period_id"/>
<field name="val" operator="+"/>
<field name="name" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="account_report_history_record">
<field name="res_model">account.report.history</field>
<field name="name">All Indicators History</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="account_report_history_tree"/>
</record>
<menuitem id="menu_account_report_history_record" action="account_report_history_record" parent="account.menu_finance_reporting"/>
<act_window
id="account_report_history_record_structure"
name="Indicator history"
res_model="account.report.history"
src_model="account.report.report"
domain="[('name','=', active_id)]"
view_type="form"
view_mode="graph,tree"/>
<record model="ir.values" id="ir_open_account_history_view">
<field name="key2">tree_but_open</field>
<field name="model">account.report.report</field>
<field name="name">Open account history</field>
<field name="value" eval="'ir.actions.act_window,%d'%account_report_history_record_structure"/>
<field name="object" eval="True"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard id="wizard_print_indicators" name="print.indicators" string="Print Indicators"/>
<menuitem action="wizard_print_indicators" type="wizard" parent="account_report.menu_action_account_report_tree_view" id="menu_wizard_print_indicators"/>
</data>
</openerp>

View File

@ -1,19 +1,20 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_report
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:42+0000"
"PO-Revision-Date: 2008-09-11 15:41:42+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 13:23+0000\n"
"PO-Revision-Date: 2008-10-10 08:15+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-10 08:20+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report
#: selection:account.report.report,color_back:0
@ -35,7 +36,7 @@ msgstr "Style"
#. module: account_report
#: view:account.report.report:0
msgid "> 1:"
msgstr ""
msgstr "> 1:"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_other
@ -96,8 +97,11 @@ msgstr "Devise"
#. module: account_report
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_report
#: field:account.report.report,type:0
@ -145,7 +149,7 @@ msgstr "Normal"
#. module: account_report
#: view:account.report.report:0
msgid "0:"
msgstr ""
msgstr "0:"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_fiscal
@ -188,7 +192,7 @@ msgstr "Cyan"
#. module: account_report
#: view:account.report.report:0
msgid "debit('ACCOUNT_CODE')"
msgstr ""
msgstr "debit('ACCOUNT_CODE')"
#. module: account_report
#: help:account.report.report,color_font:0
@ -198,7 +202,7 @@ msgstr "Couleur de police pour le rapport"
#. module: account_report
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue!"
#. module: account_report
#: view:account.report.report:0
@ -255,7 +259,7 @@ msgstr "Valeur"
#. module: account_report
#: view:account.report.report:0
msgid "+ - * / ( )"
msgstr ""
msgstr "+ - * / ( )"
#. module: account_report
#: view:account.report.report:0
@ -298,7 +302,7 @@ msgstr "Bleu clair"
#. module: account_report
#: view:account.report.report:0
msgid "-1:"
msgstr ""
msgstr "-1:"
#. module: account_report
#: field:account.report.report,expression:0
@ -338,7 +342,7 @@ msgstr "Balance de compte"
#. module: account_report
#: view:account.report.report:0
msgid "1:"
msgstr ""
msgstr "1:"
#. module: account_report
#: selection:account.report.report,status:0
@ -392,7 +396,7 @@ msgstr "Montant Calculé"
#. module: account_report
#: view:account.report.report:0
msgid "< -1:"
msgstr ""
msgstr "< -1:"
#. module: account_report
#: view:account.report.report:0
@ -403,4 +407,3 @@ msgstr "Opérateurs"
#: selection:account.report.report,type:0
msgid "Fiscal statement"
msgstr "Extrait fiscal"

View File

@ -0,0 +1,33 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id$
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability 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
# garantees 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.
#
##############################################################################
import wizard_print_indicators
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,81 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id$
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability 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
# garantees 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.
#
##############################################################################
import wizard
import pooler
form = '''<?xml version="1.0"?>
<form string="Print Indicators">
<field name="indicator_id"/>
<field name="select_base"/>
</form>'''
fields = {
'indicator_id': {'string':'Choose Indicator', 'type':'many2one', 'relation': 'account.report.report','required':True,},
'select_base': {'string':'Choose Criteria', 'type':'selection','selection':[('year','Based On Fiscal Years'),('periods','Based on Fiscal Periods')],'required':True,},
}
next_form = '''<?xml version="1.0"?>
<form string="Print Indicators">
<field name="base_selection"/>
</form>'''
next_fields = {
'base_selection': {'string':'Select Criteria', 'type':'many2many','required':True,},
}
def _load(self, cr, uid, data, context):
data['form']['select_base'] = 'year'
return data['form']
def _load_base(self, cr, uid, data, context):
next_fields['base_selection']['relation']='account.fiscalyear'
if data['form']['select_base']=='periods':
next_fields['base_selection']['relation']='account.period'
return data['form']
class wizard_print_indicators(wizard.interface):
states = {
'init': {
'actions': [_load],
'result': {'type': 'form', 'arch':form, 'fields':fields, 'state':[('end','Cancel'),('next','Next')]}
},
'next': {
'actions': [_load_base],
'result': {'type':'form', 'arch':next_form, 'fields':next_fields, 'state':[('end','Cancel'),('print','Print')]}
},
'print': {
'actions':[],
'result' :{'type':'print','report':'report.print.indicators', 'state':'end'}
}
}
wizard_print_indicators('print.indicators')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,39 +1,43 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * account_reporting
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 16:32+0000\n"
"PO-Revision-Date: 2008-10-09 14:29+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 14:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_reporting
#: field:color.rml,code:0
msgid "code"
msgstr ""
msgstr "code"
#. module: account_reporting
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Bold"
msgstr ""
msgstr "Helvetica-Bold"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica"
msgstr ""
msgstr "Helvetica"
#. module: account_reporting
#: model:ir.actions.wizard,name:account_reporting.wizard_balance_report
@ -43,12 +47,12 @@ msgstr "Balance de compte"
#. module: account_reporting
#: field:account.report.bs,note:0
msgid "Note"
msgstr ""
msgstr "Note"
#. module: account_reporting
#: field:account.report.bs,report_type:0
msgid "Report Type"
msgstr ""
msgstr "Type de Rapport"
#. module: account_reporting
#: model:ir.ui.menu,name:account_reporting.action_account_report_bs_form
@ -59,12 +63,12 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier"
msgstr ""
msgstr "Courier"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-BoldOblique"
msgstr ""
msgstr "Courier-BoldOblique"
#. module: account_reporting
#: model:ir.ui.menu,name:account_reporting.bs_report_action_form
@ -74,7 +78,7 @@ msgstr ""
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Annuler"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
@ -89,33 +93,33 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Oblique"
msgstr ""
msgstr "Courier-Oblique"
#. module: account_reporting
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue"
#. module: account_reporting
#: field:account.report.bs,name:0
#: field:color.rml,name:0
msgid "Name"
msgstr ""
msgstr "Nom"
#. module: account_reporting
#: view:account.report.bs:0
msgid "Account reporting"
msgstr ""
msgstr "Rapport de compte"
#. module: account_reporting
#: field:account.report.bs,color_font:0
msgid "Font Color"
msgstr ""
msgstr "Couleur de la police"
#. module: account_reporting
#: view:account.report.bs:0
msgid "Notes"
msgstr ""
msgstr "Notes"
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,report:0
@ -125,12 +129,12 @@ msgstr ""
#. module: account_reporting
#: field:account.report.bs,code:0
msgid "Code"
msgstr ""
msgstr "Code"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Italic"
msgstr ""
msgstr "Times-Italic"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
@ -145,27 +149,27 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-BoldItalic"
msgstr ""
msgstr "Times-BoldItalic"
#. module: account_reporting
#: field:account.report.bs,child_id:0
msgid "Childs"
msgstr ""
msgstr "Enfants"
#. module: account_reporting
#: field:account.report.bs,parent_id:0
msgid "Parent"
msgstr ""
msgstr "Parent"
#. module: account_reporting
#: field:account.report.bs,sequence:0
msgid "Sequence"
msgstr ""
msgstr "Séquence"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Bold"
msgstr ""
msgstr "Times-Bold"
#. module: account_reporting
#: view:account.report.bs:0
@ -175,23 +179,23 @@ msgstr ""
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,fiscalyear:0
msgid "Fiscal year"
msgstr ""
msgstr "Année fiscale"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Bold"
msgstr ""
msgstr "Courier-Bold"
#. module: account_reporting
#: field:account.report.bs,account_id:0
#: view:account.report.bs:0
msgid "Accounts"
msgstr ""
msgstr "Comptes"
#. module: account_reporting
#: field:account.report.bs,color_back:0
msgid "Back Color"
msgstr ""
msgstr "Couleur de fond"
#. module: account_reporting
#: model:ir.model,name:account_reporting.model_account_report_bs
@ -201,20 +205,19 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Roman"
msgstr ""
msgstr "Times-Roman"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Oblique"
msgstr ""
msgstr "Helvetica-Oblique"
#. module: account_reporting
#: field:account.report.bs,font_style:0
msgid "Font"
msgstr ""
msgstr "Police"
#. module: account_reporting
#: wizard_view:account.account.balancesheet.report,init:0
msgid "Customize Report"
msgstr ""
msgstr "Personnaliser le Rapport"

View File

@ -66,7 +66,7 @@ back_fields={
zero_form='''<?xml version="1.0"?>
<form string="Notification">
<label string="You have to select atleast 1 Fiscal Year. Try again."/>
<label string="You have to select at least 1 Fiscal Year. Try again."/>
</form>'''
zero_fields={

View File

@ -2,7 +2,7 @@
{
"name" : "Auction module",
"version" : "1.0",
"depends" : ["base","account","l10n_be","hr"],
"depends" : ["base","account","l10n_be","hr_attendance"],
"update_xml" : [
"security/ir.model.access.csv",
"auction_view.xml", "auction_report.xml", "auction_wizard.xml"

View File

@ -103,8 +103,8 @@ Auction Management/Auction Dates/New Auction Dates
<field name="auction1" select="1"/>
<field name="auction2" select="1"/>
<separator string="Commissions" colspan="4"/>
<field name="seller_costs" domain="[('domain','=','auction')]"/>
<field name="buyer_costs" domain="[('domain','=','auction')]"/>
<field name="seller_costs" domain="[('parent_id','=',False),('domain','=','auction')]"/>
<field name="buyer_costs" domain="[('parent_id','=',False),('domain','=','auction')]"/>
<separator string="Accounting" colspan="4"/>
<field name="acc_expense"/>
<field name="acc_income"/>
@ -126,7 +126,7 @@ Auction Management/Auction Dates/New Auction Dates
<field name="domain">[('state','=','draft')]</field>
<field name="view_id" eval="False"/>
</record>
<menuitem name="Auction Dates" parent="auction_menu_root" id="auction_date_menu"/>
<menuitem name="Next Auction Dates" parent="auction_date_menu" id="menu_auction_dates_next1" action="action_auction_dates_next"/>
=======================================================
@ -208,7 +208,7 @@ Auction Management/Auction Dates/Reporting
<field name="vnd_lim"/>
<field name="vnd_lim_net"/>
<field name="lot_est1"/>
<field name="author_right" domain="[('domain','=','sabam')]"/>
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False)]"/>
<field name="lot_est2"/>
<field name="product_id"/>
<field name="state" readonly="1"/>
@ -319,7 +319,7 @@ Auction Management/Auction Dates/Reporting
<field name="obj_comm" select="2"/>
<field name="obj_ret"/>
<field name="ach_emp"/>
<field name="author_right" domain="[('domain','=','sabam')]"/>
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False)]"/>
<field name="buyer_price"/>
<field name="seller_price"/>
<field name="gross_revenue"/>
@ -370,10 +370,10 @@ Auction Management/Auction Dates/Reporting
<field name="view_type">form</field>
<field name="domain">[('state','=','sold')]</field>
</record>
<menuitem name="Objects" parent="auction_menu_root" id="auction_objects_menu"/>
<menuitem name="All objects" action="action_all_objects" parent="auction_objects_menu" id="auction_all_objects_menu"/>
<menuitem name="Sold Objects" parent="auction_all_objects_menu" action="action_all_objects_sold" id="menu_all_objects_sold1"/>
<record model="ir.actions.act_window" id="action_all_objects_to_sell">
@ -430,7 +430,7 @@ Auction Management/Auction Dates/Reporting
<field name="name" readonly="1" select="1"/>
<field name="name2" readonly="2" select="1"/>
<field name="artist_id" readonly="1"/>
<field name="author_right" domain="[('domain','=','sabam')]"/>
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False)]"/>
<newline/>
<field name="buyer_price"/>
<field name="is_ok" select="1"/>
@ -510,7 +510,7 @@ Auction Management/Auction Dates/Reporting
<field name="partner_id" select="1" on_change="partner_id_change(partner_id)"/>
<field name="method"/>
<newline/>
<field name="tax_id" domain="[('domain','=','auction')]"/>
<field name="tax_id" domain="[('domain','=','auction'),('parent_id','=',False)]"/>
<field name="transfer"/>
<newline/>
<field name="lot_id" colspan="4" mode="tree,graph" nolabel="1">
@ -545,7 +545,7 @@ Auction Management/Auction Dates/Reporting
<field name="lot_est1"/>
<field name="lot_est2"/>
<field name="author_right" domain="[('domain','=','sabam')]"/>
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False)]"/>
<field name="product_id" domain="[('sale_ok','=',True)]"/>
<field name="state" readonly="1"/>
</page><page string="Photos">
@ -598,7 +598,7 @@ Auction Management/Auction Dates/Reporting
<field name="view_type">form</field>
<field name="view_id" ref="view_deposit_border_tree2"/>
</record>
<menuitem name="Sellers" id="auction_seller_menu" parent="auction_menu_root"/>
<menuitem name="Deposit border" parent="auction_seller_menu" action="action_deposit_border" id="menu_auction_deposit_border"/>
@ -694,7 +694,7 @@ Auction Management/Auction Dates/Reporting
<field name="res_model">auction.bid</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Buyers" id="auction_buyers_menu" parent="auction_menu_root"/>
<menuitem name="Bids" parent="auction_buyers_menu" action="action_bid_open" id="menu_action_bid_open"/>
@ -743,7 +743,7 @@ Auction Management/Auction Dates/Reporting
</form>
</field>
</record>
<menuitem name="Reporting" id="auction_report_menu" parent="auction_menu_root"/>
@ -877,7 +877,7 @@ Auction Management/Auction Dates/Reporting
</record>
<menuitem name="Sellers" id="auction_report_seller_menu" parent="auction_report_menu"/>
<menuitem name="Seller's Summary" action="action_auction_reporting_all1" id="menu_seller_allmonth_view1" parent="auction_report_seller_menu"/>
<record model="ir.ui.view" id="view_auction_form2">
<field name="name">Seller's auction</field>
<field name="model">report.seller.auction2</field>
@ -969,7 +969,7 @@ Auction Management/Auction Dates/Reporting
<field name="view_mode">tree</field>
<field name="domain">[('date','ilike',time.strftime('%Y-%m'))]</field>
</record>
<record model="ir.ui.view" id="view_auction_buyer_form2">
<field name="name">Buyer's auction</field>
<field name="model">report.buyer.auction2</field>
@ -1017,16 +1017,16 @@ Auction Management/Auction Dates/Reporting
</record>
<menuitem name="Buyer" id="auction_report_buyer_menu" parent="auction_report_menu"/>
<menuitem name="Buyer's Summary" action="action_auction_buyer_reporting_all1" id="menu_buyer_allmonth_view1" parent="auction_report_buyer_menu"/>
<record model="ir.actions.act_window" id="action_auction_buyer_reporting_all2">
<field name="name">Buyer's auction for all months</field>
<field name="res_model">report.buyer.auction2</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<menuitem name="Buyer's Revenues" action="action_auction_buyer_reporting_all2" id="menu_buyer_allmonth_view2" parent="auction_report_buyer_menu"/>
<!--end : creating buyer Reporting menu for the buyer by pmo-->
@ -1141,7 +1141,7 @@ estimation.adj.category
<!--=============================
sign in sign out report by user
==============================
==============================
<record model="ir.ui.view" id="view_report_auction_sign_in_out_tree">
<field name="name">report.auction.user.pointing.tree</field>
@ -1240,7 +1240,7 @@ My Latest Objects
<field name="view_mode">tree,form</field>
<field name="domain">[('create_uid','=',uid)]</field>
</record>
<record model="ir.actions.act_window" id="action_report_latest_objects_manager_tree">
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
@ -1385,7 +1385,7 @@ Objects per Day
<field name="view_type">tree</field>
<field name="domain">[('state','=', 'draft')]</field>
</record>
<menuitem name="Objects by Auction"
<menuitem name="Objects by Auction"
parent="auction_objects_menu"
id="menu_auction_dates_next_by_auction"
action="action_report_object_by_auction" sequence="11"/>

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,10 @@
"init_xml" : [],
"description": "Allows the administrator to track every user operations on all objects of the system.",
"category" : "Generic Modules/Others",
"update_xml" : ["audittrail_view.xml"],
"update_xml" : ["audittrail_view.xml",
"security/ir.model.access.csv",
"security/audittrail_security.xml",
],
"demo_xml" : ["audittrail_demo.xml"],
"active" : False,
"installable": True

View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="0">
<!-- Set access to menu -->
<record id="menu_action_audittrail" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,4 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_audittrail_rule_group_system","audittrail rule system","model_audittrail_rule","base.group_system",1,1,1,1
"access_audittrail_log_group_system","audittrail log system","model_audittrail_log","base.group_system",1,1,1,1
"access_audittrail_logline_group_system","audittrail log line system","model_audittrail_log_line","base.group_system",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_audittrail_rule_group_system audittrail rule system model_audittrail_rule base.group_system 1 1 1 1
3 access_audittrail_log_group_system audittrail log system model_audittrail_log base.group_system 1 1 1 1
4 access_audittrail_logline_group_system audittrail log line system model_audittrail_log_line base.group_system 1 1 1 1

View File

@ -61,8 +61,9 @@ class res_partner_contact(osv.osv):
if not len(ids):
return []
res = []
for r in self.read(cr, user, ids, ['name','first_name']):
addr = str(r['name'] or '')
for r in self.read(cr, user, ids, ['name','first_name','title']):
addr = r['title'] and str(r['title'])+" " or ''
addr +=str(r['name'] or '')
if r['name'] and r['first_name']:
addr += ' '
addr += str(r['first_name'] or '')
@ -88,18 +89,27 @@ class res_partner_address(osv.osv):
_name = 'res.partner.address'
_inherit='res.partner.address'
_description ='Partner Contact'
_description ='Partner Address'
_columns = {
'job_ids':fields.one2many('res.partner.job', 'address_id', 'Contacts'),
'email': fields.related('job_ids', 'email', type='char', string='Default Email'),
}
res_partner_address()
class res_partner_job(osv.osv):
def _get_partner_name(self, cr, uid, ids, *a):
def _get_partner_id(self, cr, uid, ids, *a):
res={}
for id in self.browse(cr, uid, ids):
res[id.id] = id.address_id.partner_id.id
res[id.id] = id.address_id.partner_id and id.address_id.partner_id.id or False
return res
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
res = []
for r in self.browse(cr, uid, ids):
res.append((r.id, self.pool.get('res.partner.contact').name_get(cr, uid, [r.contact_id.id])[0][1] +", "+ r.function_id.name))
return res
def search(self, cr, user, args, offset=0, limit=None, order=None,
@ -115,7 +125,7 @@ class res_partner_job(osv.osv):
_description ='Contact Function'
_order = 'sequence_contact'
_columns = {
'name': fields.function(_get_partner_name, method=True, type='many2one', relation='res.partner', string='Partner'),
'name': fields.function(_get_partner_id, method=True, type='many2one', relation='res.partner', string='Partner'),
'address_id':fields.many2one('res.partner.address','Address', required=True),
'contact_id':fields.many2one('res.partner.contact','Contact', required=True),
'function_id': fields.many2one('res.partner.function','Function', required=True),

View File

@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<terp>
<openerp>
<data>
<!-- Create the functions -->
<record id="res_partner_function_privateaddress0" model="res.partner.function">
@ -323,4 +323,4 @@
<field name="sequence_contact">1</field>
</record>
</data>
</terp>
</openerp>

View File

@ -75,17 +75,6 @@
<!-- Views for Partners -->
<record model="ir.ui.view" id="view_partner_tree_inherited1">
<field name="name">Partner tree inherited</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="address" position="replace">
<field name='address' string='# of Addresses'/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_partner_form_inherit">
<field name="name">Partner form inherited</field>

View File

@ -1,24 +1,25 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * base_contact
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 13:33+0000\n"
"PO-Revision-Date: 2008-10-08 14:13+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-08 14:16+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.act_res_partner_jobs
msgid "Open all Partner's Function"
msgstr ""
msgstr "Lister tous les partenaires"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.action_res_partner_job
@ -26,17 +27,20 @@ msgstr ""
#: model:ir.ui.menu,name:base_contact.menu_action_res_partner_job
#: view:res.partner.contact:0
msgid "Functions"
msgstr ""
msgstr "Fonctions"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_contact
msgid "res.partner.contact"
msgstr ""
msgstr "res.partner.contact"
#. module: base_contact
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Le nom de l'objet doit démarrer avec x_ et ne pas contenir de charactères "
"spéciaux !"
#. module: base_contact
#: field:res.partner.address,job_ids:0
@ -44,142 +48,144 @@ msgstr ""
#: view:res.partner.address:0
#: view:res.partner:0
msgid "Contacts"
msgstr "Adresse"
msgstr "Contacts"
#. module: base_contact
#: field:res.partner.contact,first_name:0
msgid "First Name"
msgstr ""
msgstr "Prénom"
#. module: base_contact
#: view:res.partner.address:0
msgid "# of Contacts"
msgstr ""
msgstr "# de Contacts"
#. module: base_contact
#: field:res.partner.contact,website:0
msgid "Website"
msgstr ""
msgstr "Site web"
#. module: base_contact
#: field:res.partner.job,phone:0
msgid "Phone"
msgstr ""
msgstr "Téléphone"
#. module: base_contact
#: field:res.partner.contact,title:0
msgid "Title"
msgstr ""
msgstr "Titre"
#. module: base_contact
#: view:res.partner.job:0
msgid "Contact Functions"
msgstr ""
msgstr "Fonctions du contact"
#. module: base_contact
#: field:res.partner.job,sequence_contact:0
msgid "Sequence (Contact)"
msgstr ""
msgstr "Numérotation (Contact)"
#. module: base_contact
#: field:res.partner.job,email:0
msgid "E-Mail"
msgstr ""
msgstr "E-Mail"
#. module: base_contact
#: field:res.partner.job,address_id:0
#: view:res.partner:0
msgid "Address"
msgstr ""
msgstr "Adresse"
#. module: base_contact
#: field:res.partner.contact,active:0
msgid "Active"
msgstr ""
msgstr "Actif"
#. module: base_contact
#: field:res.partner.contact,country_id:0
msgid "Nationality"
msgstr ""
msgstr "Nationalité"
#. module: base_contact
#: field:res.partner.job,function_id:0
msgid "Function"
msgstr ""
msgstr "Fonction"
#. module: base_contact
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML invalide pour la Visualisation de l'Architecture"
#. module: base_contact
#: field:res.partner.contact,lang_id:0
msgid "Language"
msgstr ""
msgstr "Langue"
#. module: base_contact
#: field:res.partner.contact,mobile:0
msgid "Mobile"
msgstr ""
msgstr "Portable"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Extra Information"
msgstr ""
msgstr "Information supplémentaire"
#. module: base_contact
#: field:res.partner.job,contact_id:0
msgid "Contact"
msgstr ""
msgstr "Contact"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_job
msgid "Contact Function"
msgstr ""
msgstr "Fonction du contact"
#. module: base_contact
#: view:res.partner:0
msgid "# of Addresses"
msgstr ""
msgstr "# d'adresses"
#. module: base_contact
#: help:res.partner.job,sequence_contact:0
msgid "order of importance of this address in the list of addresses of the linked contact"
msgid ""
"order of importance of this address in the list of addresses of the linked "
"contact"
msgstr ""
"Ordre d'importance de cette adresse dans la liste des adresses du contact lié"
#. module: base_contact
#: view:res.partner:0
msgid "Addresses"
msgstr ""
msgstr "Adresses"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Partner Contact"
msgstr ""
msgstr "Contact du partenaire"
#. module: base_contact
#: field:res.partner.contact,name:0
msgid "Last Name"
msgstr ""
msgstr "Nom"
#. module: base_contact
#: view:res.partner.contact:0
#: view:res.partner.job:0
msgid "General"
msgstr ""
msgstr "Général"
#. module: base_contact
#: view:res.partner.contact:0
msgid "General Information"
msgstr ""
msgstr "Information générale"
#. module: base_contact
#: field:res.partner.job,name:0
msgid "Partner"
msgstr ""
msgstr "Partenaire"
#. module: base_contact
#: field:res.partner.contact,birthdate:0
msgid "Birth Date"
msgstr ""
msgstr "Date de naissance"

View File

@ -1,4 +1,4 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * base_iban
#
@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:42+0000"
"PO-Revision-Date: 2008-09-11 15:41:42+0000"
"POT-Creation-Date: 2008-09-10 15:05:34+0000"
"PO-Revision-Date: 2008-09-10 15:05:34+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
@ -18,10 +18,9 @@ msgstr ""
#. module: base_iban
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue"
#. module: base_iban
#: help:res.partner.bank,iban:0
msgid "International Bank Account Number"
msgstr ""
msgstr "Numéro International de Compte Bancaire"

View File

@ -1,4 +1,4 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * base_module_publish
#
@ -6,14 +6,13 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"POT-Creation-Date: 2008-09-10 15:05:35+0000"
"PO-Revision-Date: 2008-09-10 15:05:35+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step1,category:0
@ -66,7 +65,7 @@ msgstr "Démo lien"
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step1,version:0
msgid "Version"
msgstr "Version "
msgstr "Version"
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step2,email:0
@ -84,12 +83,6 @@ msgstr "Site web"
msgid "Finish"
msgstr "Terminer"
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/module_zip.py:0
msgid "Could not find the module to export!"
msgstr ""
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step1,description:0
#: wizard_view:base_module_publish.module_publish,step1:0
@ -99,8 +92,11 @@ msgstr "Description"
#. module: base_module_publish
#: wizard_view:base_module_publish.module_publish,step2:0
#: wizard_view:base_module_publish.module_publish_all,login:0
msgid "If you don't have an access, you can create one http://www.openerp.com/"
msgid ""
"If you don't have an access, you can create one http://www.openerp.com/"
msgstr ""
"Si vous n'avez pas d'accès, vous pouvez en créer un sur "
"http://www.openerp.com/"
#. module: base_module_publish
#: wizard_view:base_module_publish.module_publish,step2:0
@ -116,14 +112,7 @@ msgstr "Auteur"
#. module: base_module_publish
#: wizard_view:base_module_publish.module_publish,publish:0
msgid "Information"
msgstr "Information "
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/module_zip.py:0
#: code:addons/base_module_publish/wizard/base_module_publish.py:0
msgid "Error"
msgstr ""
msgstr "Information"
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step1,image:0
@ -141,12 +130,6 @@ msgstr "Fichier image"
msgid "Module publication"
msgstr "Publication du module"
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/base_module_publish.py:0
msgid "Failed to upload the file"
msgstr ""
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step1,license:0
msgid "Licence"
@ -158,16 +141,10 @@ msgstr "Licence"
msgid "Password"
msgstr "Mot de passe"
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/base_module_publish.py:0
msgid "Login failed!"
msgstr ""
#. module: base_module_publish
#: model:ir.actions.wizard,name:base_module_publish.wizard_base_module_publish_all
msgid "Publish all modules"
msgstr ""
msgstr "Publier tous les modules"
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,publish,result:0
@ -200,12 +177,6 @@ msgstr "Modules avec erreurs"
msgid "Documentation URL"
msgstr "Lien de documentation"
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/base_module_publish.py:0
msgid "This version of the module is already exist on the server"
msgstr ""
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,publish,text_end:0
msgid "Summary"
@ -234,12 +205,6 @@ msgstr "Exporter module"
msgid "Login"
msgstr "Nom d'utilisateur"
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/base_module_publish.py:0
msgid "You could not publish a module that is not installed!"
msgstr ""
#. module: base_module_publish
#: wizard_view:base_module_publish.module_publish_all,publish:0
msgid "Upload information"
@ -261,12 +226,6 @@ msgstr "Inclure les sources"
msgid "General"
msgstr "Général"
#. module: base_module_publish
#, python-format
#: code:addons/base_module_publish/wizard/module_zip.py:0
msgid "Can not export module that is not installed!"
msgstr ""
#. module: base_module_publish
#: wizard_field:base_module_publish.module_publish,step1,url_download:0
#: wizard_field:base_module_publish.module_publish,step1,url:0
@ -308,11 +267,10 @@ msgstr "Module exporté avec succès"
#. module: base_module_publish
#: model:ir.actions.wizard,name:base_module_publish.wizard_base_module_publish
msgid "Publish module"
msgstr ""
msgstr "Publier le module"
#. module: base_module_publish
#: wizard_button:base_module_publish.module_publish,step2,step1:0
#: wizard_button:base_module_publish.module_publish,step1,init:0
msgid "Previous"
msgstr "Précédent"

View File

@ -79,7 +79,11 @@ class base_module_record(osv.osv):
self.depends[res[0]['module']]=True
record_list = [record]
fields = self.pool.get(model).fields_get(cr, uid)
# print "before>>>>",fields
# fields = self.pool.get(model).fields_view_get(cr, uid, context={})['fields']
# print "after>>>>",fields
for key,val in data.items():
print key,val
if not (val or (fields[key]['type']=='boolean')):
continue
if fields[key]['type'] in ('integer','float'):
@ -149,6 +153,7 @@ class base_module_record(osv.osv):
return record_list, noupdate
def _generate_object_xml(self, cr, uid, rec, recv, doc, result=None):
print "_generate_object_xml>>>",rec,recv,doc
record_list = []
noupdate = False
if rec[4]=='write':
@ -205,11 +210,17 @@ base_module_record()
def fnct_call(fnct):
def execute(*args, **argv):
if len(args) >= 6 and isinstance(args[5], dict):
_old_args = args[5].copy()
else:
_old_args = None
res = fnct(*args, **argv)
pool = pooler.get_pool(args[0])
mod = pool.get('ir.module.record')
if mod and mod.recording:
if args[4] not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc'):
if _old_args is not None:
args[5].update(_old_args)
mod.recording_data.append(('query', args, argv,res))
return res
return execute

View File

@ -1,19 +1,20 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * base_setup
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-10 15:05:35+0000\n"
"PO-Revision-Date: 2008-09-10 15:05:35+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 09:20+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,city:0
@ -25,13 +26,17 @@ msgstr "Ville"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "You can start configuring the system or connect directly to the database using the default setup."
msgid ""
"You can start configuring the system or connect directly to the database "
"using the default setup."
msgstr ""
"Vous pouvez commencer à configurer le système ou vous connecter directement "
"à la base de données en utilisant la configuration par défaut."
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "Select a Profile"
msgstr ""
msgstr "Sélectionnez un profile"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
@ -41,17 +46,27 @@ msgstr "En-tête de rapport"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,config:0
msgid "Start Configuration"
msgstr ""
msgstr "Commencer la configuration"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "You'll be able to install more modules later through the Administration menu."
msgid ""
"You'll be able to install more modules later through the Administration menu."
msgstr ""
"Vous pourrez installer d'autres modules plus tard via le menu "
"d'Administration."
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "A profile sets a pre-selection of modules for specific needs. These profiles have been setup to help you discover the different aspects of OpenERP. This is just an overview, we have 300+ available modules."
msgid ""
"A profile sets a pre-selection of modules for specific needs. These profiles "
"have been setup to help you discover the different aspects of OpenERP. This "
"is just an overview, we have 300+ available modules."
msgstr ""
"Un profile défini une présélection de modules pour des besoins spécifiques. "
"Ces profiles ont été configurés pour vous aider à découvrir les différents "
"aspects d'OpenERP. C'est juste un apperçu, nous avons plus de 300 modules "
"disponibles."
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,update:0
@ -124,12 +139,16 @@ msgstr "Téléphone"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Define Main Company"
msgstr ""
msgstr "Définir la société principale"
#. module: base_setup
#: wizard_view:base_setup.base_setup,charts:0
msgid "If you don't select one now, you'll be able to install another one through the Administration menu."
msgid ""
"If you don't select one now, you'll be able to install another one through "
"the Administration menu."
msgstr ""
"Si vous n'en sélectionnez pas un maintenant, vous pourrez en installer un "
"autre via le menu d'Administration."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,charts:0
@ -176,7 +195,7 @@ msgstr "Code postal"
#. module: base_setup
#: wizard_view:base_setup.base_setup,charts:0
msgid "Select a Chart of Accounts"
msgstr ""
msgstr "Sélectionnez le Plan Comptable"
#. module: base_setup
#: wizard_view:base_setup.base_setup,update:0
@ -191,12 +210,15 @@ msgstr "Installer"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Installation Done"
msgstr ""
msgstr "Installation terminée"
#. module: base_setup
#: wizard_view:base_setup.base_setup,charts:0
msgid "There are much more charts of accounts available on the OpenERP website."
msgid ""
"There are much more charts of accounts available on the OpenERP website."
msgstr ""
"Il existe beaucoup plus de Plan Comptable disponibles sur le site Web "
"d'OpenERP."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_header1:0
@ -230,7 +252,7 @@ msgstr "Annuler"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,menu:0
msgid "Use Directly"
msgstr ""
msgstr "Utiliser directement"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,previous:0
@ -238,4 +260,3 @@ msgstr ""
#: wizard_button:base_setup.base_setup,charts,init:0
msgid "Previous"
msgstr "Précédent"

View File

@ -1,32 +1,36 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * base_vat
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.0"
"Report-Msgid-Bugs-To: support@openerp.com"
"POT-Creation-Date: 2008-09-11 15:41:43+0000"
"PO-Revision-Date: 2008-09-11 15:41:43+0000"
"Last-Translator: <>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
"Plural-Forms: "
"Project-Id-Version: OpenERP Server 4.3.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-09-05 13:34+0000\n"
"PO-Revision-Date: 2008-09-10 15:05:35+0000\n"
"Last-Translator: Olivier Laurent <Unknown>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2008-10-09 09:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_vat
#: help:res.partner,vat_subjected:0
msgid "Check this box if the partner is subjected to the VAT. It will be used for the VAT legal statement."
msgid ""
"Check this box if the partner is subjected to the VAT. It will be used for "
"the VAT legal statement."
msgstr ""
"Cochez cette case si le partenaire est assujetti à la TVA. Elle sera "
"utilisée pour les mentions légales concernant la TVA."
#. module: base_vat
#: view:res.partner:0
msgid "VAT :"
msgstr ""
msgstr "TVA"
#. module: base_vat
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "XML non valide pour l'architecture de la vue"

View File

@ -564,11 +564,9 @@ class crm_case(osv.osv):
def remind_user(self, cr, uid, ids, context={}, attach=False,
destination=True):
for case in self.browse(cr, uid, ids):
if case.user_id and case.user_id.address_id \
and case.user_id.address_id.email \
and case.email_from:
if case.section_id.reply_to and case.email_from:
src = case.email_from
dest = case.user_id.address_id.email
dest = case.section_id.reply_to
body = case.email_last or case.description
if not destination:
src,dest = dest,src

View File

@ -60,7 +60,7 @@ priorities = {
class rpc_proxy(object):
def __init__(self, uid, passwd, host='localhost', port=8069, path='object', dbname='terp'):
self.rpc = xmlrpclib.ServerProxy('http://%s:%s/%s' % (host, port, path))
self.rpc = xmlrpclib.ServerProxy('http://%s:%s/xmlrpc/%s' % (host, port, path))
self.user_id = uid
self.passwd = passwd
self.dbname = dbname

View File

@ -9,7 +9,7 @@
people to intelligently and efficiently manage tasks, issues,
and requests. It manages key tasks such as communication,
identification, prioritization, assignment, resolution and notification.""",
"depends" : ["crm","report_crm"],
"depends" : ["crm","report_crm", "process"],
"init_xml" : [
"crm_config_view.xml",
"crm_bugs_view.xml",
@ -34,8 +34,12 @@
"crm_jobs_data.xml",
"crm_meeting_data.xml",
"crm_lead_data.xml",
"crm_opportunity_data.xml",
"crm_opportunity_data.xml",
"crm_bugs_menu.xml", "crm_fund_menu.xml",
"crm_jobs_menu.xml", "crm_opportunity_menu.xml",
"crm_helpdesk_menu.xml", "crm_lead_menu.xml",
"crm_meeting_menu.xml",
# "process/crm_configuration_process.xml",
],
"active": False,
"installable": True

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<terp>
<openerp>
<data>
</data>
</terp>
</openerp>

View File

@ -1,4 +1,4 @@
<terp>
<openerp>
<data>
<record model="res.groups" id="group_compta_user">
<field name="name">grcompta</field>
@ -8,5 +8,5 @@
</record>
<menuitem name="Administration" groups="admin,grcomptaadmin" icon="terp-stock" id="menu_admin_compta"/>
</data>
</terp>
</openerp>

View File

@ -226,24 +226,27 @@ class document_directory(osv.osv):
('dirname_uniq', 'unique (name,parent_id,ressource_id,ressource_parent_type_id)', 'The directory name must be unique !')
]
def get_resource_path(self,cr,uid,res_model,res_id):
# to be need test
def get_resource_path(self,cr,uid,dir_id,res_model,res_id):
# this method will be used in process module
# to be need test and Improvement if resource dir has parent resource (link resource)
path=[]
def _parent(dir_id):
def _parent(dir_id,path):
parent=self.browse(cr,uid,dir_id)
if parent.parent_id:
_parent(parent.parent_id.id)
if parent.parent_id and not parent.ressource_parent_type_id:
_parent(parent.parent_id.id,path)
path.append(parent.name)
else:
path.append(parent.name)
return path
return path
directory=self.browse(cr,uid,dir_id)
model_ids=self.pool.get('ir.model').search(cr,uid,[('model','=',res_model)])
directory_ids=self.search(cr,uid,[('ressource_type_id','=',model_ids[0]),('ressource_id','=',res_id)])
if len(directory_ids):
path=parent(directory_ids[0])
direc=self.browse(cr,uid,directory_ids)[0]
path.append(direc.name)
path.append(self.pool.get(direc.ressource_type_id.model).browse(cr,uid,res_id).name)
return "ftp://localhost:8021/"+cr.dbname+'/'.join(path)
if directory:
_parent(dir_id,path)
path.append(self.pool.get(directory.ressource_type_id.model).browse(cr,uid,res_id).name)
user=self.pool.get('res.users').browse(cr,uid,uid)
#print "ftp://%s:%s@localhost:8021/%s/%s"%(user.login,user.password,cr.dbname,'/'.join(path))
return "ftp://%s:%s@localhost:8021/%s/%s"%(user.login,user.password,cr.dbname,'/'.join(path))
return False
def _check_duplication(self, cr, uid,vals):
if 'name' in vals:
@ -343,8 +346,9 @@ class document_directory(osv.osv):
return result
def write(self, cr, uid, ids, vals, context=None):
if not self._check_duplication(cr,uid,vals):
raise except_orm('ValidateError', 'Directory name must be unique!')
# need to make constraints to checking duplicate
#if not self._check_duplication(cr,uid,vals):
# raise except_orm('ValidateError', 'Directory name must be unique!')
return super(document_directory,self).write(cr,uid,ids,vals,context=context)
def copy(self, cr, uid, id, default=None, context=None):
@ -591,4 +595,96 @@ class document_file(osv.osv):
except:
pass
return super(document_file, self).unlink(cr, uid, ids, context)
document_file()
document_file()
class auto_configuration(osv.osv_memory):
_name='auto.configuration'
_rec_name = 'Auto Directory configuration'
_columns = {
}
def action_cancel(self,cr,uid,ids,conect=None):
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
def action_config(self, cr, uid, ids, context=None):
obj=self.pool.get('document.directory')
search_ids=obj.search(cr,uid,[])
browse_lst=obj.browse(cr,uid,search_ids)
model_obj=self.pool.get('ir.model')
for doc_obj in browse_lst:
if doc_obj.name in ('Partner','Contacts','Personnal Folders','Partner Category','Sales Order','All Sales Order','Sales by Salesman','Projects'):
res={}
id=[]
if doc_obj.name=='Partner':
id=model_obj.search(cr,uid,[('model','=','res.partner')])
if doc_obj.name=='Contacts':
id=model_obj.search(cr,uid,[('model','=','res.partner.address')])
if doc_obj.name=='Partner Category':
id=model_obj.search(cr,uid,[('model','=','res.partner.category')])
if doc_obj.name=='All Sales Order':
val={}
id=model_obj.search(cr,uid,[('model','=','sale.order')])
if not len(doc_obj.content_ids):
val['name']='Sale Report'
val['suffix']='_report'
val['report_id']=self.pool.get('ir.actions.report.xml').search(cr,uid,[('report_name','=','sale.order')])[0]
val['extension']='.pdf'
val['directory_id']=doc_obj.id
self.pool.get('document.directory.content').create(cr,uid,val)
if doc_obj.name=='Sales by Salesman':
id=model_obj.search(cr,uid,[('model','=','res.users')])
if doc_obj.name=='Personnal Folders':
id=model_obj.search(cr,uid,[('model','=','res.users')])
if doc_obj.name=='Projects':
id=model_obj.search(cr,uid,[('model','=','account.analytic.account')])
res['ressource_tree']=True
if id:
res['ressource_type_id']=id[0]
res['type']='ressource'
obj.write(cr,uid,doc_obj.id,res)
self.create_folder(cr, uid, ids, context=None)
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
def create_folder(self, cr, uid, ids, context=None):
doc_obj=self.pool.get('document.directory')
model_obj=self.pool.get('ir.model')
for name in ('Sales','Quotation','Meetings','Analysis Reports'):
res={}
if name=='Sales':
child_model=model_obj.search(cr,uid,[('model','=','sale.order')])
link_model=model_obj.search(cr,uid,[('model','=','res.users')])
if child_model:
res['type']='ressource'
res['ressource_type_id']=child_model[0]
res['ressource_parent_type_id']=link_model[0]
res['domain']="[('user_id','=',active_id)]"
else:
link_model=model_obj.search(cr,uid,[('model','=','account.analytic.account')])
if link_model:
res['ressource_parent_type_id']=link_model[0]
res['ressource_id']=0
if res:
res['name']=name
doc_obj.create(cr,uid,res)
return True
auto_configuration()

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<terp>
<openerp>
<data noupdate="1">
</data>
</terp>
</openerp>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<terp>
<openerp>
<data noupdate="1">
<record model="document.directory" id="dir_root">
@ -90,4 +90,4 @@
</record>
</data>
</terp>
</openerp>

View File

@ -1,4 +1,4 @@
<terp>
<openerp>
<data>
<menuitem name="Document Management" icon="terp-stock" id="menu_document"/>
@ -52,7 +52,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Directories">
<tree string="Directories" toolbar="1">
<field name="name"/>
<field name="type"/>
<field name="user_id"/>
@ -178,7 +178,7 @@
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<field name="subflow_id" position="after">
<field name="directory_id"/>
<field name="directory_id" domain="[('ressource_type_id','=',model_id),('ressource_parent_type_id','=',False)]"/>
<newline/>
</field>
</field>
@ -192,12 +192,50 @@
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<field name="subflow_id" position="after">
<field name="directory_id"/>
<field name="directory_id" domain="[('ressource_type_id','=',model_id),('ressource_parent_type_id','=',False)]"/>
<newline/>
</field>
</field>
</record>
</data>
</terp>
<record id="view_auto_config_form" model="ir.ui.view">
<field name="name">Auto Configure Directory</field>
<field name="model">auto.configuration</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Auto Configure">
<label string="" colspan="2"/>
<newline/>
<label string="Do you want to configure Directory Automatically ?" colspan="2"/>
<newline/>
<newline/>
<group col="4" colspan="2">
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
<button name="action_config" string="Configure" icon='gtk-ok' type="object"/>
</group>
<newline/>
<label string="You Can use ftp://admin:admin@localhost:8021 " colspan="2"/>
</form>
</field>
</record>
<record id="action_config_auto_directory" model="ir.actions.act_window">
<field name="name">Auto Configure Directory</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">auto.configuration</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record model="ir.actions.todo"
id="config_auto_directory">
<field name="name">Auto Configure Directory</field>
<field name="action_id" ref="action_config_auto_directory"/>
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -78,15 +78,24 @@ class event(osv.osv):
_order = 'date_begin'
def copy(self, cr, uid, id, default=None, context=None):
return super(event, self).copy(cr, uid,id, default={'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'),})
return super(event, self).copy(cr, uid,id, default={'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'),'state':'draft'})
def button_draft(self, cr, uid, ids, context={}):
return self.write(cr, uid, ids, {'state':'draft'})
def button_cancel(self, cr, uid, ids, context={}):
return self.write(cr, uid, ids, {'state':'cancel'})
def button_done(self, cr, uid, ids, context={}):
return self.write(cr, uid, ids, {'state':'done'})
def button_confirm(self, cr, uid, ids, context={}):
for eve in self.browse(cr, uid, ids):
if eve.mail_auto_confirm:
#send reminder that will confirm the event for all the people that were already confirmed
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id),('state','not in',['draft','cancel'])])
if reg_ids:
self.pool.get('event.registration').mail_user_confirm(cr, uid, reg_ids)
return self.write(cr, uid, ids, {'state':'confirm'})
def _get_register(self, cr, uid, ids, name, args, context=None):
@ -116,10 +125,28 @@ class event(osv.osv):
def write(self, cr, uid, ids,vals, *args, **kwargs):
res = super(event,self).write(cr, uid, ids,vals, *args, **kwargs)
if 'date_begin' in vals and vals['date_begin']:
data_event = self.browse(cr, uid, ids)
for eve in data_event:
for eve in self.browse(cr, uid, ids):
#change the deadlines of the registration linked to this event
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id)])
if reg_ids:
self.pool.get('event.registration').write(cr, uid, reg_ids, {'date_deadline':vals['date_begin']})
#change the date of the project
if eve.project_id:
self.pool.get('project.project').write(cr, uid, [eve.project_id.id], {'date_end':eve.date_begin})
#change the description of the registration linked to this event
if 'mail_auto_confirm' in vals:
if vals['mail_auto_confirm']:
if 'mail_confirm' not in vals:
for eve in self.browse(cr, uid, ids):
vals['mail_confirm'] = eve.mail_confirm
else:
vals['mail_confirm']=False
if 'mail_confirm' in vals:
for eve in self.browse(cr, uid, ids):
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id)])
if reg_ids:
self.pool.get('event.registration').write(cr, uid, reg_ids, {'description':vals['mail_confirm']})
return res
_columns = {
@ -134,12 +161,12 @@ class event(osv.osv):
'date_begin': fields.datetime('Beginning date', required=True),
'date_end': fields.datetime('Ending date', required=True),
'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, required=True),
'mail_auto_registr':fields.boolean('Mail Auto Register',help='A mail is sent when the registration is confirmed'),
'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='A mail is sent when the event is confimed'),
'mail_registr':fields.text('Mail Register',help='Template for the mail'),
'mail_confirm':fields.text('Mail Confirm',help='Template for the mail'),
'mail_auto_registr':fields.boolean('Mail Auto Register',help='Check this box if you want to use the automatic mailing for new registration'),
'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
'mail_registr':fields.text('Registration Email',help='This email will be sent when someone subscribes to the event.'),
'mail_confirm': fields.text('Confirmation Email', help="This email will be sent when the event gets confimed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
'budget_id':fields.many2one('account.budget.post','Budget'),
'product_id':fields.many2one('product.product','Product'),
'product_id':fields.many2one('product.product','Product', required=True),
}
_defaults = {
'state': lambda *args: 'draft',
@ -176,30 +203,50 @@ class event_registration(osv.osv):
return True
def create(self, cr, uid, *args, **argv):
args[0]['section_id']= self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None).section_id.id
event = self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None)
args[0]['section_id']= event.section_id.id
args[0]['date_deadline']= event.date_begin
args[0]['description']= event.mail_confirm
res = super(event_registration, self).create(cr, uid, *args, **argv)
self._history(cr, uid,self.browse(cr, uid, [res]), 'Created', history=True)
return res
def write(self, cr, uid, *args, **argv):
if 'event_id' in args[1]:
args[1]['section_id']= self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None).section_id.id
event = self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None)
args[1]['section_id']= event.section_id.id
args[1]['date_deadline']= event.date_begin
args[1]['description']= event.mail_confirm
return super(event_registration, self).write(cr, uid, *args, **argv)
def mail_user(self,cr,uid,ids):
src=tools.config.options['smtp_user']
def mail_user_confirm(self,cr,uid,ids):
reg_ids=self.browse(cr,uid,ids)
for reg_id in reg_ids:
dest=reg_id.email_from
if (reg_id.event_id.state in ['confirm','running']) and reg_id.event_id.mail_auto_confirm:
if dest:
tools.email_send(src,[dest],'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name,reg_id.event_id.mail_confirm)
return True
# Sending another mail
if reg_id.event_id.state in ['draft', 'fixed', 'open','confirm','running'] and reg_id.event_id.mail_auto_registr:
if dest:
tools.email_send(src,[dest],'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name,reg_id.event_id.mail_registr)
return True
src = reg_id.event_id.reply_to or False
dest = [reg_id.email_from]
if reg_id.email_cc:
dest += [reg_id.email_cc]
if dest and src:
tools.email_send(src, dest,'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, tinycrm = str(reg_id.case_id.id))
if not src:
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
return False
def mail_user(self,cr,uid,ids):
reg_ids=self.browse(cr,uid,ids)
for reg_id in reg_ids:
src = reg_id.event_id.reply_to or False
dest = [reg_id.email_from]
if reg_id.email_cc:
dest += [reg_id.email_cc]
if reg_id.event_id.mail_auto_confirm or reg_id.event_id.mail_auto_registr:
if dest and src:
if reg_id.event_id.state in ['draft', 'fixed', 'open','confirm','running'] and reg_id.event_id.mail_auto_registr:
tools.email_send(src, dest,'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_registr, tinycrm = str(reg_id.case_id.id))
if (reg_id.event_id.state in ['confirm','running']) and reg_id.event_id.mail_auto_confirm:
tools.email_send(src, dest,'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, tinycrm = str(reg_id.case_id.id))
if not src:
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
return False
_name= 'event.registration'
@ -208,9 +255,9 @@ class event_registration(osv.osv):
_columns = {
'case_id':fields.many2one('crm.case','Case'),
'nb_register': fields.integer('Number of Registration', readonly=True, states={'draft':[('readonly',False)]}),
"partner_order_id":fields.many2one('res.partner','Partner Order'),
'event_id':fields.many2one('event.event', 'Event Related', required=True),
"partner_invoice_id":fields.many2one('res.partner', 'Partner Invoice'),
"partner_invoice_id":fields.many2one('res.partner', 'Partner Invoiced'),
"contact_id":fields.many2one('res.partner.contact', 'Partner Contact'), #TODO: filter only the contacts that have a function into the selected partner_id
"unit_price": fields.float('Unit Price'),
"badge_title":fields.char('Badge Title',size=128),
"badge_name":fields.char('Badge Name',size=128),
@ -232,18 +279,20 @@ class event_registration(osv.osv):
data['name'] = 'Registration: ' + badge_name
return {'value':data}
def onchange_contact_id(self, cr, uid, ids, contact_id):
def onchange_contact_id(self, cr, uid, ids, contact, partner):
data ={}
if not contact_id:
if not contact:
return data
obj_addr=self.pool.get('res.partner.address').browse(cr, uid, contact_id)
data['email_from'] = obj_addr.email
if obj_addr.contact_id:
data['badge_name']=obj_addr.contact_id.name
data['badge_title']=obj_addr.contact_id.title
d=self.onchange_badge_name(cr, uid, ids,data['badge_name'])
data.update(d['value'])
contact_id = self.pool.get('res.partner.contact').browse(cr, uid, contact)
data['badge_name'] = contact_id.name
data['badge_title'] = contact_id.title
if partner:
partner_addresses = self.pool.get('res.partner.address').search(cr, uid, [('partner_id','=',partner)])
job_ids = self.pool.get('res.partner.job').search(cr, uid, [('contact_id','=',contact),('address_id','in',partner_addresses)])
if job_ids:
data['email_from'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).email
d = self.onchange_badge_name(cr, uid, ids,data['badge_name'])
data.update(d['value'])
return {'value':data}
@ -263,24 +312,26 @@ class event_registration(osv.osv):
return {'value':{'unit_price' : False,'invoice_label' : False}}
def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False):#override function for partner name.
def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False):
data={}
data['badge_partner']=data['partner_address_id']=data['partner_invoice_id']=data['email_from']=data['badge_title']=data['badge_name']=False
data['badge_partner'] = data['contact_id'] = data['partner_invoice_id'] = data['email_from'] = data['badge_title'] = data['badge_name'] = False
if not part:
return {'value':data}
data['partner_invoice_id']=part
# this calls onchange_partner_invoice_id
d=self.onchange_partner_invoice_id(cr, uid, ids, event_id,part)
d = self.onchange_partner_invoice_id(cr, uid, ids, event_id,part)
# this updates the dictionary
data.update(d['value'])
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data['partner_address_id']=addr['contact']
if addr['contact']:
d=self.onchange_contact_id(cr, uid, ids,addr['contact'])
data.update(d['value'])
partner_data=self.pool.get('res.partner').browse(cr, uid, part)
data['badge_partner']=partner_data.name
addr = self.pool.get('res.partner').address_get(cr, uid, [part])
if addr:
if addr.has_key('default'):
job_ids = self.pool.get('res.partner.job').search(cr, uid, [('address_id','=',addr['default'])])
if job_ids:
data['contact_id'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).contact_id.id
d = self.onchange_contact_id(cr, uid, ids, data['contact_id'],part)
data.update(d['value'])
partner_data = self.pool.get('res.partner').browse(cr, uid, part)
data['badge_partner'] = partner_data.name
return {'value':data}
def onchange_partner_invoice_id(self, cr, uid, ids, event_id, partner_invoice_id):

View File

@ -55,20 +55,22 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Events">
<notebook>
<page string="Information">
<separator string="Event description" colspan="4"/>
<field name="name" string="Event" select="1" colspan="4"/>
<field name="parent_id" domain="[('parent_id','child_of','Event')]" string="Category"/>
<field name="type"/>
<group col="6" colspan="4">
<field name="name" string="Event" select="1"/>
<field name="type" select="2"/>
<field name="user_id" select="1"/>
<field name="active"/>
<field name="date_begin" select="1"/>
<field name="date_end" select="2"/>
<field name="product_id"/>
</group>
<notebook colspan="4">
<page string="General">
<separator string="Event description" colspan="4"/>
<field name="parent_id" domain="[('parent_id','child_of','Event')]" string="Parent Category"/>
<field name="active"/>
<field name="register_min" select="2"/>
<field name="register_max" select="2"/>
<field name="budget_id"/>
<field name="product_id" required="1"/>
<separator string="Tasks management" colspan="4"/>
<field name="project_id"/>
<button string="Create Retro-Planning" name="%(event.event_wiz)d" type="action"/>
@ -82,13 +84,15 @@
</group>
</page>
<page string="Mailing">
<field name="reply_to"/>
<separator string="Auto Registration Email" colspan="4"/>
<field name="mail_auto_registr"/>
<newline/><newline/>
<field name="mail_registr"/>
<newline/>
<field name="mail_registr" colspan="4"/>
<separator string="Auto Confirmation Email" colspan="4"/>
<field name="mail_auto_confirm"/>
<newline/><newline/>
<field name="mail_confirm"/>
<newline/>
<field name="mail_confirm" colspan="4"/>
<newline/>
</page>
<page string="Statistics">
@ -138,7 +142,7 @@
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
</record>
<menuitem parent="menu_event_config" id="menu_event_new_event" action="action_new_event_form" />
<menuitem parent="menu_event_main" id="menu_event_new_event" action="action_new_event_form" />
<record model="ir.actions.act_window" id="action_event_view">
@ -196,27 +200,29 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Registration">
<notebook>
<page string="General">
<field name="event_id" select="1" on_change="onchange_event(event_id, partner_invoice_id)" colspan="1" domain="[('state','in',('draft','confirm'))]"/>
<group col="6" colspan="4">
<field name="event_id" select="1" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/>
<field name="nb_register"/>
<newline/>
<field name="partner_id" required="1" select="1" on_change="onchange_partner_id(partner_id,event_id, email_from)" />
<group colspan="2">
<field name="user_id" select="1"/>
<button name="remind_user" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
</group>
<field name="partner_id" required="1" select="1" on_change="onchange_partner_id(partner_id,event_id)" />
<field name="partner_invoice_id" on_change="onchange_partner_invoice_id(event_id, partner_invoice_id)"/>
<field name="partner_address_id" select="2" on_change="onchange_contact_id(partner_address_id)" colspan="3"/>
<field name="unit_price" select="2"/>
</group>
<notebook colspan="4">
<page string="General">
<field name="contact_id" select="2" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
<field name="email_from" select="2"/>
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
<field name="user_id" select="1"/>
<button name="remind_user" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
<newline/>
<separator colspan="4"/>
<field name="unit_price" select="2"/>
<separator string="Badge" colspan="4"/>
<field name="badge_title" select="2"/>
<field name="badge_name" select="2" on_change="onchange_badge_name(badge_name)"/>
<field name="badge_partner" select="2"/>
<newline/>
<separator colspan="4"/>
<separator string="Status" colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" colspan="2"/>
<button name="button_reg_close" string="Registration Invoiced" states="open" type="object"/>

View File

@ -45,7 +45,7 @@ def _confirm(self, cr, uid, data, context):
current_registration = registration_obj.browse(cr, uid, [data['id']])[0]
total_confirmed = current_registration.event_id.register_current + current_registration.nb_register
if total_confirmed <= current_registration.event_id.register_max:
if total_confirmed <= current_registration.event_id.register_max or current_registration.event_id.register_max == 0:
return 'confirm'
return 'split'
@ -53,7 +53,6 @@ def _confirm(self, cr, uid, data, context):
def _check_confirm(self, cr, uid, data, context):
registration_obj = pooler.get_pool(cr.dbname).get('event.registration')
registration_obj.write(cr, uid, [data['id']], {'state':'open',})
reg = registration_obj.browse(cr, uid, [data['id']])
registration_obj._history(cr, uid, reg, 'Open', history=True)
registration_obj.mail_user(cr,uid,[data['id']])
return {}

View File

@ -40,7 +40,7 @@
Different reports are also provided, mainly for attendance statistics.
""",
"depends" : ["base"],
"depends" : ["base", "process"],
"init_xml" : [],
"demo_xml" : [
"hr_demo.xml",

View File

@ -46,7 +46,7 @@
"demo_xml" : [],
"update_xml" : [
"security/hr_contract_security.xml",
"security/ir.model.access.csv",
# "security/ir.model.access.csv",
"hr_contract_view.xml",
],
"active": False,

View File

@ -24,7 +24,7 @@
Administration \ Users \ Users
for example, you maybe will do it for the user 'admin'.
""",
"depends" : ["hr","crm_configuration"],
"depends" : ["hr","crm_configuration", "process"],
"init_xml" : [],
"update_xml" : [
"security/ir.model.access.csv",
@ -32,6 +32,7 @@
"hr_view.xml",
"hr_holidays_report.xml",
"hr_holidays_wizard.xml",
# "process/hr_holidays_process.xml"
],
# "demo_xml" : ["hr_bel_holidays_2008.xml",],
"demo_xml" : [],

View File

@ -43,7 +43,7 @@ form='''<?xml version="1.0"?>
zero_form='''<?xml version="1.0"?>
<form string="Notification">
<label string="You have to select atleast 1 Department. Try again." colspan="4"/>
<label string="You have to select at least 1 Department. Try again." colspan="4"/>
</form>'''
zero_fields={

View File

@ -43,7 +43,7 @@ Lots of reporting on time and employee tracking are provided.
It is completly integrated with the cost accounting module. It allows you
to set up a management by affair.
""",
"depends" : ["account", "hr", "base", "hr_attendance"],
"depends" : ["account", "hr", "base", "hr_attendance", "process"],
"init_xml" : ["hr_timesheet_data.xml"],
"demo_xml" : ["hr_timesheet_demo.xml",],
"update_xml" : [
@ -51,6 +51,7 @@ to set up a management by affair.
"hr_timesheet_view.xml",
"hr_timesheet_report.xml",
"hr_timesheet_wizard.xml",
"process/hr_timesheet_process.xml"
],
"active": False,
"installable": True

View File

@ -0,0 +1,16 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_timesheetworkflow0" model="process.process">
<field eval="&quot;&quot;&quot;Timesheet Lines flow for services companies.&quot;&quot;&quot;" name="note"/>
<field eval="1" name="active"/>
<field eval="&quot;&quot;&quot;Timesheet Workflow&quot;&quot;&quot;" name="name"/>
</record>
</data>
</openerp>

View File

@ -33,8 +33,8 @@
"category" : "Generic Modules/Human Resources",
"description": """Auto-complete timesheet based on tasks made on the project management module.""",
"website" : "http://tinyerp.com/module_hr.html",
"depends" : ["project", "hr_timesheet"],
"update_xml" : ["hr_timesheet_project_view.xml"],
"depends" : ["project", "hr_timesheet_sheet"],
"update_xml" : ["hr_timesheet_project_view.xml", "process/hr_timesheet_project_process.xml"],
"active": False,
"installable": True
}

View File

@ -0,0 +1,75 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process Node
-->
<record id="process_node_timesheettask0" model="process.node">
<field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_evry1_today_form"/>
<field name="model_id" ref="hr.model_hr_timesheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Timesheet_task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Complete Your Timesheet.&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="project.process_process_tasksworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_workontask0" model="process.node">
<field name="menu_id" ref="project.menu_action_view_task"/>
<field name="model_id" ref="project.model_project_task"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Work on Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Defines the work summary of task&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet_sheet.process_process_hrtimesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('open', pending', 'done', 'cancelled')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_taskwork0" model="process.node">
<field name="menu_id" ref="project.menu_action_view_task6"/>
<field name="model_id" ref="project.model_project_task_work"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Task Work&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Work on task&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet.process_process_timesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='open'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_filltimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Fill Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Task summary is comes into the timesheet line&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_timesheettask0"/>
<field model="process.node" name="source_node_id" ref="project.process_node_opentask0"/>
</record>
<record id="process_transition_taskencoding0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task encoding&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Encode how much time u spent on your task&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="hr_timesheet_sheet.process_node_timesheetline0"/>
<field model="process.node" name="source_node_id" ref="project.process_node_taskwork0"/>
</record>
<record id="process_transition_tasktimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_timesheettask0"/>
<field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
</record>
</data>
</openerp>

View File

@ -51,13 +51,14 @@ The validation can be configured in te company:
* Period size (day, week, month, year)
* Maximal difference between timesheet and attendances
""",
"depends" : ["hr_timesheet", "hr_timesheet_invoice"],
"depends" : ["hr_timesheet", "hr_timesheet_invoice", "process"],
"init_xml" : [],
"demo_xml" : ["hr_timesheet_sheet_demo.xml",],
"update_xml" : [
"security/ir.model.access.csv",
"hr_timesheet_sheet_view.xml",
"hr_timesheet_workflow.xml"
"hr_timesheet_workflow.xml",
"process/hr_timesheet_sheet_process.xml",
],
"active": False,
"installable": True

View File

@ -0,0 +1,226 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_hrtimesheetworkflow0" model="process.process">
<field eval="&quot;&quot;&quot;Hr Timesheet flow for services companies.&quot;&quot;&quot;" name="note"/>
<field eval="1" name="active"/>
<field eval="&quot;&quot;&quot;Hr Timesheet Workflow&quot;&quot;&quot;" name="name"/>
</record>
<!--
Process Node
-->
<record id="process_node_analyticcost0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Analytic cost&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic cost is created&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet.process_process_timesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_review0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Review&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Review end of day check day is complete&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet.process_process_timesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_timesheetconfirming0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Timesheet Confirming&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Timesheet sheet confirm at the end of the period&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet.process_process_timesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_timesheetline0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Timesheet Line&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Encode your timesheet line&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet.process_process_timesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_phonecall0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Phone call&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Whatever time u spent for phone call&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr_timesheet.process_process_timesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_attendance0" model="process.node">
<field name="menu_id" ref="hr_attendance.menu_si_so"/>
<field name="model_id" ref="hr.model_hr_employee"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Attendance&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Defines employee's timesheet entry&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_timesheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Defines the task work entry into timesheet line&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_drafttimesheetsheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Draft Timesheet sheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Encode Your hours and Sign in / out&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_confirmedtimesheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Confirmed Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;At the end of the period (week/month)&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_validatedtimesheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Validated Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Control by the project manager&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_invoiceonwork0" model="process.node">
<field name="menu_id" ref="account.menu_finance_invoice"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Invoice on Work&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Invoice based on timesheet&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_attendance0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Attendance&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Attendance entry moves into the timesheet&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
</record>
<record id="process_transition_timesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;timesheet entry is into draft state.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
</record>
<record id="process_transition_confirmtimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;timesheet is confirmed at the end of the week / month&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_confirmedtimesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
</record>
<record id="process_transition_validatetimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validate Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Timesheet is validate by project manager.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_invoiceontimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice on timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creates invoice based on timesheet&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_phonecallencoding0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Phone call encoding&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Encode how much time u spent on phone call&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_timesheetline0"/>
<field model="process.node" name="source_node_id" ref="process_node_phonecall0"/>
</record>
<record id="process_transition_createanalyticcose0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Analytic cost&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creates your analytic cost accoording to quantity&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_analyticcost0"/>
<field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/>
</record>
<record id="process_transition_reviewofwork0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Review of work&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Review of your work at the end of the day&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_review0"/>
<field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/>
</record>
<record id="process_transition_confirmtimesheetsheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm timesheet sheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Confirm timesheet at the end of the period&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_timesheetconfirming0"/>
<field model="process.node" name="source_node_id" ref="process_node_review0"/>
</record>
</data>
</openerp>

View File

@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
{
"name" : "Idea Manager",
"version" : "0.1",

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