[MERGE] merge with lp:openobject-addons

bzr revid: ysa@tinyerp.co.in-20100427050753-z3oxyq3371xrf919
This commit is contained in:
Ysa (Open ERP) 2010-04-27 10:37:53 +05:30
commit d7a06f870c
233 changed files with 5933 additions and 4072 deletions

View File

@ -46,14 +46,18 @@ module named account_voucherss
'security/account_security.xml',
'security/ir.model.access.csv',
'account_menuitem.xml',
'account_wizard.xml',
'wizard/account_statement_from_invoice_view.xml',
'wizard/account_move_bank_reconcile_view.xml',
'wizard/account_use_model_view.xml',
'account_view.xml',
'account_report.xml',
'wizard/account_invoice_refund_view.xml',
'wizard/account_period_close_view.xml',
'wizard/account_fiscalyear_close_state.xml',
'wizard/account_chart_view.xml',
'wizard/account_move_bank_reconcile_view.xml',
'wizard/account_move_line_reconcile_select_view.xml',
'wizard/account_move_journal_view.xml',
'account_wizard.xml',
'wizard/account_move_line_reconcile_select_view.xml',
'wizard/account_open_closed_fiscalyear_view.xml',
'wizard/account_move_line_unreconcile_select_view.xml',
'wizard/account_vat_view.xml',
@ -66,17 +70,19 @@ module named account_voucherss
'wizard/account_journal_select_view.xml',
'wizard/account_change_currency_view.xml',
'wizard/account_validate_move_view.xml',
'wizard/account_statement_from_invoice_view.xml',
'wizard/account_pay_invoice_view.xml',
'wizard/account_unreconcile_view.xml',
'wizard/account_general_ledger_report_view.xml',
'wizard/account_invoice_state_view.xml',
'wizard/account_use_model_view.xml',
'wizard/account_partner_balance_report_view.xml',
'wizard/account_balance_report_view.xml',
'wizard/account_move_line_select_view.xml',
'wizard/account_aged_trial_balance_view.xml',
'wizard/account_compare_account_balance_report_view.xml',
'wizard/account_third_party_ledger.xml',
'project/wizard/project_account_analytic_line_view.xml',
'account_view.xml',
'account_end_fy.xml',
'account_invoice_view.xml',
'account_report.xml',
'partner_view.xml',
'data/account_invoice.xml',
'data/account_data2.xml',
@ -93,17 +99,16 @@ module named account_voucherss
'account_installer.xml',
'report/account_invoice_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
],
'demo_xml': [
#'demo/price_accuracy00.yml',
'account_demo.xml',
'project/project_demo.xml',
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'account_unit_test.xml',
],
'test': [
'test/price_accuracy00.yml',
],
'installable': True,
'active': False,
'certificate': '0080331923549',

View File

@ -291,7 +291,7 @@ class account_account(osv.osv):
"special effects in Open ERP: view can not have entries, consolidation are accounts that "\
"can have children accounts for multi-company consolidations, payable/receivable are for "\
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
'user_type': fields.many2one('account.account.type', 'Account Type', required=True,
'user_type': fields.many2one('account.account.type', 'Account Type', required=True,
help="These types are defined according to your country. The type contains more information "\
"about the account and its specificities."),
'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade'),
@ -437,18 +437,18 @@ class account_account(osv.osv):
elif method == 'unlink':
raise osv.except_osv(_('Error !'), _('You cannot remove an account which has account entries!. '))
return True
def write(self, cr, uid, ids, vals, context=None):
if not context:
context = {}
if 'active' in vals and not vals['active']:
self._check_moves(cr, uid, ids, "write", context)
return super(account_account, self).write(cr, uid, ids, vals, context=context)
def unlink(self, cr, uid, ids, context={}):
self._check_moves(cr, uid, ids, "unlink", context)
return super(account_account, self).unlink(cr, uid, ids, context)
account_account()
class account_journal_view(osv.osv):
@ -791,7 +791,7 @@ class account_move(osv.osv):
for id in ids:
result.setdefault(id, 0.0)
return result
def _search_amount(self, cr, uid, obj, name, args, context):
ids = []
cr.execute('select move_id,sum(debit) from account_move_line group by move_id')
@ -801,10 +801,10 @@ class account_move(osv.osv):
if item[1] == '>=':
res = [('id', 'in', [k for k,v in result.iteritems() if v >= item[2]])]
else:
res = [('id', 'in', [k for k,v in result.iteritems() if v <= item[2]])]
res = [('id', 'in', [k for k,v in result.iteritems() if v <= item[2]])]
ids += res
if not ids:
if not ids:
return [('id', '>', '0')]
return ids
@ -1062,7 +1062,7 @@ class account_move(osv.osv):
# Example:
# difference == 0.01 is OK iff price_accuracy <= 1!
# difference == 0.0001 is OK iff price_accuracy <= 3!
if abs(amount) < 10 ** -(int(config['price_accuracy'])1):
if abs(amount) < 10 ** -(int(config['price_accuracy'])+1):
if not len(line_draft_ids):
continue
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
@ -1132,7 +1132,7 @@ class account_move_reconcile(osv.osv):
'name': lambda self,cr,uid,ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile') or '/',
}
def reconcile_partial_check(self, cr, uid, ids, type='auto', context={}):
total = 0.0
total = 0.0
for rec in self.browse(cr, uid, ids, context):
for line in rec.line_partial_ids:
total += (line.debit or 0.0) - (line.credit or 0.0)
@ -1886,7 +1886,7 @@ account_account_template()
class account_add_tmpl_wizard(osv.osv_memory):
"""Add one more account from the template.
With the 'nocreate' option, some accounts may not be created. Use this to add them later."""
_name = 'account.addtmpl.wizard'
@ -1912,7 +1912,7 @@ class account_add_tmpl_wizard(osv.osv_memory):
_defaults = {
'cparent_id': _get_def_cparent,
}
def action_create(self,cr,uid,ids,context=None):
acc_obj=self.pool.get('account.account')
tmpl_obj=self.pool.get('account.account.template')
@ -1939,7 +1939,7 @@ class account_add_tmpl_wizard(osv.osv_memory):
# print "Creating:", vals
new_account = acc_obj.create(cr,uid,vals)
return {'type':'state', 'state': 'end' }
def action_cancel(self,cr,uid,ids,context=None):
return { 'type': 'state', 'state': 'end' }

View File

@ -1382,14 +1382,14 @@
<field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field>
<field name="context">{'account_id':active_id}</field>
</record>
<wizard id="wizard_move_line_select" menu="False" model="account.move.line" name="account.move.line.select" string="Move line select"/>
<record id="ir_open_account_account" model="ir.values">
<field eval="'tree_but_open'" name="key2"/>
<field eval="'account.account'" name="model"/>
<field name="name">Account Entries</field>
<field eval="'ir.actions.wizard,%d'%wizard_move_line_select" name="value"/>
<field eval="True" name="object"/>
</record>
<!-- <wizard id="wizard_move_line_select" menu="False" model="account.move.line" name="account.move.line.select" string="Move line select"/>-->
<!-- <record id="ir_open_account_account" model="ir.values">-->
<!-- <field eval="'tree_but_open'" name="key2"/>-->
<!-- <field eval="'account.account'" name="model"/>-->
<!-- <field name="name">Account Entries</field>-->
<!-- <field eval="'ir.actions.wizard,%d'%wizard_move_line_select" name="value"/>-->
<!-- <field eval="True" name="object"/>-->
<!-- </record>-->
<record id="view_move_line_tax_tree" model="ir.ui.view">

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard
string="Account balance-Compare Years"
model="account.account"
name="account.balance.account.balance.report"
keyword="client_print_multi"
id="wizard_account_balance_compare_report"/>
<!-- <wizard-->
<!-- string="Account balance-Compare Years"-->
<!-- model="account.account"-->
<!-- name="account.balance.account.balance.report"-->
<!-- keyword="client_print_multi"-->
<!-- id="wizard_account_balance_compare_report"/>-->
<!-- <wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note" groups="base.group_user"/> -->
@ -71,19 +71,21 @@
<menuitem action="wizard_generate_subscription" id="menu_generate_subscription" parent="account.menu_finance_periodical_processing" type="wizard"/>
-->
<!-- Aged partner balance -->
<wizard id="wizard_aged_trial_balance" menu="False" model="res.partner" name="account.aged.trial.balance" string="Aged Partner Balance"/>
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
<menuitem icon="STOCK_PRINT" action="wizard_aged_trial_balance" id="menu_aged_trial_balance" parent="next_id_22" type="wizard"/>
<!-- <wizard id="wizard_aged_trial_balance" menu="False" model="res.partner" name="account.aged.trial.balance" string="Aged Partner Balance"/>
<menuitem icon="STOCK_PRINT" action="wizard_aged_trial_balance" id="menu_aged_trial_balance" parent="next_id_22" type="wizard"/>-->
<!-- report-related wizards -->
<!-- <wizard id="wizard_partner_balance_report" menu="False" model="res.partner" name="account.partner.balance.report" string="Partner Balance"/>
<menuitem icon="STOCK_PRINT" action="wizard_partner_balance_report" id="menu_partner_balance" parent="account.next_id_22" type="wizard"/> -->
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
<!--<wizard id="wizard_third_party_ledger" menu="False" model="res.partner" name="account.third_party_ledger.report" string="Partner Ledger"/>
<menuitem icon="STOCK_PRINT" action="wizard_third_party_ledger" id="menu_third_party_ledger" parent="account.next_id_22" type="wizard"/> -->
<wizard id="wizard_third_party_ledger" menu="False" model="res.partner" name="account.third_party_ledger.report" string="Partner Ledger"/>
<menuitem icon="STOCK_PRINT" action="wizard_third_party_ledger" id="menu_third_party_ledger" parent="account.next_id_22" type="wizard"/>
<!-- <wizard id="wizard_general_ledger_report" keyword="client_print_multi" model="account.account" name="account.general.ledger.report" string="General Ledger"/>-->
<!-- <wizard id="wizard_balance_report" keyword="client_print_multi" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
<wizard id="wizard_balance_report" keyword="client_print_multi" model="account.account" name="account.account.balance.report" string="Account Balance"/>
<wizard id="wizard_general_ledger_report" keyword="client_print_multi" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
<!-- <wizard id="wizard_invoice_state_confirm" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.confirm" string="Confirm draft invoices" groups="base.group_user"/>-->
<!-- <wizard id="wizard_invoice_state_cancel" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.cancel" string="Cancel selected invoices" groups="base.group_user"/>-->
@ -105,11 +107,11 @@
<!-- <wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open" groups="base.group_user"/> -->
<!-- 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_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"/>
<!-- <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"/>-->
<!-- <wizard id="wizard_print_journal" menu="False" model="account.journal.period" name="account.print.journal.report" string="Print Journal" />
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />

View File

@ -44,6 +44,7 @@
Then I should see an account entry linked to this invoice.
-
!assert {model: account.invoice, id: invoice1}:
test:
- bool(move_id)
-
# This is not working, find a way to do that in YAML, *qty is not
@ -52,12 +53,14 @@
equal to *qty x *price x (1 + *tax)
-
!assert {model: account.invoice, id: invoice1}:
- abs(sum(x.credit for x in move_id.line_id) - 163.97) < 0.000001
test:
- abs(sum(x.credit for x in move_id.line_id) - 163.97) < 0.000001
-
And this account entry must have a credit equals to the debit
-
!assert {model: account.invoice, id: invoice1}:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
test:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
-
Then, I change the precision of numbers to 3 digits.
-
@ -77,7 +80,8 @@
Then this account entry must have a credit equals to the debit
-
!assert {model: account.invoice, id: invoice2}:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
test:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
-
And this account entry must have a credit equals to 163.968€ which is
equal to *qty x *price x (1 + *tax)

View File

