[MERGE][IMP] account_followup: direct link to followups on the Accounting config page
bzr revid: rim@openerp.com-20140422110432-t9jcxt13u1t00qxh
This commit is contained in:
commit
da09f830eb
|
@ -29,7 +29,7 @@ Module to automate letters for unpaid invoices, with multi-level recalls.
|
|||
|
||||
You can define your multiple levels of recall through the menu:
|
||||
---------------------------------------------------------------
|
||||
Configuration / Follow-Up Levels
|
||||
Configuration / Follow-up / Follow-up Levels
|
||||
|
||||
Once it is defined, you can automatically print recalls every day through simply clicking on the menu:
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
@ -55,6 +55,7 @@ Note that if you want to check the follow-up level for a given partner/account e
|
|||
'account_followup_view.xml',
|
||||
'account_followup_customers.xml',
|
||||
'wizard/account_followup_print_view.xml',
|
||||
'res_config_view.xml',
|
||||
'views/report_followup.xml',
|
||||
'account_followup_reports.xml'
|
||||
],
|
||||
|
|
|
@ -30,7 +30,7 @@ class followup(osv.osv):
|
|||
_columns = {
|
||||
'followup_line': fields.one2many('account_followup.followup.line', 'followup_id', 'Follow-up'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'name': fields.related('company_id', 'name', string = "Name"),
|
||||
'name': fields.related('company_id', 'name', string = "Name", readonly=True, type="char"),
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
|
||||
|
@ -479,4 +479,20 @@ class res_partner(osv.osv):
|
|||
fnct_search=_payment_earliest_date_search),
|
||||
}
|
||||
|
||||
|
||||
class account_config_settings(osv.TransientModel):
|
||||
_name = 'account.config.settings'
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
def open_followup_level_form(self, cr, uid, ids, context=None):
|
||||
res_ids = self.pool.get('account_followup.followup').search(cr, uid, [], context=context)
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'Payment Follow-ups',
|
||||
'res_model': 'account_followup.followup',
|
||||
'res_id': res_ids and res_ids[0] or False,
|
||||
'view_mode': 'form,tree',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -71,7 +71,9 @@
|
|||
<field name="model">account_followup.followup</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Follow-up" version="7.0">
|
||||
<h1><field name="company_id" widget="selection" class="oe_inline"/></h1>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" widget="selection" class="oe_inline" groups="base.group_multi_company"/>
|
||||
<p class="oe_grey">
|
||||
To remind customers of paying their invoices, you can
|
||||
define different actions depending on how severely
|
||||
|
@ -113,6 +115,7 @@
|
|||
<field name="res_model">account_followup.followup</field>
|
||||
<field name="search_view_id" ref="view_account_followup_filter"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define follow-up levels and their related actions.
|
||||
|
@ -130,8 +133,11 @@
|
|||
parent="menu_finance_followup"
|
||||
sequence="0"
|
||||
id="menu_manual_reconcile_followup"/>
|
||||
|
||||
<menuitem id="account_followup_main_menu" parent="account.menu_finance_configuration" name="Follow-up"/>
|
||||
|
||||
<menuitem action="action_account_followup_definition_form" id="account_followup_menu" parent="account.menu_finance_configuration" name="Follow-up Levels"/>
|
||||
|
||||
<menuitem action="action_account_followup_definition_form" id="account_followup_menu" parent="account_followup_main_menu" name="Follow-up Levels"/>
|
||||
|
||||
<record id="account_move_line_partner_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.partner.tree</field>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_config_settings_inherit" model="ir.ui.view">
|
||||
<field name="name">account settings</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='module_account_followup']" position="after">
|
||||
<button type="object" name="open_followup_level_form" string="Configure your follow-up levels" class="oe_link"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue