[FIX] followup
bzr revid: fp@openerp.com-20121201113637-c3cr6yrkjxow6qds
This commit is contained in:
parent
0a933f44e5
commit
cada27b307
|
@ -128,12 +128,13 @@ class res_partner(osv.osv):
|
|||
def fields_view_get(self, cr, uid, view_id=None, view_type=None, context=None, toolbar=False, submenu=False):
|
||||
res = super(res_partner, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context,
|
||||
toolbar=toolbar, submenu=submenu)
|
||||
if view_type == 'form' and context and 'Followupfirst' in context.keys() and context['Followupfirst'] == True:
|
||||
context = context or {}
|
||||
if view_type == 'form' and context.get('Followupfirst'):
|
||||
doc = etree.XML(res['arch'], parser=None, base_url=None)
|
||||
first_node = doc.xpath("//page[@string='Payment Follow-up']")
|
||||
first_node = doc.xpath("//page[@name='followup_tab']")
|
||||
root = first_node[0].getparent()
|
||||
root.insert(0, first_node[0])
|
||||
res['arch'] = etree.tostring(doc)
|
||||
res['arch'] = etree.tostring(doc, encoding="utf-8")
|
||||
return res
|
||||
|
||||
def _get_latest(self, cr, uid, ids, names, arg, context=None, company_id=None):
|
||||
|
|
|
@ -83,10 +83,9 @@
|
|||
<field name="name">res.partner.followup.form.inherit</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="model">res.partner</field>
|
||||
<!--<field eval="[(4, ref('account.group_account_user'))]" name="groups_id"/>--><!-- or user? -->
|
||||
<field name="arch" type="xml" >
|
||||
<page string="Accounting" position="before" version="7.0">
|
||||
<page string="Payment Follow-up" position="inside" groups="account.group_account_invoice">
|
||||
<page string="Payment Follow-up" groups="account.group_account_invoice" name="followup_tab">
|
||||
<div class="oe_right oe_button_box" name="followup_button">
|
||||
<button name="do_button_print" type="object" string="Print Overdue Payments" groups="account.group_account_user"
|
||||
help="Print overdue payments report independent of follow-up line" attrs="{'invisible':[('credit', '<=', 0.0)]}" />
|
||||
|
@ -99,7 +98,6 @@
|
|||
</p>
|
||||
<group>
|
||||
<field name="payment_responsible_id" placeholder="Responsible of credit collection" class="oe_inline"/>
|
||||
|
||||
<label for="payment_next_action"/>
|
||||
<div>
|
||||
<field name="payment_next_action_date" class="oe_inline"/>
|
||||
|
@ -112,7 +110,7 @@
|
|||
</group>
|
||||
<label for="payment_note" class="oe_edit_only"/>
|
||||
<field name="payment_note" placeholder="e.g. 50%% before 15th of May, balance before 1st of July."/>
|
||||
<p class="oe_grey"> <!--maybe only when accountmovelines empty-->
|
||||
<p class="oe_grey">
|
||||
Below is the history of the transactions of this
|
||||
customer. You can set an invoice in litigation in
|
||||
order to not include it in the next payment
|
||||
|
|
Loading…
Reference in New Issue