@ -7,13 +7,17 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-08 18:06+0000\n"
"PO-Revision-Date: 2010-04-01 22:39+0000\n"
"Last-Translator: mitev.dmitry <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-04-03 03:54+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:05+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -115,7 +119,7 @@ msgstr "Rodič"
#. module: account
#: selection:account.move,type:0
msgid "Journal Voucher"
msgstr "Rada"
msgstr ""
#. module: account
#: field:account.invoice,residual:0
@ -134,7 +138,7 @@ msgstr "Základní kódová značka"
#: model:ir.actions.wizard,name:account.wizard_unreconcile_select
#: model:ir.ui.menu,name:account.menu_unreconcile_select
msgid "Unreconcile entries"
msgstr "Nepotvrzené záznamy"
msgstr ""
#. module: account
#: constraint:account.period:0
@ -159,7 +163,7 @@ msgstr "Debetní Centralizace"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_invoice_state_confirm
msgid "Confirm draft invoices"
msgstr "Potvrdit návrh faktury"
msgstr ""
#. module: account
#: help:account.payment.term.line,days2:0
@ -182,7 +186,7 @@ msgstr "Grafy účtu"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_move_line_select
msgid "Move line select"
msgstr "Přesun řádku vyberte"
msgstr ""
#. module: account
#: rml:account.journal.period.print:0
@ -310,7 +314,7 @@ msgstr "Původ"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "Move Name"
msgstr "Název Pohybu"
msgstr ""
#. module: account
#: xsl:account.transfer:0
@ -325,7 +329,7 @@ msgstr "Vypočítat předpaltné(Subscription Compute)"
#. module: account
#: rml:account.central.journal:0
msgid "Account Num."
msgstr "Číslo účtu"
msgstr ""
#. module: account
#: rml:account.analytic.account.analytic.check:0
@ -337,12 +341,12 @@ msgstr ""
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
msgid "Tax"
msgstr "Daň"
msgstr ""
#. module: account
#: rml:account.general.journal:0
msgid "Debit Trans."
msgstr "Debetní transakce"
msgstr ""
#. module: account
#: field:account.analytic.line,account_id:0
@ -356,24 +360,24 @@ msgstr "Analytický účet"
#: field:account.tax,child_depend:0
#: field:account.tax.template,child_depend:0
msgid "Tax on Children"
msgstr "Daň z dětí"
msgstr ""
#. module: account
#: rml:account.central.journal:0
#: rml:account.general.journal:0
#: field:account.journal,name:0
msgid "Journal Name"
msgstr "Název časopisu"
msgstr ""
#. module: account
#: view:account.payment.term:0
msgid "Description on invoices"
msgstr "Popis na fakturách"
msgstr ""
#. module: account
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "Chyba! Nemůžete vytvářet rekurzivní analytické účty."
msgstr ""
#. module: account
#: field:account.bank.statement.reconcile,total_entry:0
@ -389,13 +393,13 @@ msgstr "Zdroj účtu"
#. module: account
#: field:account.journal,update_posted:0
msgid "Allow Cancelling Entries"
msgstr "Povolit Zrušení Příspěvky"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_paymentorderbank0
#: model:process.transition,name:account.process_transition_paymentorderreconcilation0
msgid "Payment Reconcilation"
msgstr "Platba usmíření"
msgstr ""
#. module: account
#: model:account.journal,name:account.expenses_journal
@ -425,7 +429,7 @@ msgstr "(Účet / Partner) Název"
#. module: account
#: selection:account.move,type:0
msgid "Contra"
msgstr "Kontraindikace"
msgstr ""
#. module: account
#: field:account.analytic.account,state:0
@ -447,7 +451,7 @@ msgstr ""
#: view:account.tax:0
#: view:account.tax.template:0
msgid "Special Computation"
msgstr "Speciální výpočetní"
msgstr ""
#. module: account
#: model:process.transition,note:account.process_transition_confirmstatementfromdraft0
@ -506,7 +510,7 @@ msgstr ""
#. module: account
#: view:account.invoice:0
msgid "Supplier invoice"
msgstr "Dodavatele uvedený na faktuře"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_reconcilepaid0
@ -533,7 +537,7 @@ msgstr ""
#. module: account
#: field:account.account.type,close_method:0
msgid "Deferral Method"
msgstr "Metoda zpoždění"
msgstr ""
#. module: account
#: field:account.tax.template,include_base_amount:0
@ -560,7 +564,7 @@ msgstr ""
#: selection:account.tax,applicable_type:0
#: selection:account.tax.template,applicable_type:0
msgid "True"
msgstr "Pravda"
msgstr ""
#. module: account
#: help:account.payment.term.line,days:0
@ -577,7 +581,7 @@ msgstr ""
#. module: account
#: rml:account.central.journal:0
msgid "Printing Date"
msgstr "Datum vydání"
msgstr ""
#. module: account
#: rml:account.general.ledger:0
@ -593,7 +597,7 @@ msgstr ""
#. module: account
#: view:account.journal:0
msgid "Entry Controls"
msgstr "Vstupní kontrolou"
msgstr ""
#. module: account
#: help:account.model.line,sequence:0
@ -616,13 +620,13 @@ msgstr ""
#. module: account
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "Kontakt"
msgstr ""
#. module: account
#: selection:account.model.line,date:0
#: selection:account.model.line,date_maturity:0
msgid "Partner Payment Term"
msgstr "Partner splatnosti"
msgstr ""
#. module: account
#: view:account.move.reconcile:0
@ -637,13 +641,13 @@ msgstr "Otevřeno pro bankovní vyrovnání(Open for bank reconciliation)"
#. module: account
#: field:account.invoice.line,discount:0
msgid "Discount (%)"
msgstr "Sleva (%)"
msgstr ""
#. module: account
#: wizard_field:account.move.line.reconcile,init_full,writeoff:0
#: wizard_field:account.move.line.reconcile,init_partial,writeoff:0
msgid "Write-Off amount"
msgstr "Odpis části"
msgstr ""
#. module: account
#: help:account.fiscalyear,company_id:0
@ -653,7 +657,7 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_analytic_accounting
msgid "Analytic Accounting"
msgstr "Analytické účetnictví"
msgstr ""
#. module: account
#: rml:account.overdue:0
@ -666,22 +670,22 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_account_analytic_line_form
#: model:ir.ui.menu,name:account.next_id_41
msgid "Analytic Entries"
msgstr "Analytická Příspěvky"
msgstr ""
#. module: account
#: selection:account.subscription,period_type:0
msgid "month"
msgstr "měsíc"
msgstr ""
#. module: account
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr "Přidruženého partnera"
msgstr ""
#. module: account
#: field:account.invoice,comment:0
msgid "Additional Information"
msgstr "Další informace"
msgstr ""
#. module: account
#: selection:account.invoice,type:0
@ -719,18 +723,18 @@ msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_supplieranalyticcost0
msgid "Analytic Invoice"
msgstr "Analytická faktury"
msgstr ""
#. module: account
#: field:account.journal.column,field:0
msgid "Field Name"
msgstr "Název pole"
msgstr ""
#. module: account
#: field:account.tax.code,sign:0
#: field:account.tax.code.template,sign:0
msgid "Sign for parent"
msgstr "Přihlaste se na mateřské"
msgstr ""
#. module: account
#: field:account.fiscalyear,end_journal_period_id:0
@ -741,7 +745,7 @@ msgstr ""
#: view:product.product:0
#: view:product.template:0
msgid "Purchase Properties"
msgstr "Nákup Nemovitosti"
msgstr ""
#. module: account
#: model:process.node,note:account.process_node_paymententries0
@ -751,12 +755,12 @@ msgstr ""
#. module: account
#: wizard_button:account.invoice.pay,init,reconcile:0
msgid "Partial Payment"
msgstr "Částečná platba"
msgstr ""
#. module: account
#: wizard_view:account_use_models,create:0
msgid "Move Lines Created."
msgstr "Přesun vytvořených linek."
msgstr ""
#. module: account
#: field:account.fiscalyear,state:0
@ -766,18 +770,18 @@ msgstr "Přesun vytvořených linek."
#: field:account.period,state:0
#: field:account.subscription,state:0
msgid "Status"
msgstr "Stav"
msgstr ""
#. module: account
#: rml:account.analytic.account.cost_ledger:0
#: rml:account.analytic.account.quantity_cost_ledger:0
msgid "Period to"
msgstr "Období do"
msgstr ""
#. module: account
#: field:account.account.type,partner_account:0
msgid "Partner account"
msgstr "Partner účet"
msgstr ""
#. module: account
#: wizard_view:account.subscription.generate,init:0
@ -803,7 +807,7 @@ msgstr ""
#. module: account
#: field:account.invoice,move_lines:0
msgid "Move Lines"
msgstr "Přesun Linky"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_config_wizard
@ -831,26 +835,26 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.next_id_30
msgid "Bank Reconciliation"
msgstr "Bankovní usmíření"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_account_template
msgid "Templates for Accounts"
msgstr "Šablony pro účty"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_form
#: model:ir.model,name:account.model_account_analytic_account
#: model:ir.ui.menu,name:account.account_analytic_def_account
msgid "Analytic Accounts"
msgstr "Analytické účty"
msgstr ""
#. module: account
#: wizard_view:account.print.journal.report,init:0
#: model:ir.actions.wizard,name:account.wizard_print_journal
#: model:ir.ui.menu,name:account.menu_print_journal
msgid "Print Journal"
msgstr "Tisk věstníku"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_bank_accounts_wizard
@ -861,39 +865,39 @@ msgstr ""
#: field:account.move.line,date_created:0
#: field:account.move.reconcile,create_date:0
msgid "Creation date"
msgstr "Datum vytvoření"
msgstr ""
#. module: account
#: wizard_button:account.invoice.refund,init,cancel_invoice:0
msgid "Cancel Invoice"
msgstr "Zrušit účet"
msgstr ""
#. module: account
#: field:account.journal.column,required:0
msgid "Required"
msgstr "Požadované"
msgstr ""
#. module: account
#: field:product.category,property_account_expense_categ:0
#: field:product.template,property_account_expense:0
msgid "Expense Account"
msgstr "Cestovní účet"
msgstr ""
#. module: account
#: wizard_field:account.move.line.reconcile,addendum,journal_id:0
msgid "Write-Off Journal"
msgstr "Odpis věstníku"
msgstr ""
#. module: account
#: field:account.model.line,amount_currency:0
#: field:account.move.line,amount_currency:0
msgid "Amount Currency"
msgstr "Částka měny"
msgstr ""
#. module: account
#: field:account.chart.template,property_account_expense_categ:0
msgid "Expense Category Account"
msgstr "Kategorie výdajů účtu"
msgstr ""
#. module: account
#: wizard_field:account.fiscalyear.close,init,fy2_id:0
@ -910,7 +914,7 @@ msgstr ""
#. module: account
#: wizard_field:account.open_closed_fiscalyear,init,fyear_id:0
msgid "Fiscal Year to Open"
msgstr "Fiskální rok otevřena"
msgstr ""
#. module: account
#: view:account.config.wizard:0
@ -928,7 +932,7 @@ msgstr ""
#: field:account.model.line,quantity:0
#: field:account.move.line,quantity:0
msgid "Quantity"
msgstr "Množství"
msgstr ""
#. module: account
#: wizard_field:account.account.balance.report,checktype,date_to:0
@ -936,7 +940,7 @@ msgstr "Množství"
#: wizard_field:account.partner.balance.report,init,date2:0
#: wizard_field:account.third_party_ledger.report,init,date2:0
msgid "End date"
msgstr "Datum ukončení"
msgstr ""
#. module: account
#: field:account.invoice.tax,base_amount:0
@ -957,12 +961,12 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_bank_statement_tree
#: model:ir.ui.menu,name:account.menu_bank_statement_tree
msgid "Entries by Statements"
msgstr "Příspěvky výroky"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_analyticinvoice0
msgid "analytic Invoice"
msgstr "analytické faktury"
msgstr ""
#. module: account
#: wizard_field:account.automatic.reconcile,init,period_id:0
@ -981,22 +985,22 @@ msgstr "analytické faktury"
#: wizard_field:account.print.journal.report,init,period_id:0
#: field:account.subscription,period_nbr:0
msgid "Period"
msgstr "Perioda"
msgstr ""
#. module: account
#: rml:account.partner.balance:0
msgid "Grand total"
msgstr "Úhrn"
msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_accounting
msgid "Financial Accounting"
msgstr "Finanční účetnictví"
msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Net Total:"
msgstr "Čistá celkem:"
msgstr ""
#. module: account
#: view:account.fiscal.position:0
@ -1010,7 +1014,7 @@ msgstr "Čistá celkem:"
#: model:ir.model,name:account.model_account_fiscal_position
#: field:res.partner,property_account_position:0
msgid "Fiscal Position"
msgstr "Fiskální pozice"
msgstr ""
#. module: account
#: field:account.analytic.line,product_uom_id:0
@ -1027,7 +1031,7 @@ msgstr ""
#: field:account.account,child_parent_ids:0
#: field:account.account.template,child_parent_ids:0
msgid "Children"
msgstr "Děti"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_fiscal_position_tax
@ -1038,35 +1042,35 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_invoice_tree2_new
#: model:ir.ui.menu,name:account.menu_action_invoice_tree2_new
msgid "New Supplier Invoice"
msgstr "Nového dodavatele faktury"
msgstr ""
#. module: account
#: wizard_field:account.invoice.pay,init,amount:0
msgid "Amount paid"
msgstr "Zaplacené částky"
msgstr ""
#. module: account
#: selection:account.invoice,type:0
#: model:process.transition,name:account.process_transition_customerinvoice0
#: model:process.transition,name:account.process_transition_suppliercustomerinvoice0
msgid "Customer Invoice"
msgstr "Zákazník faktury"
msgstr ""
#. module: account
#: wizard_view:account.open_closed_fiscalyear,init:0
msgid "Choose Fiscal Year"
msgstr "Vyberte si fiskální rok"
msgstr ""
#. module: account
#: field:account.sequence.fiscalyear,sequence_main_id:0
msgid "Main Sequence"
msgstr "Hlavní posloupnosti"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_journal_tree
#: model:ir.ui.menu,name:account.account_analytic_journal_print
msgid "Print Analytic Journals"
msgstr "Tisk Analytické Časopisy"
msgstr ""
#. module: account
#: rml:account.tax.code.entries:0
@ -1083,7 +1087,7 @@ msgstr ""
#. module: account
#: field:account.bank.statement.reconcile,total_new:0
msgid "Total write-off"
msgstr "Celkem odpis"
msgstr ""
#. module: account
#: view:account.tax.template:0
@ -1095,14 +1099,14 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_tax_code_list
#: model:ir.ui.menu,name:account.menu_action_tax_code_list
msgid "Tax codes"
msgstr "Daňové kódy"
msgstr ""
#. module: account
#: field:account.fiscal.position.template,chart_template_id:0
#: field:account.tax.template,chart_template_id:0
#: field:wizard.multi.charts.accounts,chart_template_id:0
msgid "Chart Template"
msgstr "Graf šablony"
msgstr ""
#. module: account
#: field:account.chart.template,property_account_income_categ:0
@ -1113,24 +1117,24 @@ msgstr ""
#: model:ir.actions.act_window,name:account.analytic_account_form
#: model:ir.ui.menu,name:account.account_analytic_form
msgid "New Analytic Account"
msgstr "Nový analitickiý účet"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_fiscal_position_template_form
#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form_template
msgid "Fiscal Position Templates"
msgstr "Fiskální pozice Šablony"
msgstr ""
#. module: account
#: rml:account.invoice:0
#: field:account.invoice.line,price_unit:0
msgid "Unit Price"
msgstr "Cena za kus"
msgstr ""
#. module: account
#: rml:account.analytic.account.journal:0
msgid "Period from :"
msgstr "Období od:"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_wizard_multi_charts_accounts
@ -1140,7 +1144,7 @@ msgstr ""
#. module: account
#: model:account.journal,name:account.sales_journal
msgid "Journal de vente"
msgstr "Prodej věstníku"
msgstr ""
#. module: account
#: help:account.model.line,amount_currency:0
@ -1151,23 +1155,23 @@ msgstr ""
#: view:account.fiscal.position.template:0
#: field:account.fiscal.position.template,name:0
msgid "Fiscal Position Template"
msgstr "Fiskální pozice šablony"
msgstr ""
#. module: account
#: field:account.payment.term,line_ids:0
msgid "Terms"
msgstr "Podmínky"
msgstr ""
#. module: account
#: rml:account.vat.declaration:0
msgid "Tax Report"
msgstr "Daňové Report"
msgstr ""
#. module: account
#: wizard_button:account.analytic.account.chart,init,open:0
#: wizard_button:account.chart,init,open:0
msgid "Open Charts"
msgstr "Zobrazit Grafy"
msgstr ""
#. module: account
#: wizard_view:account.fiscalyear.close.state,init:0
@ -1177,7 +1181,7 @@ msgstr ""
#. module: account
#: selection:account.move,type:0
msgid "Bank Receipt"
msgstr "Bankovní Příjem"
msgstr ""
#. module: account
#: view:res.partner:0
@ -1187,17 +1191,17 @@ msgstr "Bankovní účet"
#. module: account
#: field:account.chart.template,tax_template_ids:0
msgid "Tax Template List"
msgstr "Daňové seznamu šablon"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_invoiceimport0
msgid "Invoice import"
msgstr "Faktura import"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.action_move_journal_line_form_select
msgid "Standard entry"
msgstr "Standardní vstupní"
msgstr ""
#. module: account
#: help:account.account,currency_mode:0
@ -1212,7 +1216,7 @@ msgstr ""
#. module: account
#: field:account.account,company_currency_id:0
msgid "Company Currency"
msgstr "Společnost měny"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_fiscal_position_account_template
@ -1222,7 +1226,7 @@ msgstr ""
#. module: account
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "Parent Analytická účtu"
msgstr ""
#. module: account
#: wizard_button:account.move.line.reconcile,init_partial,addendum:0
@ -1242,22 +1246,22 @@ msgstr ""
#. module: account
#: field:account.bank.statement,balance_end_real:0
msgid "Ending Balance"
msgstr "Konečný zůstatek"
msgstr ""
#. module: account
#: view:product.product:0
msgid "Purchase Taxes"
msgstr "Nákup Daně"
msgstr ""
#. module: account
#: field:account.payment.term.line,name:0
msgid "Line Name"
msgstr "Název řádku"
msgstr ""
#. module: account
#: selection:account.payment.term.line,value:0
msgid "Fixed Amount"
msgstr "Pevná částka"
msgstr ""
#. module: account
#: rml:account.analytic.account.analytic.check:0
@ -1285,24 +1289,24 @@ msgstr ""
#. module: account
#: view:account.config.wizard:0
msgid "Continue"
msgstr "Pokračovat"
msgstr ""
#. module: account
#: field:account.payment.term.line,value:0
msgid "Value"
msgstr "Hodnota"
msgstr ""
#. module: account
#: wizard_field:account.invoice.pay,addendum,writeoff_acc_id:0
#: wizard_field:account.move.line.reconcile,addendum,writeoff_acc_id:0
msgid "Write-Off account"
msgstr "Odpis účet"
msgstr ""
#. module: account
#: field:account.model.line,model_id:0
#: field:account.subscription,model_id:0
msgid "Model"
msgstr "Vzor"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.wizard_fiscalyear_close_state
@ -1313,12 +1317,12 @@ msgstr ""
#. module: account
#: field:account.journal,centralisation:0
msgid "Centralised counterpart"
msgstr "Centralizované protějšek"
msgstr ""
#. module: account
#: view:wizard.company.setup:0
msgid "Message"
msgstr "Zpráva"
msgstr ""
#. module: account
#: model:process.node,note:account.process_node_supplierpaymentorder0
@ -1332,7 +1336,7 @@ msgstr ""
#: selection:account.analytic.account,type:0
#: field:account.journal,view_id:0
msgid "View"
msgstr "Pohled"
msgstr ""
#. module: account
#: selection:account.account.balance.report,checktype,display_account:0
@ -1340,13 +1344,13 @@ msgstr "Pohled"
#: selection:account.tax,type_tax_use:0
#: selection:account.tax.template,type_tax_use:0
msgid "All"
msgstr "Vše"
msgstr ""
#. module: account
#: field:account.move.line,analytic_lines:0
#: model:ir.model,name:account.model_account_analytic_line
msgid "Analytic lines"
msgstr "Analytická linky"
msgstr ""
#. module: account
#: help:account.tax,type:0
@ -1370,28 +1374,28 @@ msgstr ""
#. module: account
#: model:process.node,name:account.process_node_electronicfile0
msgid "Electronic File"
msgstr "Elektronický soubor"
msgstr ""
#. module: account
#: view:res.partner:0
msgid "Customer Credit"
msgstr "Odběratelský úvěr"
msgstr ""
#. module: account
#: field:account.invoice,tax_line:0
msgid "Tax Lines"
msgstr "Daňové Linky"
msgstr ""
#. module: account
#: field:ir.sequence,fiscal_ids:0
msgid "Sequences"
msgstr "Posloupnosti"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_type_form
#: model:ir.ui.menu,name:account.menu_action_account_type_form
msgid "Account Types"
msgstr "Typy účtů"
msgstr ""
#. module: account
#: wizard_field:account.automatic.reconcile,init,journal_id:0
@ -1413,18 +1417,18 @@ msgstr "Typy účtů"
#: wizard_field:populate_statement_from_inv,init,journal_id:0
#: field:report.hr.timesheet.invoice.journal,journal_id:0
msgid "Journal"
msgstr "Časopis"
msgstr ""
#. module: account
#: field:account.account,child_id:0
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "Dětská konta"
msgstr ""
#. module: account
#: field:account.account,check_history:0
msgid "Display History"
msgstr "Zobrazení historie"
msgstr ""
#. module: account
#: wizard_field:account.third_party_ledger.report,init,date1:0
@ -1454,7 +1458,7 @@ msgstr ""
#: wizard_view:account.move.line.reconcile,init_full:0
#: wizard_view:account.move.line.reconcile,init_partial:0
msgid "Write-Off"
msgstr "Odpis"
msgstr ""
#. module: account
#: help:account.invoice,partner_bank:0
@ -1466,12 +1470,12 @@ msgstr ""
#. module: account
#: field:res.partner,debit:0
msgid "Total Payable"
msgstr "Celkem za poplatek"
msgstr ""
#. module: account
#: wizard_button:account.fiscalyear.close.state,init,close:0
msgid "Close states"
msgstr "Zavřít státy"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_wizard_company_setup
@ -1486,22 +1490,22 @@ msgstr ""
#. module: account
#: field:account.journal,refund_journal:0
msgid "Refund Journal"
msgstr "Refundace věstníku"
msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_income
msgid "Income"
msgstr "Příjem"
msgstr ""
#. module: account
#: selection:account.bank.statement.line,type:0
msgid "Supplier"
msgstr "Dodavatel"
msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Tel. :"
msgstr "Telefonní číslo:"
msgstr ""
#. module: account
#: field:account.invoice.tax,tax_amount:0

