Browse Source

[ADD] partner ledger wizard

pull/196/head
Damien Crier 9 years ago
committed by Leonardo Pistone
parent
commit
aeedeea350
  1. 11
      account_financial_report_qweb/wizard/ledger_report_wizard.py
  2. 51
      account_financial_report_qweb/wizard/ledger_report_wizard_view.xml

11
account_financial_report_qweb/wizard/ledger_report_wizard.py

@ -27,6 +27,17 @@ class LedgerReportWizard(models.TransientModel):
default=False)
centralize = fields.Boolean(string='Activate centralization',
default=False)
result_selection = fields.Selection(
[('customer', 'Receivable Accounts'),
('supplier', 'Payable Accounts'),
('customer_supplier', 'Receivable and Payable Accounts')
],
string="Partner's",
default='customer')
partner_ids = fields.Many2many(
comodel_name='res.partner',
string='Filter partners',
)
@api.multi
def check_report(self):

51
account_financial_report_qweb/wizard/ledger_report_wizard_view.xml

@ -2,6 +2,7 @@
<openerp>
<data>
<!-- GENERAL LEDGER -->
<record id="ledger_report_wizard_view_form" model="ir.ui.view">
<field name="name">Ledger</field>
<field name="model">ledger.report.wizard</field>
@ -46,9 +47,53 @@
parent="account.menu_finance_legal_statement"
action="action_ledger_report_wizard"
id="menu_ledger_report_wizard"/>
<!-- <menuitem name="Actions" id="menu_crm_action" parent="base.menu_sales" sequence="5"
action="action_crm_action_view"
groups="group_crm_action_user,group_crm_action_manager"/> -->
<!-- PARTNER LEDGER -->
<record id="partner_ledger_report_wizard_view_form" model="ir.ui.view">
<field name="name">Partner Ledger</field>
<field name="model">ledger.report.wizard</field>
<field name="arch" type="xml">
<form>
<group name="main_info">
<field name="company_id"/>
</group>
<group name="">
<group name="date_ranger">
<!-- <field name="date_range"/> -->
<field name="date_from"/>
<field name="date_to"/>
</group>
<group name="extra_info">
<field name="amount_currency"/>
<field name="result_selection"/>
</group>
</group>
<label for="partner_ids"/>
<field name="partner_ids" nolabel="1"/>
<footer>
<button name="check_report" string="Print" type="object" default_focus="1" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<record id="action_partner_ledger_report_wizard" model="ir.actions.act_window">
<field name="name">Partner Ledger</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ledger.report.wizard</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="partner_ledger_report_wizard_view_form"/>
<field name="target">new</field>
</record>
<menuitem
parent="account.menu_finance_legal_statement"
action="action_partner_ledger_report_wizard"
id="menu_partner_ledger_report_wizard"/>
</data>

Loading…
Cancel
Save