diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index ac117c2b318..f0fa4862f55 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -166,16 +166,12 @@ class res_partner(osv.osv): 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 context: - for l in context: - print l, context[l] - if view_type == 'form' and context and 'search_default_todo' in context.keys(): + if view_type == 'form' and context and 'Followupfirst' in context.keys() and context['Followupfirst'] == True: doc = etree.XML(res['arch'], parser=None, base_url=None) - first_node = doc.xpath("//page[@string='Payments Follow-up']") - first_node[0].set("position", "left") - first_node[0].getparent().append(first_node[0]) - root = first_node[0].getparent() - root[0]= root[-1] + first_node = doc.xpath("//page[@string='Payments Follow-up']") + #first_node[0].getparent().append(first_node[0]) + root = first_node[0].getparent() + root.insert(0, first_node[0]) res['arch'] = etree.tostring(doc) return res @@ -454,7 +450,7 @@ class res_partner(osv.osv): store={'account.move.line': (_get_aml_storeids, ['followup_line_id', 'followup_date'], 10)}), 'payment_amount_overdue':fields.function(_get_amount_overdue, method=True, type='float', string="Amount Overdue", help="Amount Overdue: The amount the customer owns us", - store={'account.move.line': (_get_aml_storeids2, ['followup_line_id', 'followup_date', 'debit', 'credit', 'invoice'], 10)}, + store=True, #{'account.move.line': (_get_aml_storeids2, ['followup_line_id', 'followup_date', 'debit', 'credit', 'invoice'], 10)}, ), } diff --git a/addons/account_followup/account_followup_customers.xml b/addons/account_followup/account_followup_customers.xml index d44ccebc7c6..25a5fdb6054 100644 --- a/addons/account_followup/account_followup_customers.xml +++ b/addons/account_followup/account_followup_customers.xml @@ -99,8 +99,9 @@ res.partner form tree,form + {} - {'search_default_todo': True, 'search_default_credits': True} + {'Followupfirst':True, 'search_default_todo': True, 'search_default_credits': True} @@ -146,20 +147,21 @@

- By clicking on the light bulb, you can put an invoice as litigation. This means you are still in discussion about it and it + Here is the history of the transactions of this customer. By clicking on the light bulb, you can put an invoice as litigation. This means you are still in discussion about it and it won't be taken into account for going to the next follow-up level.

- - + - --> - + + + -
+ @@ -201,10 +204,7 @@ form - {'Followupfirst':True} - - diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml index da7ea67e4f1..54d0061ea73 100644 --- a/addons/account_followup/account_followup_view.xml +++ b/addons/account_followup/account_followup_view.xml @@ -87,14 +87,14 @@

Follow-up

- To remind our customers to pay their invoices when they are overdue, - we define different levels of severity for paying the invoices. - Every level defines actions that need to be taken after a certain amount of days after the due date of an invoice + To remind our customers of paying their invoices, + we define different actions depending on how severely overdue the customer is. These actions are bundled + into folow-up levels that are triggered when the due date of the most overdue invoice has passed a + certain amount of days.

- - When the wizard for processing the follow-ups is run, for every partner the most overdue invoice (without litigation) is checked. + When the wizard for procesing the follow-ups is run, for every partner the most overdue invoice (without litigation) is checked. If the amount of days overdue is greater or equal than the amount of days specified and the actions of the previous follow-up level were done, then the actions checked for the new follow-up level will be executed. @@ -203,16 +203,6 @@ - + \ No newline at end of file