View File

@ -36,6 +36,7 @@ import account_balance_landscape
import compare_account_balance
import account_invoice_report
import account_report
import account_analytic_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class analytic_report(osv.osv):
_name = "analytic.report"
_description = "Analytic Accounts Statistics"
_auto = False
_columns = {
'date_start': fields.date('Date Start', readonly=True),
'date_end': fields.date('Date End',readonly=True),
'name' : fields.char('Analytic Account', size=128, readonly=True),
'partner_id' : fields.many2one('res.partner', 'Associated Partner',readonly=True),
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', readonly=True),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
'user_id' : fields.many2one('res.users', 'Account Manager',readonly=True),
'product_id' : fields.many2one('product.product', 'Product',readonly=True),
'quantity': fields.float('Quantity',readonly=True),
'debit' : fields.float('Debit',readonly=True),
'credit' : fields.float('Credit',readonly=True),
'balance' : fields.float('Balance',readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'state': fields.selection([('draft','Draft'),
('open','Open'),
('pending','Pending'),
('cancelled', 'Cancelled'),
('close','Close'),
('template', 'Template')],
'State', readonly=True),
}
_order = 'date_start desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'analytic_report')
cr.execute("""
create or replace view analytic_report as (
select
min(s.id) as id,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
l.journal_id,
l.product_id,
s.parent_id,
s.date_start,
s.date as date_end,
s.user_id,
s.name,
s.partner_id,
s.quantity,
s.debit,
s.credit,
s.balance,
count(*) as nbr,
s.state
from account_analytic_account s
left join account_analytic_line l on (s.id=l.account_id)
GROUP BY s.create_date,s.state,l.journal_id,s.name,
s.partner_id,s.date_start,s.date,s.user_id,s.quantity,
s.debit,s.credit,s.balance,s.parent_id,l.product_id
)
""")
analytic_report()

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_analytic_report_tree" model="ir.ui.view">
<field name="name">analytic.report.tree</field>
<field name="model">analytic.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Analytic Accounts Statistics">
<field name="parent_id" invisible="1" string="Analytic Account"/>
<field name="product_id" invisible="1"/>
<field name="name"/>
<field name="partner_id"/>
<field name="journal_id" string="Analytic Journal"/>
<field name="user_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="quantity"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="state"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
</tree>
</field>
</record>
<record id="view_analytic_report_search" model="ir.ui.view">
<field name="name">analytic.report.search</field>
<field name="model">analytic.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Accounts">
<group>
<filter icon="terp-account"
string="This Year"
domain="[('year','=',time.strftime('%%Y'))]"/>
<filter icon="terp-account"
string="This Month"
domain="[('month','=',time.strftime('%%m'))]"/>
<separator orientation="vertical"/>
<filter string="Start" icon="terp-account" domain="[('date_start','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="End" icon="terp-account" domain="[('date_end','=',time.strftime('%%Y/%%m/%%d'))]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Accounts"
name="User"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-account"
string="Pending"
domain="[('state','=','pending')]"/>
<filter icon="terp-account"
string="Close"
domain="[('state','=','close')]"/>
<filter icon="terp-account"
string="Template"
domain="[('state','=','template')]"/>
<separator orientation="vertical"/>
<field name="parent_id"/>
<field name="journal_id"/>
<field name="product_id"/>
<separator orientation="vertical"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="User" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Analytic Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Analytic Account" icon="terp-account" context="{'group_by':'parent_id'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_analytic_report_all" model="ir.actions.act_window">
<field name="name">Analytic Accounts</field>
<field name="res_model">analytic.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_User':1,'search_default_user_id':uid}</field>
<field name="search_view_id" ref="view_analytic_report_search"/>
</record>
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_reporting" sequence="0"/>
</data>
</openerp>

View File

@ -29,6 +29,7 @@ from report import report_sxw
class account_balance(report_sxw.rml_parse):
_name = 'report.account.account.balance'
def __init__(self, cr, uid, name, context):
print " KKKKKKKKKKKKKKKKKKKKKKKK"
super(account_balance, self).__init__(cr, uid, name, context=context)
self.sum_debit = 0.00
self.sum_credit = 0.00
@ -95,12 +96,12 @@ class account_balance(report_sxw.rml_parse):
ctx['state'] = form['context'].get('state','all')
ctx['fiscalyear'] = form['fiscalyear']
if form['state']=='byperiod' :
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
elif form['state']== 'bydate':
ctx['date_from'] = form['date_from']
ctx['date_to'] = form['date_to']
elif form['state'] == 'all' :
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
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)

View File

@ -368,15 +368,15 @@ class account_balance_landscape(rml_parse.rml_parse):
self.total_for_perc=self.linesForTotal(form,ids={},doneAccount={},level=1)
self.done_total=0
for t1 in range(0,len(form['fiscalyear'][0][2])):
for t1 in range(0,len(form['fiscalyear'])):
locale.setlocale(locale.LC_ALL, '')
self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True)
self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True)
# self.flag=1
# self.result_total = {}
for temp in range(0,len(form['fiscalyear'][0][2])):
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][0][2][temp])
for temp in range(0,len(form['fiscalyear'])):
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][temp])
years["year"+str(temp)]=fy[0][1][12:16]
return [years]
@ -396,11 +396,11 @@ class account_balance_landscape(rml_parse.rml_parse):
ctx = self.context.copy()
result_total_parent=[]
for id in form['fiscalyear'][0][2]:
for id in form['fiscalyear']:
tmp=[]
ctx['fiscalyear'] = id
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
ctx['period_manner'] = form['period_manner']
ctx['state'] = form['context'].get('state','all')
tmp = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy())
@ -456,10 +456,10 @@ class account_balance_landscape(rml_parse.rml_parse):
result = []
ctx = self.context.copy()
tmp1=[]
for id in form['fiscalyear'][0][2]:
for id in form['fiscalyear']:
ctx['fiscalyear'] = id
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
ctx['period_manner']=form['period_manner']
ctx['state'] = form['context'].get('state','all')
tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids,ctx.copy())
@ -575,7 +575,7 @@ class account_balance_landscape(rml_parse.rml_parse):
if entry[0].child_id:
for q in range(0,len(form['fiscalyear'][0][2])):
for q in range(0,len(form['fiscalyear'])):
self.baldiv["baldiv"+str(level)+str(q)]=entry[q].balance
ids2 = [(x.code,x.id) for x in entry[0].child_id]
@ -583,7 +583,7 @@ class account_balance_landscape(rml_parse.rml_parse):
dir=[]
dir += self.lines(form, [x[1] for x in ids2], done, level+1)
if dir==[]:
for w in range(0,len(form['fiscalyear'][0][2])):
for w in range(0,len(form['fiscalyear'])):
if entry[w].credit <> 0.0 or entry[w].debit <> 0.0 or entry[w].balance<>0.00:
dont_pop=1
break
@ -601,9 +601,9 @@ class account_balance_landscape(rml_parse.rml_parse):
def get_years(self,form):
result =[]
res={}
for temp in range(0,len(form['fiscalyear'][0][2])):
for temp in range(0,len(form['fiscalyear'])):
res={}
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][0][2][temp])
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][temp])
res['year']=fy[0][1]
res['last_str']=temp

View File

@ -30,11 +30,17 @@ class account_invoice_report(osv.osv):
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'payment_term': fields.many2one('account.payment.term', 'Payment Term',readonly=True),
'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')],readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position',readonly=True),
'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal',readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
@ -66,9 +72,15 @@ class account_invoice_report(osv.osv):
s.date_invoice as date,
to_char(s.date_invoice, 'YYYY') as year,
to_char(s.date_invoice, 'MM') as month,
to_char(s.date_invoice, 'YYYY-MM-DD') as day,
l.product_id as product_id,
sum(l.quantity * u.factor) as product_qty,
s.partner_id as partner_id,
s.payment_term as payment_term,
s.period_id as period_id,
s.currency_id as currency_id,
s.journal_id as journal_id,
s.fiscal_position as fiscal_position,
s.user_id as user_id,
s.company_id as company_id,
sum(l.quantity*l.price_unit) as price_total,
@ -82,9 +94,19 @@ class account_invoice_report(osv.osv):
account_invoice s on (s.id=l.invoice_id)
left join product_uom u on (u.id=l.uos_id)
group by
s.type,s.date_invoice, s.partner_id, l.product_id,
l.uos_id, s.user_id, s.state,
s.company_id
s.type,
s.date_invoice,
s.partner_id,
l.product_id,
l.uos_id,
s.user_id,
s.state,
s.company_id,
s.payment_term,
s.period_id,
s.fiscal_position,
s.currency_id,
s.journal_id
)
""")
account_invoice_report()

View File

@ -7,20 +7,26 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Invoices Statistics">
<field name="date"/>
<field name="user_id"/>
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="type" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_qty" invisible="1"/>
<!--field name="delay" avg="Days to Close"/-->
<field name="nbr" sum="# of Lines"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="state" invisible="1"/>
<field name="payment_term" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="fiscal_position" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
</tree>
</field>
</record>
@ -44,60 +50,85 @@
<field name="arch" type="xml">
<search string="Invoices">
<group>
<filter icon="terp-account"
string="This Year"
domain="[('year','=',time.strftime('%%Y'))]"
help="Invoices of the year"/>
<filter icon="terp-account"
string="This Month"
domain="[('month','=',time.strftime('%%m'))]"
help="Invoices of this month"/>
<filter icon="terp-account" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of the year"/>
<filter icon="terp-account" string="This Month"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of this month"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Invoices during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
string="Invoices"
domain="[('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"/>
<filter icon="terp-account"
string="Paid"
domain="[('state','=','paid')]"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Invoices"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<filter string="Draft"
icon="terp-account"
domain="[('state','=','draft')]"
help = "Draft tasks"/>
<filter string="Pro-forma"
icon="terp-account"
domain="[('state','=','proforma'),('state','=','proforma2')]"
help = "Pro-forma tasks"/>
<filter string="Current"
icon="terp-account"
domain="[('state', '=' ,'open')]"
help = "In progress tasks"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Invoices"
help = "My Invoices"
domain="[('user_id','=',uid)]" />
<filter icon="terp-account"
string="Invoices Non Users"
help="Invoices Non Users"
domain="[('user_id','=',False)]"/>
</field>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Done"
icon="terp-account"
domain="[('state','=','paid')]"
help = "Done tasks"/>
<filter string="Cancelled"
icon="terp-account"
domain="[('state', '=' ,'cancel')]"
help = "Cancelled tasks"/>
<separator orientation="vertical"/>
<field name="payment_term" widget="selection"/>
<field name="currency_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="type"/>
<field name="period_id" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<field name="date"/>
</group>
<newline/>
<group expand="1" string="Extended options..." >
<filter icon="terp-account"
string="Customer Invoices"
domain="[('type','=','out_invoice')]"/>
<filter icon="terp-account"
string="Customer Refunds"
domain="[('type','=','out_refund')]"/>
<separator orientation="vertical"/>
<filter icon="terp-account"
string="Supplier Invoices"
domain="[('type','=','in_invoice')]"/>
<filter icon="terp-account"
string="Supplier Refunds"
domain="[('type','=','in_refund')]"/>
</group>
<newline/>
<group expand="1" string="Group By..." >
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}"/>
<filter string="Salesman" icon="terp-account" context="{'group_by':'user_id'}" />
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Salesman" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Payment Term" icon="terp-account" context="{'group_by':'payment_term'}"/>
<separator orientation="vertical"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Force Period" icon="terp-account" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Position" icon="terp-account" context="{'group_by':'fiscal_position'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
@ -110,6 +141,7 @@
<field name="res_model">account.invoice.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_invoice_report_search"/>
</record>

View File

@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import pooler
import rml_parse
from report import report_sxw
@ -45,7 +45,6 @@ class aged_trial_report(rml_parse.rml_parse):
def _get_lines(self, form):
if (form['result_selection'] == 'customer' ):
self.ACCOUNT_TYPE = ['receivable']
elif (form['result_selection'] == 'supplier'):

View File

@ -368,15 +368,15 @@ class account_balance(report_sxw.rml_parse):
self.total_for_perc=self.linesForTotal(form,ids={},doneAccount={},level=1)
self.done_total=0
for t1 in range(0,len(form['fiscalyear'][0][2])):
for t1 in range(0,len(form['fiscalyear'])):
locale.setlocale(locale.LC_ALL, '')
self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True)
self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True)
# self.flag=1
# self.result_total = {}
for temp in range(0,len(form['fiscalyear'][0][2])):
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][0][2][temp])
for temp in range(0,len(form['fiscalyear'])):
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][temp])
years["year"+str(temp)]=fy[0][1][12:16]
return [years]
@ -395,11 +395,11 @@ class account_balance(report_sxw.rml_parse):
ctx = self.context.copy()
result_total_parent=[]
for id in form['fiscalyear'][0][2]:
for id in form['fiscalyear']:
tmp=[]
ctx['fiscalyear'] = id
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
ctx['period_manner'] = form['period_manner']
ctx['state'] = form['context'].get('state','all')
tmp = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy())
@ -453,10 +453,10 @@ class account_balance(report_sxw.rml_parse):
result = []
ctx = self.context.copy()
tmp1=[]
for id in form['fiscalyear'][0][2]:
for id in form['fiscalyear']:
ctx['fiscalyear'] = id
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
ctx['period_manner']=form['period_manner']
ctx['state'] = form['context'].get('state','all')
tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids,ctx.copy())
@ -571,7 +571,7 @@ class account_balance(report_sxw.rml_parse):
if entry[0].child_id:
for q in range(0,len(form['fiscalyear'][0][2])):
for q in range(0,len(form['fiscalyear'])):
self.baldiv["baldiv"+str(level)+str(q)]=entry[q].balance
ids2 = [(x.code,x.id) for x in entry[0].child_id]
@ -579,7 +579,7 @@ class account_balance(report_sxw.rml_parse):
dir=[]
dir += self.lines(form, [x[1] for x in ids2], done, level+1)
if dir==[]:
for w in range(0,len(form['fiscalyear'][0][2])):
for w in range(0,len(form['fiscalyear'])):
if entry[w].credit <> 0.0 or entry[w].debit <> 0.0 or entry[w].balance<>0.00:
dont_pop=1
break
@ -597,9 +597,9 @@ class account_balance(report_sxw.rml_parse):
def get_years(self,form):
result =[]
res={}
for temp in range(0,len(form['fiscalyear'][0][2])):
for temp in range(0,len(form['fiscalyear'])):
res={}
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][0][2][temp])
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][temp])
res['year']=fy[0][1]
res['last_str']=temp

View File

@ -41,7 +41,7 @@ class general_ledger(rml_parse.rml_parse):
##
new_ids = []
if (data['model'] == 'account.account'):
new_ids = ids
new_ids = 'active_ids' in data['form']['context'] and data['form']['context']['active_ids'] or []
else:
new_ids.append(data['form']['Account_list'])
@ -117,7 +117,7 @@ class general_ledger(rml_parse.rml_parse):
borne_max = res[0]['stop_date']
if form['state'] == 'byperiod':
## This function will return the most aged date
periods = form['periods'][0][2]
periods = form['periods']
if not periods:
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = %s""",(form['fiscalyear'],))
@ -131,13 +131,16 @@ class general_ledger(rml_parse.rml_parse):
borne_min = form['date_from']
borne_max = form['date_to']
elif form['state'] == 'all':
periods = form['periods'][0][2]
periods = form['periods']
if not periods:
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = %s""",(form['fiscalyear'],))
if form['fiscalyear'] == False:
fiscalyears = self.pool.get('account.fiscalyear').search(self.cr, self.uid, [('state', '=', 'draft')])
else:
fiscalyears = [form['fiscalyear']]
self.cr.execute("select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id =ANY(%s)" ,(fiscalyears,))
else:
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id =ANY(%s)""",(periods,))
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id =ANY(%s)""",(periods,))
res = self.cr.dictfetchall()
period_min = res[0]['start_date']
period_max = res[0]['stop_date']
@ -180,7 +183,7 @@ class general_ledger(rml_parse.rml_parse):
ctx['state'] = form['context'].get('state','all')
if form.has_key('fiscalyear'):
ctx['fiscalyear'] = form['fiscalyear']
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
else:
ctx['date_from'] = form['date_from']
ctx['date_to'] = form['date_to']

View File

@ -42,12 +42,10 @@ class general_ledger_landscape(rml_parse.rml_parse):
##
new_ids = []
if (data['model'] == 'account.account'):
new_ids = ids
new_ids = 'active_ids' in data['form']['context'] and data['form']['context']['active_ids'] or []
else:
new_ids.append(data['form']['Account_list'])
objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
super(general_ledger_landscape, self).set_context(objects, data, new_ids,report_type)
def __init__(self, cr, uid, name, context):
@ -118,7 +116,7 @@ class general_ledger_landscape(rml_parse.rml_parse):
borne_max = res[0]['stop_date']
if form['state'] == 'byperiod':
## This function will return the most aged date
periods = form['periods'][0][2]
periods = form['periods']
if not periods:
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = %s""" ,(form['fiscalyear'],))
@ -133,11 +131,13 @@ class general_ledger_landscape(rml_parse.rml_parse):
borne_min = form['date_from']
borne_max = form['date_to']
elif form['state'] == 'all':
periods = form['periods'][0][2]
periods = form['periods']
if not periods:
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = = %s""" ,(form['fiscalyear'],))
if form['fiscalyear'] == False:
fiscalyears = self.pool.get('account.fiscalyear').search(self.cr, self.uid, [('state', '=', 'draft')])
else:
fiscalyears = [form['fiscalyear']]
self.cr.execute("select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id =ANY(%s)" ,(fiscalyears,))
else:
self.cr.execute("""
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id =ANY(%s)""",(periods,))
@ -182,7 +182,7 @@ class general_ledger_landscape(rml_parse.rml_parse):
ctx['state'] = form['context'].get('state','all')
if form.has_key('fiscalyear'):
ctx['fiscalyear'] = form['fiscalyear']
ctx['periods'] = form['periods'][0][2]
ctx['periods'] = form['periods']
else:
ctx['date_from'] = form['date_from']
ctx['date_to'] = form['date_to']

View File

@ -59,10 +59,10 @@ class third_party_ledger(rml_parse.rml_parse):
#
def transform_period_into_date_array(self,data):
## Get All Period Date
if not data['form']['periods'][0][2] :
if not data['form']['periods']:
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]
periods_id = data['form']['periods']
date_array = []
for period_id in periods_id:
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
@ -77,10 +77,10 @@ class third_party_ledger(rml_parse.rml_parse):
def transform_both_into_date_array(self,data):
if not data['form']['periods'][0][2] :
if not data['form']['periods']:
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]
periods_id = data['form']['periods']
date_array = []
for period_id in periods_id:
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)

View File

@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
#
# TODO: move this in a YAML test with !python tag
#
import xmlrpclib
DB = 'training3'
USERID = 1
USERPASS = 'admin'
sock = xmlrpclib.ServerProxy('http://%s:%s/xmlrpc/object' % ('localhost',8069))
ids = sock.execute(DB, USERID, USERPASS, 'account.account', 'search', [], {})
account_lists = sock.execute(DB, USERID, USERPASS, 'account.account', 'read', ids, ['parent_id','parent_left','parent_right'])
accounts = dict(map(lambda x: (x['id'],x), account_lists))
for a in account_lists:
if a['parent_id']:
assert a['parent_left'] > accounts[a['parent_id'][0]]['parent_left']
assert a['parent_right'] < accounts[a['parent_id'][0]]['parent_right']
assert a['parent_left'] < a['parent_right']
for a2 in account_lists:
assert not ((a2['parent_right']>a['parent_left']) and
(a2['parent_left']<a['parent_left']) and
(a2['parent_right']<a['parent_right']))
if a2['parent_id']==a['id']:
assert (a2['parent_left']>a['parent_left']) and (a2['parent_right']<a['parent_right'])
print 'Tests Ok'

View File

@ -1,12 +1,5 @@
- |
In order to test the Preorder Traversal Tree algorythm to organize tree
structure, we retrieve all accounts and test their parent_left and
parent_right values with the following assertions
. parent_left < parent_right
. parent_left < parent_left of all childs
. parent_right > parent_right of all childs
. if an account is a child it is included in parent_left-parent_right
. if an account is not a child it is not included in parent_left-parent_right
-
We retrieve all accounts and test they are in a tree data structure.
-
!python {model: account.account}: |
ids = self.search(cr, uid, [])

View File

@ -30,21 +30,21 @@ import account_move_journal
import account_journal_select
import account_move_bank_reconcile
import account_subscription_generate
import wizard_aged_trial_balance
import wizard_general_ledger_report
import wizard_third_party_ledger
import account_aged_trial_balance
import account_general_ledger_report
import account_third_party_ledger
import account_partner_balance_report
import account_balance_report
import account_period_close
import account_fiscalyear_close
import account_fiscalyear_close_state
import account_vat
import account_open_closed_fiscalyear
import wizard_compare_account_balance_report
import account_compare_account_balance_report
import account_invoice_state
import wizard_account_duplicate
import account_chart
import wizard_move_line_select
import account_move_line_select
import account_validate_account_move
import account_use_model

View File

@ -0,0 +1,106 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import datetime
from mx.DateTime import *
from osv import osv, fields
from tools.translate import _
class account_aged_trial_balance(osv.osv_memory):
_name = 'account.aged.trial.balance'
_description = 'Account Aged Trial balance Report'
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
'period_length':fields.integer('Period length (days)', required=True),
'date1': fields.date('Start of period', required=True),
'result_selection': fields.selection([('customer','Receivable'),
('supplier','Payable'),
('all','Receivable and Payable')],
'Filter on Partners', required=True),
'direction_selection': fields.selection([('past','Past'),
('future','Future')],
'Analysis Direction', required=True),
}
def _get_company(self, cr, uid, ids, context=None):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
if context is None:
context = {}
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'company_id' : _get_company,
'period_length' : 30,
'date1' : time.strftime('%Y-%m-%d'),
'result_selection' : 'all',
'direction_selection' : 'past',
}
def calc_dates(self, cr, uid, ids, context=None):
fiscalyear_obj = self.pool.get('account.fiscalyear')
data={}
res = {}
if context is None:
context = {}
data['ids'] = context.get('active_ids',[])
data['model'] = 'res.partner'
data['form'] = self.read(cr, uid, ids, [])[0]
data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid)
period_length = data['form']['period_length']
if period_length<=0:
raise osv.except_osv(_('UserError'), _('You must enter a period length that cannot be 0 or below !'))
start = datetime.date.fromtimestamp(time.mktime(time.strptime(data['form']['date1'],"%Y-%m-%d")))
start = DateTime(int(start.year),int(start.month),int(start.day))
if data['form']['direction_selection'] == 'past':
for i in range(5)[::-1]:
stop = start - RelativeDateTime(days=period_length)
res[str(i)] = {
'name' : str((5-(i+1))*period_length) + '-' + str((5-i)*period_length),
'stop': start.strftime('%Y-%m-%d'),
'start' : stop.strftime('%Y-%m-%d'),
}
start = stop - RelativeDateTime(days=1)
else:
for i in range(5):
stop = start + RelativeDateTime(days=period_length)
res[str(5-(i+1))] = {
'name' : str((i)*period_length)+'-'+str((i+1)*period_length),
'start': start.strftime('%Y-%m-%d'),
'stop' : stop.strftime('%Y-%m-%d'),
}
start = stop + RelativeDateTime(days=1)
data['form'].update(res)
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.aged_trial_balance',
'datas': data,
}
account_aged_trial_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_aged_balance_view" model="ir.ui.view">
<field name="name">Aged Partner Balance</field>
<field name="model">account.aged.trial.balance</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print Aged Trial Balance">
<field name="company_id"/>
<newline/>
<field name="date1"/>
<field name="period_length"/>
<newline/>
<field name="result_selection"/>
<newline/>
<field name="direction_selection"/>
<newline/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="calc_dates" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_aged_balance_view" model="ir.actions.act_window">
<field name="name">Aged Partner Balance</field>
<field name="res_model">account.aged.trial.balance</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_aged_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
<menuitem
icon="STOCK_PRINT"
name="Aged Partner Balance"
action="action_account_aged_balance_view"
id="menu_aged_trial_balance"
parent="next_id_22"/>
</data>
</openerp>

View File

@ -0,0 +1,136 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import osv, fields
from tools.translate import _
class account_balance_report(osv.osv_memory):
"""
This wizard will provide the account balance report by periods, between any two dates.
"""
_name = 'account.balance.report'
_description = 'Account Balance Report'
_columns = {
'Account_list': fields.many2one('account.account', 'Chart account',
required=True, domain = [('parent_id','=',False)]),
'company_id': fields.many2one('res.company', 'Company', required=True),
'display_account': fields.selection([('bal_mouvement','With movements'),
('bal_all','All'),
('bal_solde','With balance is not equal to 0'),
],'Display accounts'),
'fiscalyear': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'),
'state': fields.selection([('bydate','By Date'),
('byperiod','By Period'),
('all','By Date and Period'),
('none','No Filter')
],'Date/Period Filter'),
'periods': fields.many2many('account.period', 'period_account_balance_rel',
'report_id', 'period_id', 'Periods',
help='Keep empty for all open fiscal year'),
'date_from': fields.date('Start date', required=True),
'date_to': fields.date('End date', required=True),
}
def _get_company(self, cr, uid, ids, context=None):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
_defaults={
'state' : 'none',
'date_from' : time.strftime('%Y-01-01'),
'date_to' : time.strftime('%Y-%m-%d'),
'company_id' : _get_company,
'fiscalyear' : False,
'display_account': 'bal_all',
}
def next_view(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
if context is None:
context = {}
data = self.read(cr, uid, ids, [])[0]
context.update({'Account_list': data['Account_list']})
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','account_balance_report_view')])
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'account.balance.report',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
'context': context
}
def check_state(self, cr, uid, ids, context=None):
if context is None:
context = {}
data={}
data['ids'] = context['active_ids']
data['form'] = self.read(cr, uid, ids, ['date_from', 'company_id', 'state', 'periods', 'date_to', 'display_account', 'fiscalyear'])[0]
data['form']['Account_list'] = context.get('Account_list',[])
data['form']['context'] = context
if data['form']['Account_list']:
data['model'] = 'ir.ui.menu'
else:
data['model'] = 'account.account'
if data['form']['state'] == 'bydate' :
return self._check_date(cr, uid, data, context)
elif data['form']['state'] == 'byperiod':
if not data['form']['periods']:
raise osv.except_osv(_('Warning'),_('Please Enter Periods ! '))
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance',
'datas': data,
}
def _check_date(self, cr, uid, data, context=None):
if context is None:
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 """
cr.execute(sql,(data['form']['date_from'],))
res = cr.dictfetchall()
if res:
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
raise osv.except_osv(_('UserError'),_('Date to must be set between %s and %s') % (res[0]['date_start'], res[0]['date_stop']))
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance',
'datas': data,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
account_balance_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_balance_report_view" model="ir.ui.view">
<field name="name">Select period</field>
<field name="model">account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<field name="company_id"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_balance_report" model="ir.actions.act_window">
<field name="name">Account Balance</field>
<field name="res_model">account.balance.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_balance_report_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_balance_report_values">
<field name="model_id" ref="account.model_account_account" />
<field name="object" eval="1" />
<field name="name">Account Balance</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_report'))" />
<field name="key">action</field>
<field name="model">account.account</field>
</record>
<record id="account_balance_report_account_view" model="ir.ui.view">
<field name="name">Account Balance</field>
<field name="model">account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
<record id="action_account_balance_account_report" model="ir.actions.act_window">
<field name="name">Select Account</field>
<field name="res_model">account.balance.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_balance_report_account_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
<menuitem icon="STOCK_PRINT"
name="Account Balance"
action="action_account_balance_account_report"
id="menu_account_balance_report"
parent="account.menu_generic_report"/>
</data>
</openerp>

View File

@ -0,0 +1,136 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import osv, fields
from tools.translate import _
class account_compare_account_balance_report(osv.osv_memory):
"""
This wizard will provide the account balance comparision report by fiscal years.
"""
_name = 'account.compare.account.balance.report'
_description = 'Account Balance Report'
_columns = {
'fiscalyear': fields.many2many('account.fiscalyear', 'account_fiscalyear_rel','account_id','fiscalyear_id','Fiscal year', help='Keep empty for all open fiscal year'),
'select_account': fields.many2one('account.account','Select Reference Account(for % comparision)',help='Keep empty for comparision to its parent'),
'account_choice': fields.selection([('all','All accounts'),
('bal_zero','With balance is not equal to 0'),
('moves','With movements')],'Show Accounts'),
'show_columns': fields.boolean('Show Debit/Credit Information'),
'landscape': fields.boolean('Show Report in Landscape Form'),
'format_perc': fields.boolean('Show Comparision in %'),
'compare_pattern': fields.selection([('bal_cash','Cash'),
('bal_perc','Percentage'),
('none','Don'+ "'" +'t Compare')],'Compare Selected Years In Terms Of'),
'period_manner': fields.selection([('actual','Financial Period'),('created','Creation Date')],'Entries Selection Based on'),
'periods': fields.many2many('account.period', 'period_account_balance_rel',
'report_id', 'period_id', 'Periods',
help='Keep empty for all open fiscal year'),
}
_defaults={
'compare_pattern': 'none',
'account_choice': 'moves',
'period_manner': 'actual',
}
def check(self, cr, uid, ids, context=None):
data={}
if context is None:
context = {}
data = {
'ids':context['active_ids'],
'form': self.read(cr, uid, ids, ['fiscalyear', 'select_account', 'account_choice', 'periods', 'show_columns', 'landscape', 'format_perc','compare_pattern','period_manner'])[0],
}
data['form']['context'] = context
if (len(data['form']['fiscalyear'])==0) or (len(data['form']['fiscalyear'])>1 and (data['form']['compare_pattern']!='none') and (data['form']['format_perc']==1) and (data['form']['show_columns']==1) and (data['form']['landscape']!=1)):
raise osv.except_osv(_('Warning !'), _('You have to select at least 1 Fiscal Year. \nYou 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.'))
if ((len(data['form']['fiscalyear'])==3) and (data['form']['format_perc']!=1) and (data['form']['show_columns']!=1)):
if data['form']['landscape']==1:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
}
if data['form']['format_perc']==1:
if len(data['form']['fiscalyear'])<=2:
if data['form']['landscape']==1:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
}
else:
if len(data['form']['fiscalyear'])==3:
if data['form']['landscape']==1:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
}
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
else:
if len(data['form']['fiscalyear'])>2:
if data['form']['landscape']==1:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
}
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
else:
if data['form']['landscape']==1:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
}
account_compare_account_balance_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_compare_account_balance_report_view" model="ir.ui.view">
<field name="name">account.compare.account.balance.report.form</field>
<field name="model">account.compare.account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Customize Report">
<notebook tabpos="up">
<page string="Report Options">
<separator string="Select Fiscal Year(s)(Maximum Three Years)" colspan="4"/>
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
<field name="fiscalyear" colspan="5" nolabel="1"/>
<field name="landscape" colspan="4"/>
<field name="show_columns" colspan="4"/>
<field name="format_perc" colspan="4"/>
<field name="select_account" colspan="4"/>
<field name="account_choice" colspan="4"/>
<field name="compare_pattern" colspan="4"/>
</page>
<page string="Select Period">
<field name="period_manner" colspan="4"/>
<separator string="Select Period(s)" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</page>
</notebook>
<newline/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
<act_window name="Account balance-Compare Years"
res_model="account.compare.account.balance.report"
src_model="account.account"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_view_account_compare_account_balance_report"/>
</data>
</openerp>

View File

@ -0,0 +1,151 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import fields, osv
from tools.translate import _
import tools
class account_general_ledger_report(osv.osv_memory):
_name = "account.general.ledger.report"
_description = "General Ledger Report"
_columns = {
'Account_list': fields.many2one('account.account', 'Chart account', required=True, domain = [('parent_id','=',False)]),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state': fields.selection([('bydate','By Date'),
('byperiod','By Period'),
('all','By Date and Period'),
('none','No Filter')],"Date/Period Filter"),
'fiscalyear': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'),
'periods': fields.many2many('account.period', 'ledger_period_rel', 'ledger_id', 'period_id', 'Periods', help='All periods if empty' ),
'sortbydate': fields.selection([('sort_date','Date'),
('sort_mvt','Movement')],"Sort by:"),
'display_account': fields.selection([('bal_mouvement','With movements'),
('bal_all','All'),
('bal_solde','With balance is not equal to 0')],"Display accounts"),
'landscape': fields.boolean("Landscape Mode"),
'soldeinit': fields.boolean("Include initial balances"),
'amount_currency': fields.boolean("With Currency"),
'date_from': fields.date("Start date", required=True),
'date_to': fields.date("End date", required=True)
}
def _get_company(self, cr, uid, ids, context=None):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
if context is None:
context = {}
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'state' : 'none',
'date_from' : lambda *a: time.strftime('%Y-01-01'),
'date_to' : lambda *a: time.strftime('%Y-%m-%d'),
'company_id' : _get_company,
'display_account' : 'bal_all',
'sortbydate' : 'sort_date',
'fiscalyear' : False,
'landscape': True,
'amount_currency' : True,
}
def next_view(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
if context is None:
context = {}
data = self.read(cr, uid, ids, [])[0]
context.update({'Account_list': data['Account_list']})
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','account_general_ledger_report_view')])
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'account.general.ledger.report',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
'context': context
}
def _check_date(self, cr, uid, data, context=None):
if context is None:
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 """
cr.execute(sql,(data['form']['date_from'],))
res = cr.dictfetchall()
if res:
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
raise osv.except_osv(_('UserError'),_('Date to must be set between %s and %s') % (str(res[0]['date_start']), str(res[0]['date_stop'])))
else:
if data['form']['landscape'] == True:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape',
'datas': data,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger',
'datas': data,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
def check_report(self, cr, uid, ids, context=None):
if context is None:
context = {}
data={}
data['ids'] = context.get('active_ids',[])
data['form'] = self.read(cr, uid, ids, ['date_from', 'sortbydate', 'company_id', 'soldeinit', 'state', 'periods', 'date_to', 'amount_currency', 'display_account', 'landscape', 'fiscalyear'])[0]
data['form']['Account_list'] = context.get('Account_list',[])
if data['form']['Account_list']:
data['model'] = 'ir.ui.menu'
else:
data['model'] = 'account.account'
data['form']['context'] = context
if data['form']['state'] == 'bydate':
return self._check_date(cr, uid, data, context)
elif data['form']['state'] == 'byperiod':
if not data['form']['periods']:
raise osv.except_osv(_('Data Insufficient !'),_('Please select periods.'))
if data['form']['landscape'] == True:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape',
'datas': data,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger',
'datas': data,
}
account_general_ledger_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_general_ledger_report_view" model="ir.ui.view">
<field name="name">General Ledger</field>
<field name="model">account.general.ledger.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id" colspan="4"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<field name="display_account" required="True"/>
<field name="sortbydate" required="True"/>
<field name="soldeinit" invisible="1"/>
<field name="landscape"/>
<field name="amount_currency"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="action_account_general_ledger_report" model="ir.actions.act_window">
<field name="name">General Ledger</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.general.ledger.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_general_ledger_report_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_general_ledger_report_values">
<field name="model_id" ref="account.model_account_account" />
<field name="object" eval="1" />
<field name="name">Account General Ledger</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_general_ledger_report'))" />
<field name="key">action</field>
<field name="model">account.account</field>
</record>
<record id="account_general_ledger_report_view1" model="ir.ui.view">
<field name="name">General Ledger</field>
<field name="model">account.general.ledger.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
<record id="action_account_general_ledger_menu" model="ir.actions.act_window">
<field name="name">Select Chart</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.general.ledger.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_general_ledger_report_view1"/>
<field name="target">new</field>
</record>
<menuitem
icon="STOCK_PRINT"
name="General Ledger"
parent="account.menu_generic_report"
action="action_account_general_ledger_menu"
id="menu_general_ledger"
/>
</data>
</openerp>

View File

@ -31,9 +31,6 @@
<field name="target">new</field>
</record>
<menuitem id="next_id_20" name="Reconciliation"
parent="menu_finance_periodical_processing" />
<menuitem action="action_account_reconcile_select"
id="menu_reconcile_select" parent="account.next_id_20" />

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,54 +15,61 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
from osv import fields, osv
from tools.translate import _
class wizard_move_line_select(wizard.interface):
def _open_window(self, cr, uid, data, context):
mod_obj = pooler.get_pool(cr.dbname).get('ir.model.data')
act_obj = pooler.get_pool(cr.dbname).get('ir.actions.act_window')
account_obj = pooler.get_pool(cr.dbname).get('account.account')
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
class account_move_line_select(osv.osv_memory):
"""
Account move line select
"""
_name = "account.move.line.select"
_description = "Account move line select"
if not context.get('fiscalyear', False):
def open_window(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
act_obj = self.pool.get('ir.actions.act_window')
account_obj = self.pool.get('account.account')
fiscalyear_obj = self.pool.get('account.fiscalyear')
if context is None:
context = {}
if 'fiscalyear' not in context:
fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
else:
fiscalyear_ids = [context['fiscalyear']]
fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
fiscalyears = fiscalyear_obj.browse(cr, uid, fiscalyear_ids)
period_ids = []
for fiscalyear in fiscalyears:
for period in fiscalyear.period_ids:
period_ids.append(period.id)
domain = str(('period_id', 'in', period_ids))
if fiscalyears :
for fiscalyear in fiscalyears:
for period in fiscalyear.period_ids:
period_ids.append(period.id)
domain = str(('period_id', 'in', period_ids))
result = mod_obj._get_id(cr, uid, 'account', 'action_move_line_tree1')
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
result = act_obj.read(cr, uid, [id])[0]
result['context'] = {
'fiscalyear': context.get('fiscalyear', False),
'account_id': data['id']
'fiscalyear': False ,
'account_id': context['active_id'],
'active_id': context['active_id'],
}
if data['id']:
acc_data = account_obj.browse(cr, uid, data['id']).child_consol_ids
if context['active_id']:
acc_data = account_obj.browse(cr, uid, context['active_id']).child_consol_ids
if acc_data:
result['context'].update({'consolidate_childs': True})
result['domain']=result['domain'][0:-1]+','+domain+result['domain'][-1]
return result
states = {
'init': {
'actions': [],
'result': {'type': 'action', 'action': _open_window, 'state': 'end'}
}
}
wizard_move_line_select('account.move.line.select')
account_move_line_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_move_line_select_button_view" model="ir.ui.view">
<field name="name">Open Move Line Button</field>
<field name="model">account.move.line.select</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Select">
<label string="Are you sure you want to open Account move line entries!" colspan="4"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-open" string="Open Entries" name="open_window" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_move_line_select_button" model="ir.actions.act_window">
<field name="name">Open Account</field>
<field name="res_model">account.move.line.select</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_move_line_select_button_view"/>
<field name="target">new</field>
</record>
<record id="ir_account_move_line_select" model="ir.values">
<field name="key2">tree_but_open</field>
<field name="model">account.account</field>
<field name="name">Open Account</field>
<field eval="'ir.actions.act_window,%d'%action_account_move_line_select_button" name="value"/>
<field eval="True" name="object"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,129 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from tools.translate import _
from osv import fields, osv
class account_partner_ledger(osv.osv_memory):
"""
This wizard will provide the partner Ledger report by periods, between any two dates.
"""
_name = 'account.partner.ledger'
_description = 'Account Partner Ledger'
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
'state': fields.selection([('bydate','By Date'),
('byperiod','By Period'),
('all','By Date and Period'),
('none','No Filter')
],'Date/Period Filter'),
'fiscalyear': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'),
'periods': fields.many2many('account.period', 'period_ledger_rel', 'report_id', 'period_id', 'Periods', help='All periods if empty', states={'none':[('readonly',True)],'bydate':[('readonly',True)]}),
'result_selection': fields.selection([('customer','Receivable Accounts'),
('supplier','Payable Accounts'),
('all','Receivable and Payable Accounts')],
'Partner', required=True),
'soldeinit': fields.boolean('Include initial balances'),
'reconcil': fields.boolean('Include Reconciled Entries'),
'page_split': fields.boolean('One Partner Per Page'),
'date1': fields.date('Start date', required=True),
'date2': fields.date('End date', required=True),
}
def _get_company(self, cr, uid, ids, context=None):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
if context is None:
context = {}
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
_defaults={
'state' : 'none',
'date1' : time.strftime('%Y-01-01'),
'date2' : time.strftime('%Y-%m-%d'),
'result_selection' : 'all',
'reconcile' : True,
'soldeinit' : True,
'page_split' : False,
'company_id' : _get_company,
'fiscalyear' : False,
}
def check_state(self, cr, uid, ids, context=None):
obj_fiscalyear = self.pool.get('account.fiscalyear')
obj_periods = self.pool.get('account.period')
if context is None:
context = {}
data={}
data['ids'] = context.get('active_ids',[])
data['form'] = self.read(cr, uid, ids, [])[0]
data['form']['fiscalyear'] = obj_fiscalyear.find(cr, uid)
data['form']['periods'] = obj_periods.search(cr, uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
data['form']['display_account']='bal_all'
data['model'] = 'ir.ui.menu'
acc_id = self.pool.get('account.invoice').search(cr, uid, [('state','=','open')])
if not acc_id:
raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
if data['form']['state'] == 'bydate' or data['form']['state'] == 'all':
data['form']['fiscalyear'] = False
else :
data['form']['fiscalyear'] = True
return self._check_date(cr, uid, data, context)
if data['form']['page_split']:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger',
'datas': data,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger_other',
'datas': data,
}
def _check_date(self, cr, uid, data, context=None):
if context is None:
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 """
cr.execute(sql,(data['form']['date1'],))
res = cr.dictfetchall()
if res:
if (data['form']['date2'] > res[0]['date_stop'] or data['form']['date2'] < res[0]['date_start']):
raise osv.except_osv(_('UserError'),_('Date to must be set between %s and %s') % (str(res[0]['date_start']), str(res[0]['date_stop'])))
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger',
'datas': data,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
account_partner_ledger()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_partner_ledger_view" model="ir.ui.view">
<field name="name">Select period</field>
<field name="model">account.partner.ledger</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id"/>
<field name="result_selection"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<group colspan = "4" >
<field name="reconcil"/>
<field name="page_split"/>
</group>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="action_account_partner_ledger" model="ir.actions.act_window">
<field name="name">Select Period</field>
<field name="res_model">account.partner.ledger</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_partner_ledger_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
<menuitem icon="STOCK_PRINT"
name="Partner Ledger"
action="action_account_partner_ledger"
id="menu_account_partner_ledger"
parent="account.next_id_22"/>
</data>
</openerp>

View File

@ -2,11 +2,6 @@
<openerp>
<data>
<menuitem
id="menu_tax_report"
name="Taxes"
parent="account.menu_finance_generic_reporting" sequence="3"/>
<record id="view_account_vat_declaration" model="ir.ui.view">
<field name="name">Account Vat Declaration</field>
<field name="model">account.vat.declaration</field>

View File

@ -1,145 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
import time
from tools.translate import _
period_form = '''<?xml version="1.0"?>
<form string="Select period">
<field name="company_id"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
</form>'''
period_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
'state':{
'string':"Date/Period Filter",
'type':'selection',
'selection':[('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],
'default': lambda *a:'none'
},
'fiscalyear': {
'string':'Fiscal year',
'type':'many2one',
'relation':'account.fiscalyear',
'help':'Keep empty for all open fiscal year'
},
'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty'},
'display_account':{'string':"Display accounts ",'type':'selection','selection':[('bal_mouvement','With movements'),('bal_all','All'),('bal_solde','With balance is not equal to 0')]},
'date_from': {'string':"Start date",'type':'date','required':True ,'default': lambda *a: time.strftime('%Y-01-01')},
'date_to': {'string':"End date",'type':'date','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
}
account_form = '''<?xml version="1.0"?>
<form string="Select parent account">
<field name="Account_list" colspan="4"/>
</form>'''
account_fields = {
'Account_list': {'string':'Account', 'type':'many2one', 'relation':'account.account', 'required':True ,'domain':[('parent_id','=',False)]},
}
class wizard_report(wizard.interface):
def _get_defaults(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
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
# periods_obj=pooler.get_pool(cr.dbname).get('account.period')
data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid)
# data['form']['periods'] = periods_obj.search(cr, uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
# data['form']['fiscalyear'] = False
data['form']['display_account'] = 'bal_all'
data['form']['context'] = context
return data['form']
def _check_state(self, cr, uid, data, context):
if data['form']['state'] == 'bydate':
self._check_date(cr, uid, data, context)
# data['form']['fiscalyear'] = 0
# else :
# data['form']['fiscalyear'] = 1
return data['form']
def _check_path(self, cr, uid, data, context):
if data['model'] == 'account.account':
return 'checktype'
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 """
cr.execute(sql,(data['form']['date_from'],))
res = cr.dictfetchall()
if res:
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
raise wizard.except_wizard(_('UserError'),_('Date to must be set between %s and %s') % (res[0]['date_start'], 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}
},
'account_selection': {
'actions': [],
'result': {'type':'form', 'arch':account_form,'fields':account_fields, 'state':[('end','Cancel','gtk-cancel'),('checktype','Next','gtk-go-forward')]}
},
'checktype': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report': {
'actions': [_check_state],
'result': {'type':'print', 'report':'account.account.balance', 'state':'end'}
}
}
wizard_report('account.account.balance.report')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,113 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import time
import datetime
import pooler
from mx.DateTime import *
from tools.translate import _
_aged_trial_form = """<?xml version="1.0"?>
<form string="Print Aged Trial Balance">
<field name="company_id"/>
<newline/>
<field name="date1"/>
<field name="period_length"/>
<newline/>
<field name="result_selection"/>
<newline/>
<field name="direction_selection"/>
</form>"""
_aged_trial_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
'period_length': {'string': 'Period length (days)', 'type': 'integer', 'required': True, 'default': lambda *a:30},
'date1': {'string':'Start of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
'result_selection':{
'string':"Filter on Partners",
'type':'selection',
'selection':[('customer','Receivable'),('supplier','Payable'),('all','Receivable and Payable')],
'required':True,
'default': lambda *a: 'all',
},
'direction_selection':{
'string':"Analysis Direction",
'type':'selection',
'selection':[('past','Past'),('future','Future')],
'required':True,
'default': lambda *a: 'past',
},
}
def _calc_dates(self, cr, uid, data, context):
res = {}
period_length = data['form']['period_length']
if period_length<=0:
raise wizard.except_wizard(_('UserError'), _('You must enter a period length that cannot be 0 or below !'))
start = datetime.date.fromtimestamp(time.mktime(time.strptime(data['form']['date1'],"%Y-%m-%d")))
start = DateTime(int(start.year),int(start.month),int(start.day))
if data['form']['direction_selection'] == 'past':
for i in range(5)[::-1]:
stop = start - RelativeDateTime(days=period_length)
res[str(i)] = {
'name' : str((5-(i+1))*period_length) + '-' + str((5-i)*period_length),
'stop': start.strftime('%Y-%m-%d'),
'start' : stop.strftime('%Y-%m-%d'),
}
start = stop - RelativeDateTime(days=1)
else:
for i in range(5):
stop = start + RelativeDateTime(days=period_length)
res[str(5-(i+1))] = {
'name' : str((i)*period_length)+'-'+str((i+1)*period_length),
'start': start.strftime('%Y-%m-%d'),
'stop' : stop.strftime('%Y-%m-%d'),
}
start = stop + RelativeDateTime(days=1)
return res
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)
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
return data['form']
states = {
'init': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':_aged_trial_form, 'fields':_aged_trial_fields, 'state':[('end','Cancel', 'gtk-cancel'),('print','Print', 'gtk-ok')]},
},
'print': {
'actions': [_calc_dates],
'result': {'type':'print', 'report':'account.aged_trial_balance', 'state':'end'},
},
}
wizard_report('account.aged.trial.balance')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,175 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import ir
import pooler
import time
import netsvc
from osv import fields, osv
import mx.DateTime
from mx.DateTime import RelativeDateTime
from tools import config
dates_form = '''<?xml version="1.0"?>
<form string="Customize Report">
<notebook tabpos="up">
<page string="Report Options">
<separator string="Select Fiscal Year(s)(Maximum Three Years)" colspan="4"/>
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
<field name="fiscalyear" colspan="5" nolabel="1"/>
<field name="landscape" colspan="4"/>
<field name="show_columns" colspan="4"/>
<field name="format_perc" colspan="4"/>
<field name="select_account" colspan="4"/>
<field name="account_choice" colspan="4"/>
<field name="compare_pattern" colspan="4"/>
</page>
<page string="Select Period">
<field name="period_manner" colspan="4"/>
<separator string="Select Period(s)" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>'''
dates_fields = {
'fiscalyear': {'string': 'Fiscal year', 'type': 'many2many', 'relation': 'account.fiscalyear'},
'select_account': {'string': 'Select Reference Account(for % comparision)', 'type': 'many2one', 'relation': 'account.account','help': 'Keep empty for comparision to its parent'},
'account_choice': {'string': 'Show Accounts', 'type': 'selection','selection':[('all','All accounts'),('bal_zero','With balance is not equal to 0'),('moves','With movements')]},
'show_columns': {'string': 'Show Debit/Credit Information', 'type': 'boolean'},
'landscape': {'string': 'Show Report in Landscape Form', 'type': 'boolean'},
'format_perc': {'string': 'Show Comparision in %', 'type': 'boolean'},
'compare_pattern':{'string':"Compare Selected Years In Terms Of",'type':'selection','selection':[('bal_cash','Cash'),('bal_perc','Percentage'),('none','Don'+ "'" +'t Compare')]},
'period_manner':{'string':"Entries Selection Based on",'type':'selection','selection':[('actual','Financial Period'),('created','Creation Date')]},
'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty'}
}
back_form='''<?xml version="1.0"?>
<form string="Notification">
<separator string="You might have done following mistakes. Please correct them and try again." colspan="4"/>
<separator string="1. You have selected more than 3 years in any case." colspan="4"/>
<separator string="2. You have not selected 'Percentage' option, but you have selected more than 2 years." colspan="4"/>
<label string="You can select maximum 3 years. Please check again." colspan="4"/>
<separator string="3. You have selected 'Percentage' option with more than 2 years, but you have not selected landscape format." colspan="4"/>
<label string="You have to select 'Landscape' option. Please Check it." colspan="4"/>
</form>'''
back_fields={
}
zero_form='''<?xml version="1.0"?>
<form string="Notification">
<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={
}
def _check(self, cr, uid, data, context):
if (len(data['form']['fiscalyear'][0][2])==0) or (len(data['form']['fiscalyear'][0][2])>1 and (data['form']['compare_pattern']!='none') and (data['form']['format_perc']==1) and (data['form']['show_columns']==1) and (data['form']['landscape']!=1)):
return 'zero_years'
if ((len(data['form']['fiscalyear'][0][2])==3) and (data['form']['format_perc']!=1) and (data['form']['show_columns']!=1)):
if data['form']['landscape']==1:
return 'report_landscape'
else:
return 'report'
if data['form']['format_perc']==1:
if len(data['form']['fiscalyear'][0][2])<=2:
if data['form']['landscape']==1:
return 'report_landscape'
else:
return 'report'
else:
if len(data['form']['fiscalyear'][0][2])==3:
if data['form']['landscape']==1:
return 'report_landscape'
else:
return 'backtoinit'
else:
return 'backtoinit'
else:
if len(data['form']['fiscalyear'][0][2])>2:
if data['form']['landscape']==1:
return 'report_landscape'
else:
return 'backtoinit'
else:
if data['form']['landscape']==1:
return 'report_landscape'
else:
return 'report'
class wizard_report(wizard.interface):
def _get_defaults(self, cr, uid, data, context={}):
data['form']['context'] = context
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
data['form']['fiscalyear']=[fiscalyear_obj.find(cr, uid)]
# p_ids=pooler.get_pool(cr.dbname).get('account.period').search(cr,uid,[('fiscalyear_id','=',fiscalyear_obj.find(cr, uid))])
# data['form']['periods']=p_ids
data['form']['compare_pattern']='none'
data['form']['account_choice']='moves'
data['form']['period_manner']='actual'
return data['form']
states = {
'init': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel', 'gtk-cancel'),('checkyear','Print', 'gtk-ok')]}
},
'backtoinit': {
'actions': [],
'result': {'type':'form','arch':back_form,'fields':back_fields,'state':[('end','Ok')]}
},
'zero_years': {
'actions': [],
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok')]}
},
'checkyear': {
'actions': [],
'result': {'type':'choice','next_state':_check}
},
'report_landscape': {
'actions': [],
'result': {'type':'print', 'report':'account.account.balance.landscape', 'state':'end'}
},
'report': {
'actions': [],
'result': {'type':'print', 'report':'account.balance.account.balance', 'state':'end'}
}
}
wizard_report('account.balance.account.balance.report')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,179 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
import locale
import time
from tools.translate import _
account_form = '''<?xml version="1.0"?>
<form string="Select Chart">
<field name="Account_list" colspan="4"/>
</form>'''
account_fields = {
'Account_list': {'string':'Chart of Accounts', 'type':'many2one', 'relation':'account.account', 'required':True ,'domain':[('parent_id','=',False)]},
}
period_form = '''<?xml version="1.0"?>
<form string="Select Date-Period">
<field name="company_id" colspan="4"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<field name="display_account" required="True"/>
<field name="sortbydate" required="True"/>
<field name="soldeinit" invisible="1"/>
<field name="landscape"/>
<field name="amount_currency"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
</form>'''
period_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
'state':{
'string':"Date/Period Filter",
'type':'selection',
'selection':[('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],
'default': lambda *a:'none'
},
'fiscalyear': {'string': 'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear',
'help': 'Keep empty for all open fiscal year'},
'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty'},
'sortbydate':{'string':"Sort by:",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Movement')]},
'display_account':{'string':"Display accounts ",'type':'selection','selection':[('bal_mouvement','With movements'),('bal_all','All'),('bal_solde','With balance is not equal to 0')]},
'landscape':{'string':"Landscape Mode",'type':'boolean'},
'soldeinit':{'string':"Include initial balances",'type':'boolean'},
'amount_currency':{'string':"With Currency",'type':'boolean'},
'date_from': {'string':" Start date",'type':'date','required':True ,'default': lambda *a: time.strftime('%Y-01-01')},
'date_to': {'string':"End date",'type':'date','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
}
def _check_path(self, cr, uid, data, context):
if data['model'] == 'account.account':
return 'checktype'
else:
return 'account_selection'
def _check(self, cr, uid, data, context):
if data['form']['landscape']==True:
return 'report_landscape'
else:
return 'report'
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 """
cr.execute(sql,(data['form']['date_from'],))
res = cr.dictfetchall()
if res:
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
raise wizard.except_wizard(_('UserError'),_('Date to must be set between %s and %s') % (str(res[0]['date_start']), str(res[0]['date_stop'])))
else:
return 'checkreport'
else:
raise wizard.except_wizard(_('UserError'),_('Date not in a defined fiscal year'))
def _check_state(self, cr, uid, data, context):
if data['form']['state'] == 'bydate':
_check_date(self, cr, uid, data, context)
# data['form']['fiscalyear'] = 0
# else :
#
# data['form']['fiscalyear'] = 1
return data['form']
class wizard_report(wizard.interface):
def _get_defaults(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
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid)
#periods_obj=pooler.get_pool(cr.dbname).get('account.period')
#data['form']['periods'] =periods_obj.search(cr, uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
data['form']['sortbydate'] = 'sort_date'
data['form']['display_account']='bal_all'
data['form']['landscape']=True
data['form']['fiscalyear'] = False
data['form']['amount_currency'] = True
data['form']['context'] = context
return data['form']
states = {
'init': {
'actions': [],
'result': {'type':'choice','next_state':_check_path}
},
'account_selection': {
'actions': [],
'result': {'type':'form', 'arch':account_form,'fields':account_fields, 'state':[('end','Cancel','gtk-cancel'),('checktype','Next','gtk-go-forward')]}
},
'checktype': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('checkreport','Print','gtk-print')]}
},
'checkreport': {
'actions': [],
'result': {'type':'choice','next_state':_check}
},
'report_landscape': {
'actions': [_check_state],
'result': {'type':'print', 'report':'account.general.ledger_landscape', 'state':'end'}
},
'report': {
'actions': [_check_state],
'result': {'type':'print', 'report':'account.general.ledger', 'state':'end'}
}
}
wizard_report('account.general.ledger.report')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,161 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import wizard
import pooler
from tools.translate import _
period_form = '''<?xml version="1.0"?>
<form string="Select Date-Period">
<field name="company_id"/>
<field name="result_selection"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<group colspan = "4" >
<field name="reconcil"/>
<field name="page_split"/>
</group>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
</form>'''
period_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
'state':{
'string':"Date/Period Filter",
'type':'selection',
'selection':[('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],
'default': lambda *a:'none'
},
'fiscalyear': {
'string':'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear',
'help': 'Keep empty for all open fiscal year',
'default': lambda *a:False,
},
'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty','states':{'none':[('readonly',True)],'bydate':[('readonly',True)]}},
'result_selection':{
'string':"Partner",
'type':'selection',
'selection':[('customer','Receivable Accounts'),('supplier','Payable Accounts'),('all','Receivable and Payable Accounts')],
'required':True
},
'soldeinit':{'string':"Include initial balances",'type':'boolean'},
'reconcil':{'string':" Include Reconciled Entries",'type':'boolean'},
'page_split':{'string':"One Partner Per Page",'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')},
}
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']['display_account']='bal_all'
data['form']['result_selection'] = 'all'
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
periods_obj=pooler.get_pool(cr.dbname).get('account.period')
data['form']['periods'] =periods_obj.search(cr, uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
data['form']['fiscalyear'] =False
data['form']['page_split'] = False
data['form']['reconcil'] = False
data['form']['soldeinit'] = True
return data['form']
def _check(self, cr, uid, data, context):
if data['form']['page_split']:
return 'report'
else:
return 'report_other'
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 """
cr.execute(sql,(data['form']['date1'],))
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 %s and %s') % (str(res[0]['date_start']) , str(res[0]['date_stop'])))
else:
return 'report'
else:
raise wizard.except_wizard(_('UserError'),_('Date not in a defined fiscal year'))
def _check_state(self, cr, uid, data, context):
if data['form']['state'] == 'bydate' or data['form']['state'] == 'all':
data['form']['fiscalyear'] = False
else :
data['form']['fiscalyear'] = True
self._check_date(cr, uid, data, context)
acc_id = pooler.get_pool(cr.dbname).get('account.invoice').search(cr, uid, [('state','=','open')])
if not acc_id:
raise wizard.except_wizard(_('No Data Available'), _('No records found for your selection!'))
return data['form']
states = {
'init': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('checkreport','Print','gtk-print')]}
},
'checkreport': {
'actions': [],
'result': {'type':'choice','next_state':_check}
},
'report': {
'actions': [_check_state],
'result': {'type':'print', 'report':'account.third_party_ledger', 'state':'end'}
},
'report_other': {
'actions': [_check_state],
'result': {'type':'print', 'report':'account.third_party_ledger_other', 'state':'end'}
}
}
wizard_report('account.third_party_ledger.report')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -7,13 +7,17 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-07 22:24+0000\n"
"Last-Translator: mitev.dmitry <Unknown>\n"
"PO-Revision-Date: 2009-02-03 06:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-03-30 04:07+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:11+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
@ -46,7 +50,7 @@ msgstr ""
#: field:payment.line,info_owner:0
#: view:payment.order:0
msgid "Owner Account"
msgstr "Majitel účtu"
msgstr ""
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
@ -65,17 +69,17 @@ msgstr ""
#. module: account_payment
#: field:payment.order,date_prefered:0
msgid "Preferred date"
msgstr "Preferované datum"
msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Free"
msgstr "Volný"
msgstr ""
#. module: account_payment
#: wizard_field:populate_payment,search,entries:0
msgid "Entries"
msgstr "Příspěvky"
msgstr ""
#. module: account_payment
#: wizard_field:populate_payment,init,duedate:0
@ -96,7 +100,7 @@ msgstr ""
#: rml:payment.order:0
#: view:payment.order:0
msgid "Amount"
msgstr "Částka"
msgstr ""
#. module: account_payment
#: rml:payment.order:0
@ -111,7 +115,7 @@ msgstr ""
#. module: account_payment
#: selection:payment.order,state:0
msgid "Cancelled"
msgstr "Zrušeno"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
@ -123,7 +127,7 @@ msgstr ""
#: rml:payment.order:0
#: field:payment.order,reference:0
msgid "Reference"
msgstr "Odkaz"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
@ -134,7 +138,7 @@ msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Directly"
msgstr "Přímo"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
@ -157,7 +161,7 @@ msgstr ""
#. module: account_payment
#: selection:payment.order,state:0
msgid "Confirmed"
msgstr "Potvrzeno"
msgstr ""
#. module: account_payment
#: help:payment.line,ml_date_created:0
@ -177,12 +181,12 @@ msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Structured"
msgstr "Strukturované"
msgstr ""
#. module: account_payment
#: field:payment.order,state:0
msgid "State"
msgstr "Stav"
msgstr ""
#. module: account_payment
#: view:payment.line:0
@ -223,17 +227,17 @@ msgstr ""
#. module: account_payment
#: field:payment.order,date_done:0
msgid "Execution date"
msgstr "Datum představení"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Fixed date"
msgstr "Pevné datum"
msgstr ""
#. module: account_payment
#: field:payment.line,info_partner:0
msgid "Destination Account"
msgstr "Protiúčet"
msgstr ""
#. module: account_payment
#: view:payment.line:0
@ -251,12 +255,12 @@ msgstr ""
#: wizard_button:populate_payment,search,end:0
#: wizard_button:populate_statement,init,end:0
msgid "_Cancel"
msgstr "Zrušit"
msgstr ""
#. module: account_payment
#: field:payment.line,create_date:0
msgid "Created"
msgstr "Vytvořeno"
msgstr ""
#. module: account_payment
#: view:payment.line:0
@ -281,12 +285,12 @@ msgstr ""
#. module: account_payment
#: field:payment.line,communication:0
msgid "Communication"
msgstr "Komunikace"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Due date"
msgstr "Termín dokončení"
msgstr ""
#. module: account_payment
#: field:account.invoice,amount_to_pay:0
@ -307,7 +311,7 @@ msgstr ""
#: view:payment.type:0
#: help:payment.type,name:0
msgid "Payment Type"
msgstr "Typ platby"
msgstr ""
#. module: account_payment
#: help:payment.line,amount_currency:0

View File

@ -63,13 +63,13 @@ class account_analytic_account(osv.osv):
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
@ -78,18 +78,18 @@ class account_analytic_account(osv.osv):
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency<0 and a.id =ANY(%s) GROUP BY a.id",(ids2,))
r = dict(cr.fetchall())
return self._compute_currency_for_level_tree(cr, uid, ids, ids2, r, acc_set, context)
def _debit_calc(self, cr, uid, ids, name, arg, context={}):
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
@ -98,48 +98,48 @@ class account_analytic_account(osv.osv):
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency>0 and a.id =ANY(%s) GROUP BY a.id" ,(ids2,))
r= dict(cr.fetchall())
return self._compute_currency_for_level_tree(cr, uid, ids, ids2, r, acc_set, context)
def _balance_calc(self, cr, uid, ids, name, arg, context={}):
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
if context.get('to_date',False):
where_date += " AND l.date <= '" + context['to_date'] + "'"
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE a.id =ANY(%s) GROUP BY a.id",(ids2,))
for account_id, sum in cr.fetchall():
res[account_id] = sum
return self._compute_currency_for_level_tree(cr, uid, ids, ids2, res, acc_set, context)
def _quantity_calc(self, cr, uid, ids, name, arg, context={}):
#XXX must convert into one uom
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
if context.get('to_date',False):
where_date += " AND l.date <= '" + context['to_date'] + "'"
cr.execute('SELECT a.id, COALESCE(SUM(l.unit_amount), 0) \
FROM account_analytic_account a \
LEFT JOIN account_analytic_line l ON (a.id = l.account_id ' + where_date + ') \
@ -182,7 +182,7 @@ class account_analytic_account(osv.osv):
def _get_account_currency(self, cr, uid, ids, field_name, arg, context={}):
result=self._get_company_currency(cr, uid, ids, field_name, arg, context={})
return result
_columns = {
'name' : fields.char('Account Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, method=True, type='char', string='Full Account Name'),
@ -192,10 +192,10 @@ class account_analytic_account(osv.osv):
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance'),
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit'),
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit'),
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity'),
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance',store=True),
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit',store=True),
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit',store=True),
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity',store=True),
'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'),
'partner_id' : fields.many2one('res.partner', 'Associated Partner'),
'contact_id' : fields.many2one('res.partner.address', 'Contact'),

View File

@ -7,19 +7,23 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-07 08:27+0000\n"
"Last-Translator: iTuxer <Unknown>\n"
"PO-Revision-Date: 2009-02-03 12:33+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-03-30 04:13+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:17+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
msgstr "Audit Trail"
msgstr ""
#. module: audittrail
#: constraint:ir.model:0
@ -32,22 +36,22 @@ msgstr ""
#. module: audittrail
#: field:audittrail.log.line,log_id:0
msgid "Log"
msgstr "Log"
msgstr ""
#. module: audittrail
#: selection:audittrail.rule,state:0
msgid "Subscribed"
msgstr "Iscritto"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value : "
msgstr "Valore precendente : "
msgstr ""
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Create"
msgstr "Crea"
msgstr ""
#. module: audittrail
#: wizard_view:audittrail.view.log,init:0
@ -67,7 +71,7 @@ msgstr ""
#. module: audittrail
#: field:audittrail.log.line,old_value:0
msgid "Old Value"
msgstr "Valore precedente"
msgstr ""
#. module: audittrail
#: constraint:ir.actions.act_window:0

View File

@ -14,7 +14,11 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:03+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact

View File

@ -1,283 +0,0 @@
# Persian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-08 14:27+0000\n"
"Last-Translator: Sadegh Ismael Nattaj <nat@sethack.com>\n"
"Language-Team: Persian <fa@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: 2010-04-17 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,city:0
#: wizard_field:base_setup.base_setup,init,city:0
#: wizard_field:base_setup.base_setup,update,city:0
msgid "City"
msgstr "شهر"
#. 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."
msgstr ""
"شما می‌توانید با بکارگیری از سوارسازی پیش‌فرض آغاز به پیکربندی سامانه کنید و "
"یا یک‌راست به دادگان متصل شوید."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,zip:0
#: wizard_field:base_setup.base_setup,init,zip:0
#: wizard_field:base_setup.base_setup,update,zip:0
msgid "Zip code"
msgstr "کد پستی"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "Select a Profile"
msgstr "یک پروفایل را برگزینید"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report header"
msgstr "سرنویس گزارش"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,config:0
msgid "Start Configuration"
msgstr "آغاز پیکربندی"
#. 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."
msgstr ""
"شما می‌توانید از طریق منوی راهبری پیمانه‌های بیشتری را در آینده برپاسازی "
"نمایید."
#. 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."
msgstr ""
"یک پروفایل دارای پیمانه‌های از پیش گزینش شده برای نیازهای خاص است. این "
"پروفایل‌ها برای این سوار می‌شوند تا به شما برای شناخت بیشتر جنبه‌های متفاوت "
"اپن ای‌آر‌پی کمک نماید. این تنها یک پیش‌نمایش است، ما بیش از ۳۰۰ پیمانه "
"آماده داریم."
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,update:0
#: wizard_button:base_setup.base_setup,init,company:0
msgid "Next"
msgstr "پس"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,email:0
#: wizard_field:base_setup.base_setup,init,email:0
#: wizard_field:base_setup.base_setup,update,email:0
msgid "E-mail"
msgstr "ایمیل"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,state_id:0
#: wizard_field:base_setup.base_setup,init,state_id:0
#: wizard_field:base_setup.base_setup,update,state_id:0
msgid "State"
msgstr "استان"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Your new database is now fully installed."
msgstr "دادگان نو شما بطور کامل برپاسازی گردید."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,profile:0
#: wizard_field:base_setup.base_setup,init,profile:0
#: wizard_field:base_setup.base_setup,update,profile:0
msgid "Profile"
msgstr "پروفایل"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer1:0
#: wizard_field:base_setup.base_setup,init,rml_footer1:0
#: wizard_field:base_setup.base_setup,update,rml_footer1:0
msgid "Report Footer 1"
msgstr "پانویس گزارش ۱"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer2:0
#: wizard_field:base_setup.base_setup,init,rml_footer2:0
#: wizard_field:base_setup.base_setup,update,rml_footer2:0
msgid "Report Footer 2"
msgstr "پانویس گزارش ۲"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "General Information"
msgstr "آگهگان عمومی"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street2:0
#: wizard_field:base_setup.base_setup,init,street2:0
#: wizard_field:base_setup.base_setup,update,street2:0
msgid "Street2"
msgstr "خیابان۲"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report Information"
msgstr "آگهگان گزارش"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,phone:0
#: wizard_field:base_setup.base_setup,init,phone:0
#: wizard_field:base_setup.base_setup,update,phone:0
msgid "Phone"
msgstr "تلفن"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Define Main Company"
msgstr "تعریف شرکت اصلی"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,name:0
#: wizard_field:base_setup.base_setup,init,name:0
#: wizard_field:base_setup.base_setup,update,name:0
msgid "Company Name"
msgstr "نام شرکت"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer2:0
#: help:base_setup.base_setup,init,rml_footer2:0
#: help:base_setup.base_setup,update,rml_footer2:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to put bank information here:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
msgstr ""
"این جمله در پایین گزارش‌های شما ظاهر خواهد شد.\n"
"پیشنهاد می‌کنیم آگهگان بانکی را اینجا وارد نمایید:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,country_id:0
#: wizard_field:base_setup.base_setup,init,country_id:0
#: wizard_field:base_setup.base_setup,update,country_id:0
msgid "Country"
msgstr "کشور"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
#: wizard_view:base_setup.base_setup,finish:0
#: wizard_view:base_setup.base_setup,init:0
#: wizard_view:base_setup.base_setup,update:0
#: model:ir.actions.wizard,name:base_setup.action_wizard_setup
#: model:ir.actions.wizard,name:base_setup.wizard_base_setup
msgid "Setup"
msgstr "سوارکردن"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer1:0
#: help:base_setup.base_setup,init,rml_footer1:0
#: help:base_setup.base_setup,update,rml_footer1:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to write legal sentences here:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
msgstr ""
"این جمله در پایین گزارش‌های شما ظاهر خواهد شد.\n"
"پیشنهاد می‌کنیم تا از عبارات قانونی در اینجا بکار ببرید:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
#. module: base_setup
#: wizard_view:base_setup.base_setup,update:0
msgid "Summary"
msgstr "چکیده"
#. module: base_setup
#: wizard_button:base_setup.base_setup,update,finish:0
msgid "Install"
msgstr "برپایی"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Installation Done"
msgstr "برپایی انجام شد"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_header1:0
#: help:base_setup.base_setup,init,rml_header1:0
#: help:base_setup.base_setup,update,rml_header1:0
msgid ""
"This sentence will appear at the top right corner of your reports.\n"
"We suggest you to put a slogan here:\n"
"\"Open Source Business Solutions\"."
msgstr ""
"این جمله در گوشه بالا سمت راست گزارش‌های شما ظاهر خواهد شد.\n"
"پیشنهاد می‌کنیم شعار خود را اینجا قرار دهید:\n"
"\"راهکارهای بازمتن برای تجارت\"."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_header1:0
#: wizard_field:base_setup.base_setup,init,rml_header1:0
#: wizard_field:base_setup.base_setup,update,rml_header1:0
msgid "Report Header"
msgstr "سرنویس گزارش"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Your Logo - Use a size of about 450x150 pixels."
msgstr "نشان شما - اندازه تصویری ۱۵۰×۴۵۰ پیکسل را بکار برید."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,currency:0
#: wizard_field:base_setup.base_setup,init,currency:0
#: wizard_field:base_setup.base_setup,update,currency:0
msgid "Currency"
msgstr "ارز"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street:0
#: wizard_field:base_setup.base_setup,init,street:0
#: wizard_field:base_setup.base_setup,update,street:0
msgid "Street"
msgstr "خیابان"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,menu:0
msgid "Use Directly"
msgstr "بکارگیری آنی"
#. module: base_setup
#: wizard_button:base_setup.base_setup,init,menu:0
msgid "Cancel"
msgstr "لغو"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,logo:0
#: wizard_field:base_setup.base_setup,init,logo:0
#: wizard_field:base_setup.base_setup,update,logo:0
msgid "Logo"
msgstr "نشان"
#. module: base_setup
#: model:ir.module.module,shortdesc:base_setup.module_meta_information
msgid "Base Setup"
msgstr "سوارکردن پایه"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,init:0
#: wizard_button:base_setup.base_setup,update,company:0
msgid "Previous"
msgstr "پیش"

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -38,9 +38,6 @@
'account',
'hr_timesheet_invoice',
'board',
'report_account',
'report_analytic',
'report_analytic_line',
'account_report'
],
'update_xml': ['board_account_view.xml'],

View File

@ -41,7 +41,7 @@
<child1>
<action colspan="4" height="160" name="%(report_analytic.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
<action colspan="4" height="160" name="%(hr_timesheet_invoice.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
<action colspan="4" height="160" name="%(act_my_account)d" string="Accounts to invoice" width="510"/>

View File

@ -6,40 +6,38 @@
-->
<record model="ir.ui.view" id="view_crm_lead_stage_graph1">
<field name="name">Leads By Stage - Graph</field>
<field name="model">report.crm.lead.section.stage</field>
<field name="model">crm.lead.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Leads By Stage" type="pie">
<field name="stage_id"/>
<field name="nbr" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_categ_graph">
<field name="name">report.crm.opportunity.categ.graph</field>
<field name="model">report.crm.opportunity.categ</field>
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Sections and Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<act_window name="Opportunities By Categories"
domain="[('state','!=','done'),('state','!=','cancel')]"
res_model="report.crm.opportunity.categ"
res_model="crm.opportunity.report"
view_type="form"
view_mode="graph,tree,form"
view_id="view_crm_opportunity_categ_graph"
id="act_oppor_categ"/>
<record model="ir.actions.act_window" id="act_leads_state">
<field name="res_model">report.crm.lead.section.stage</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
@ -48,7 +46,7 @@
<act_window name="Leads Of The Month By User"
domain="[('month','=',time.strftime('%%m')),('state','!=','cancel')]"
res_model="report.crm.lead.user"
res_model="crm.lead.report"
view_type="form"
view_mode="graph,tree,form"
view_id="view_crm_lead_stage_graph1"

View File

@ -0,0 +1,117 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="board.note.type" id="note_crm_type">
<field name="name">CRM Configuration</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
<field name="name">crm.opportunity.user.graph1</field>
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunities by User and Section" type="pie">
<field name="state"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="act_my_leads">
<field name="res_model">crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
<field name="res_model">crm.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<act_window name="My Cases"
domain="[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]"
res_model="crm.case"
view_type="form"
view_mode="tree,form"
id="act_my_cases"/>
<record model="ir.actions.act_window" id="act_my_leads_stage">
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
<field name="res_model">crm.opportunity.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.ui.view" id="board_crm_form">
<field name="name">CRM - Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Connecting Dashboard">
<hpaned>
<child1>
<action
name="%(act_my_leads)d"
colspan="4"
height="150"
width="510"/>
<action
string="My Meetings"
name="%(act_my_meetings)d"
height="150"
colspan="4"/>
<action
string="My Cases"
name="%(act_my_cases)d"
colspan="4"
height="200"/>
</child1>
<child2>
<action
string="My Leads By Stage"
name="%(act_my_leads_stage)d"
colspan="4"/>
<action
string="My Sales Pipeline"
name="%(act_sales_pipeline)d"
colspan="4"/>
</child2>
</hpaned>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_crm">
<field name="name">CRM Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
<menuitem
name="Connecting Dashboard" parent="menu_board_crm_config"
action="open_board_crm"
sequence="1"
id="menu_board_crm" icon="terp-graph"/>
</data>
</openerp>

View File

@ -1,123 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="board.note.type" id="note_crm_type">
<field name="name">CRM Configuration</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
<field name="name">crm.opportunity.user.graph1</field>
<field name="model">report.crm.opportunity.user</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunities by User and Section" type="pie">
<field name="state"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="act_my_leads">
<field name="res_model">crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
<field name="res_model">crm.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<act_window name="My Cases"
domain="[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]"
res_model="crm.case"
view_type="form"
view_mode="tree,form"
id="act_my_cases"/>
<record model="ir.actions.act_window" id="act_my_leads_stage">
<field name="res_model">report.crm.lead.section.stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
<field name="res_model">report.crm.opportunity.user</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.ui.view" id="board_crm_form">
<field name="name">CRM - Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Connecting Dashboard">
<hpaned>
<child1>
<action
string="My Leads"
name="%(act_my_leads)d"
colspan="4"
height="150"
width="510"/>
<action
string="My Meetings"
name="%(act_my_meetings)d"
height="150"
colspan="4"/>
<action
string="My Cases"
name="%(act_my_cases)d"
colspan="4"
height="200"/>
</child1>
<child2>
<action
string="My Leads By Stage"
name="%(act_my_leads_stage)d"
colspan="4"/>
<action
string="My Sales Pipeline"
name="%(act_sales_pipeline)d"
colspan="4"/>
</child2>
</hpaned>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_crm">
<field name="name">CRM Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
<menuitem
name="Connecting Dashboard" parent="menu_board_crm_config"
action="open_board_crm"
sequence="1"
id="menu_board_crm" icon="terp-graph"/>
</data>
</openerp>

View File

@ -32,7 +32,7 @@ This module implements a dashboard for human resource management that includes:
""",
'author': 'Tiny',
'depends': [ 'project_issue','board','hr_expense','hr_timesheet_sheet','hr_holidays'
],
, 'hr_evaluation'],
'update_xml': ['board_hr_view.xml'],
'demo_xml': [],
'installable': True,

View File

@ -15,25 +15,52 @@
<field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
</record>
<record id="act_hr_current_timesheet_sheet_form" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<record id="act_hr_evaluation_tree" model="ir.actions.act_window">
<field name="name">My Current Evaluations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="res_model">hr_evaluation.evaluation</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="domain">[('date_to','&gt;=',time.strftime('%Y-%m-01')),('date_from','&lt;=',time.strftime('%Y-%m-01'))]</field>
<field name="search_view_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_tree"/>
<field name="domain">[('state','!=','done'),('create_uid','=',uid)]</field>
<field name="search_view_id" ref="hr_evaluation.view_hr_evaluation_tree"/>
</record>
<record id="action_view_holiday_status_board" model="ir.actions.act_window">
<field name="name">My Leaves</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.per.user</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="hr_holidays.view_my_leave_board_tree"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="hr_holidays.open_allocation_holidays"/>
</record>
<record id="action_timesheet_report_all" model="ir.actions.act_window">
<field name="name">Timesheets by Month</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))]</field>
<field name="view_id" ref="hr_timesheet_sheet.view_timesheet_report_graph"/>
</record>
<record id="action_hr_holidays_remaining_leaves_user_all" model="ir.actions.act_window">
<field name="name">Remaining Leaves by User</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.remaining.leaves.user</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="hr_holidays.view_hr_holidays_remaining_leaves_user_graph"/>
</record>
<record id="action_hr_timesheet_sheet_graph" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_graph"/>
</record>
<record id="board_hr_form" model="ir.ui.view">
<field name="name">board.hr.form</field>
<field name="model">board.board</field>
@ -42,11 +69,13 @@
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(act_hr_current_timesheet_sheet_form)d" string="My current timesheet" width="510"/>
<action colspan="4" height="220" name="%(act_hr_evaluation_tree)d" string="My Current Evaluations" width="510"/>
<action colspan="4" height="220" name="%(action_view_holiday_status_board)d" string="My Leaves"/>
<action colspan="4" height="220" name="%(action_my_expense)d" string="My Expenses" />
</child1>
<child2>
<action colspan="4" height="220" name="%(action_view_holiday_status_board)d" string="My Leaves"/>
<action colspan="4" height="220" name="%(action_my_expense)d" string="My Expenses" />
<action colspan="4" height="220" name="%(action_hr_timesheet_sheet_graph)d" string="Timesheets by Month" />
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_user_all)d" string="Reamining Leaves by Type and User" />
</child2>
</hpaned>
</form>

View File

@ -34,16 +34,14 @@ This module implements a dashboard for project member that includes:
'author': 'Tiny',
'depends': [
'project',
'report_timesheet',
'board',
'project_planning',
'report_analytic_line',
'report_task',
'hr_timesheet_sheet',
'project_issue',
'resource'
'resource',
'scrum'
],
'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml'],
'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml','board_project_issue_view.xml','board_scrum_view.xml'],
'demo_xml': ['board_project_demo.xml'],
'installable': True,
'active': False,

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="action_view_current_project_issue_tree" model="ir.actions.act_window">
<field name="name">Project issues</field>
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('create_date', '&gt;=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '&lt;=', time.strftime('%Y-%m-%d 23:59:59'))]</field>
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
</record>
<record id="board_project_issue_form" model="ir.ui.view">
<field name="name">board.project.issue.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Issue Board">
<vpaned>
<child1>
<action colspan="4" height="220" name="%(action_view_current_project_issue_tree)d" string="Current Project Issues" width="510"/>
</child1>
<child2>
<action colspan="4" height="220" name="%(project.action_task_by_days_graph)d" string="Project Tasks By Days" width="510"/>
</child2>
</vpaned>
</form>
</field>
</record>
<record id="open_board_project_issue" model="ir.actions.act_window">
<field name="name">Project Issue Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_project_issue_form"/>
</record>
<menuitem
id="menu_deshboard_project_issue"
name="Project Issue Dashboard" parent="next_id_86"
icon="terp-graph" action="open_board_project_issue"/>
</data>
</openerp>

View File

@ -13,13 +13,13 @@
<act_window domain="[('user_id','=',uid),('state','&lt;&gt;','close')]" id="act_my_account" name="My accounts to invoice" res_model="account.analytic.account" view_id="view_account_analytic_simplified" view_mode="tree,form" view_type="form"/>
<record id="action_project_pipeline_user" model="ir.actions.act_window">
<field name="name">Pipeline of tasks</field>
<field name="res_model">report.task.user.pipeline.open</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','in',department_users_get())]</field>
</record>
<!-- <record id="action_project_pipeline_user" model="ir.actions.act_window">-->
<!-- <field name="name">Pipeline of tasks</field>-->
<!-- <field name="res_model">report.task.user.pipeline.open</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">graph,tree</field>-->
<!-- <field name="domain">[('user_id','in',department_users_get())]</field>-->
<!-- </record>-->
<record id="hr_timesheet_sheet_tree" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.tree.simplified.board</field>
@ -66,7 +66,6 @@
<action colspan="4" name="%(project_planning.action_account_analytic_planning_stat_form)d" string="My Project's planning" domain="[('manager_id','=',uid),('planning_id.state','&lt;&gt;','cancel')]"/>
<action colspan="4" name="%(action_project_pipeline_user)d" string="My user's pipeline"/>
</child2>
</hpaned>

View File

@ -47,6 +47,14 @@
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
<field name="view_id" ref="view_task_tree"/>
</record>
<record id="action_view_pending_task_tree" model="ir.actions.act_window">
<field name="name">My Pending Tasks</field>
<field name="res_model">project.task</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
<field name="view_id" ref="view_task_tree"/>
</record>
<record id="action_view_task_tree_deadline" model="ir.actions.act_window">
<field name="name">My Task's Deadlines</field>
<field name="res_model">project.task</field>
@ -91,13 +99,18 @@
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
<action colspan="4" name="%(project_issue.project_issue_categ_act0)d" string="Issues"/>
</child1>
<action colspan="4" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
<action colspan="4" name="%(action_view_pending_task_tree)d" string="My Pending Tasks" width="510"/>
</child1>
<child2>
<action colspan="4" height="150" name="%(action_view_project_member_tree)d" string="Project(s) Members"/>
<action colspan="4" name="%(action_view_project_editable_messages_tree)d" string="Messages"/>
<vpaned>
<child1>
<action colspan="4" name="%(project.action_project_vs_remaining_hours_graph)d" string="Remaining Hours Per Project" />
</child1>
<child2>
<action colspan="4" name="%(project.action_task_by_days_vs_planned_hours_graph)d" string="Planned Hours Per Day" />
</child2>
</vpaned>
</child2>
</hpaned>
</form>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_scrum_sprint_dashboard_tree" model="ir.ui.view">
<field name="name">scrum.sprint.dashboard.tree</field>
<field name="model">scrum.sprint</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Scrum Sprint">
<field name="name"/>
<field name="project_id"/>
<field name="scrum_master_id"/>
<field name="product_owner_id" invisible="1"/>
<field name="date_start"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
<field name="expected_hours" sum="Expected hours" widget="float_time"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
<button name="%(scrum.report_scrum_sprint_burndown_chart)d" states="open,draft,close,cancel"
string="Burndown Chart" type="action" icon="gtk-print"/>
</tree>
</field>
</record>
<record id="action_sprint_all_dashboard_tree" model="ir.actions.act_window">
<field name="name">Sprint's List</field>
<field name="res_model">scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_scrum_sprint_dashboard_tree"/>
</record>
<record id="board_project_scrum_form" model="ir.ui.view">
<field name="name">board.project.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(action_sprint_all_dashboard_tree)d" string="Sprints" width="510"/>
</child1>
</hpaned>
</form>
</field>
</record>
<record id="open_board_project_scrum" model="ir.actions.act_window">
<field name="name">Scrum Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_project_scrum_form"/>
</record>
<menuitem
id="menu_deshboard_scurm"
name="Scrum Dashboard" parent="next_id_86"
icon="terp-graph" action="open_board_project_scrum"/>
</data>
</openerp>

View File

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,39 +15,27 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
duplicate_form = '''<?xml version="1.0"?>
<form string="Duplicate account charts">
<field name="company_id"/>
</form>'''
duplicate_fields = {
'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company', 'required': True},
{
'name': 'Board for Purchase Management',
'version': '1.0',
'category': 'Board/Purchase',
'description': """
This module implements a dashboard for purcgase management that includes:
* Current Purchase Orders
* Draft Purchase Orders
* Graph for quantity and amount per month
""",
'author': 'Tiny',
'depends': [ 'purchase','board',
],
'update_xml': ['board_purchase_view.xml'],
'demo_xml': [],
'installable': True,
'active': False,
}
def _do_duplicate(self, cr, uid, data, context):
account_obj = pooler.get_pool(cr.dbname).get('account.account')
account_obj.copy(cr, uid, data['id'], data['form'], context=context)
return {}
class wizard_account_duplicate(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch': duplicate_form, 'fields': duplicate_fields, 'state': (('end', 'Cancel', 'gtk-cancel'), ('duplicate', 'Duplicate', 'gtk-ok'))},
},
'duplicate': {
'actions': [_do_duplicate],
'result': {'type': 'state', 'state': 'end'},
},
}
wizard_account_duplicate('account.wizard.account.duplicate')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
<menuitem
id="menu_purchase_deshboard"
name="Purchase"
parent="base.dashboard"/>
<record id="purchase_waiting" model="ir.actions.act_window">
<field name="name">Quotation Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]</field>
<field name="search_view_id" ref="purchase.purchase_order_tree"/>
</record>
<record id="board_purchase_form" model="ir.ui.view">
<field name="name">board.purchase.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(purchase.purchase_rfq)d" string="Draft Purchase Order" width="510"/>
<action colspan="4" height="220" name="%(purchase_waiting)d" string="Purchase Order in Waiting" width="510"/>
</child1>
<child2>
<action colspan="4" height="220" name="%(purchase.action_purchase_order_qty_amount_all)d" string="Total Qty and Amount by month" />
<action colspan="4" height="220" name="%(purchase.action_purchase_order_by_user_all)d" string="Total Orders by User per month" />
</child2>
</hpaned>
</form>
</field>
</record>
<record id="open_board_purchase" model="ir.actions.act_window">
<field name="name">Purchase Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_purchase_form"/>
</record>
<menuitem
action="open_board_purchase"
icon="terp-graph"
id="menu_board_purchase"
parent="menu_purchase_deshboard"
sequence="4"/>
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -5,39 +5,37 @@
<field name="name">Sales</field>
</record>
<record model="ir.actions.act_window" id="board_crm_case_categ_phone_incoming0">
<field name="res_model">crm.phonecall</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm.crm_case_phone_tree_view"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window" id="board_crm_case_categ_meet">
<field name="res_model">crm.meeting</field>
<field name="view_mode">tree,form,gantt</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="domain">[('date','&gt;=',time.strftime('%Y-%m-%d')),('date','&lt;=',(datetime.datetime.today() + datetime.timedelta(days=2)).strftime('%Y-%m-%d'))]</field>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<!-- <record model="ir.actions.act_window" id="board_crm_case_categ_phone_incoming0">
<field name="res_model">crm.phonecall</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm.crm_case_phone_tree_view"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window" id="board_crm_case_categ_meet">
<field name="res_model">crm.meeting</field>
<field name="view_mode">tree,form,gantt</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="domain">[('date','&gt;=',time.strftime('%Y-%m-%d')),('date','&lt;=',(datetime.datetime.today() + datetime.timedelta(days=2)).strftime('%Y-%m-%d'))]</field>
<field name="context" eval="{'default_state':'open'}"/>
</record>-->
<record id="board_sales_manager_form" model="ir.ui.view">
<field name="name">board.sales.manager.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales manager board">
<form string="Sales Manager board">
<hpaned position="100">
<child1>
<action colspan="4" height="200" name="%(sale.action_order_tree5)d" string="My quotations" width="510" domain="[('state','=','draft'),('user_id','=',uid)]"/>
<action colspan="4" name="%(board_crm_case_categ_phone_incoming0)d" string="My planned calling calls (IN / OUT)" width="510"/>
<action name="%(sale.action_suninvoiced_lines_per_month)d" string="Uninvoiced lines" />
<action name="%(sale.action_product_bought_by_sale_order)d" string="Product bought base on Sale Orders" />
</child1>
<child2>
<action colspan="4" name="%(crm.crm_case_category_act_oppor11)d" string="My Opportunities" width="510" domain="[('user_id','=',uid)]"/>
<action colspan="4" name="%(board_crm_case_categ_meet)d" String="My Meetings" domain="[('state','=','open')]" width="510"/>
<action name="%(sale.action_sale_order_by_clients)d" string="Sale order by client" />
<action name="%(sale.action_sales_by_regions)d" string="Sales by regions" />
</child2>
</hpaned>
</form>

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