odoo/addons/account_followup/account_followup_customers.xml

222 lines
12 KiB
XML
Raw Normal View History

<openerp>
<data>
<!-- followup of customers views
-->
<record id="customer_followup_tree" model="ir.ui.view">
<field name="name">ddd</field>
<field name="model">res.partner</field>
<!--<field name="type">tree</field>-->
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<tree string="Customer Followup">
<field name="name"/>
<!--<field name="latest_followup_level_id"/>
<field name="latest_followup_date"/>-->
<field name="payment_next_action_date"/>
<field name="payment_next_action"/>
<!--Fields needed by inherited search view-->
<field name="user_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<!--<field name="payment_note"/>
<field name="phone"/>-->
<field name="credit"/>
<field name="payment_responsible_id"/>
<!--<field name="email"/>-->
<field name="latest_followup_level_id"/>
<field name="latest_followup_date"/>
</tree>
</field>
</record>
<record id="customer_followup_search_view" model="ir.ui.view">
<field name="name">Search</field>
<field name="model">res.partner</field>
<field name="type">search</field>
<field name="inherits_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<search string="Search Partner" position="inside">
<field name="payment_next_action"/>
<!--<filter string="Actions to be taken with overdue amount" domain="['&amp;', ('payment_amount_outstanding', '>', 0.0), ('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d'))]"/>
<separator/>-->
<group string="Follow-up">
<filter string="Partners with Credits" domain="[('credit', '>', 0.0)]" name="credits"/>
<separator/>
<filter string="Follow-ups to do" domain="[('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d'))]" name="todo"/>
<separator/>
<!--<filter string="Future follow-ups" domain="['&', ('payment_next_action', '!=', ''), ('payment_next_action_date', '>', time.strftime('%%Y-%%m-%%d'))]"/>-->
<separator/>
<filter string="No Responsible" domain="[('payment_responsible_id', '=', False)]"/>
<filter string="My Follow-ups" domain="[('payment_responsible_id','=', uid)]"/>
</group>
<group expand="1" string="Group By...">
<filter string="Responsible" context="{'group_by':'payment_responsible_id'}"/>
</group>
</search>
</field>
</record>
<record id="customer_followup_search_view2" model="ir.ui.view">
<field name="name">Search</field>
<field name="model">res.partner</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search view">
<field name="name"/>
<field name="payment_next_action"/>
<!--<filter string="Actions to be taken with overdue amount" domain="['&amp;', ('payment_amount_outstanding', '>', 0.0), ('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d'))]"/>
<separator/>-->
<filter string="Overdue amount" domain="[('credit', '>', 0.0)]"/>
<separator/>
<filter string="Follow-ups to do" domain="[('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d'))]"/>
<separator/>
<!--filter string="Future follow-ups" domain="['&', ('payment_next_action', '!=', ''), ('payment_next_action_date', '>', time.strftime('%%Y-%%m-%%d'))]"/>-->
<separator/>
<filter string="Without responsible" domain="[('payment_responsible_id', '=', False)]"/>
<filter string="I am responsible" domain="[('payment_responsible_id','=', uid)]"/>
<group expand="1" string="Group by">
<filter string="Responsible" context="{'group_by':'payment_responsible_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_customer_followup" model="ir.actions.act_window">
<field name="name">Customer Follow Up</field>
<field name="view_id" ref="customer_followup_tree"/>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{} </field>
<!--<field name="domain">[('credit', '>', 0)]</field>--> <!--('customer', '=', True), ('latest_followup_date','!=', False)-->
<field name="context">{'Followupfirst':True, 'search_default_todo': True, 'search_default_credits': True} </field>
<field name="search_view_id" ref="customer_followup_search_view"/>
</record>
<!--Inherited view -->
<record id="view_partner_inherit_followup_form" model="ir.ui.view">
<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" >
<div name="buttons" position="inside">
<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', '&lt;=', 0.0)]}" />
<button name="do_button_mail" type="object" string="Send Overdue Email" groups="account.group_account_user" help="If not specified by the latest follow-up level, it will send from the default follow-up of overdue invoices template" attrs="{'invisible':[('credit', '&lt;=', 0.0)]}"/>
</div>
<page string="Accounting" position="before" version="7.0">
<page string="Payments Follow-up" position="inside" groups="account.group_account_invoice">
<div class = "oe_inline">
<p attrs="{'invisible':[('latest_followup_date','=', False)]}" class="oe_inline">The <field name="latest_followup_date" />, the latest level that was executed, was <field name="latest_followup_level_id" class="oe_inline"/>.
</p>
<!--<p class="oe_inline" attrs="{'invisible':[('credit', '&lt;=', 0.0)]}">The partner owns us <field name="credit" class="oe_inline"/>
</p>-->
<!--<p attrs="{'invisible':[('payment_next_action', '=', False)]}">This is the action required now:</p>-->
</div>
<p class="oe_inline">
<label for="payment_next_action" string="Next Follow-up Action"/>
<field name="payment_next_action_date" nolabel="1" class="oe_inline"/> <label string="-" attrs="{'invisible': ['|', ('payment_next_action_date', '=', False), ('payment_next_action', '=', False)]}"/>
<field name="payment_next_action" class="oe_inline" nolabel="1" string="Next Follow-up action" placeholder="e.g. Give a phonecall, Check if he paid, ..."/>
<span attrs="{'invisible':[('payment_responsible_id', '=', False)]}"> to be done by: </span> <field name="payment_responsible_id" placeholder="The user responsible for taking this action e.g. sales" class="oe_inline"/>
<span attrs="{'invisible':['|', ('payment_next_action_date', '!=', False), '|', ('payment_responsible_id', '!=', False), ('payment_next_action', '!=', False)]}">No action defined right now. </span>
<br/>
<button name="action_done" type="object" string="&#8627; Mark as Done"
help="This button will clear the action, the action date and the responsible. " class="oe_link"
attrs="{'invisible':['&amp;',('payment_next_action_date','=', False), '&amp;', ('payment_responsible_id','=', False), ('payment_next_action', '=', False)]}"
groups="res_security.group_partner_manager, account.group_account_user"/>
</p>
<!--attrs="{'invisible':['&amp;',('payment_next_action_date','=', False), '&amp;', ('payment_responsible_id','=', False), ('payment_next_action', '=', False)]}"-->
<group>
<field name="payment_note" string="The customer promised:"/>
</group>
<p class="oe_grey"> <!--maybe only when accountmovelines empty-->
Here is the history of the transactions of this customer. By clicking on the check box, you can put an invoice as litigation. This means you are still in discussion about it and it
will not be taken into account by the wizard.
</p>
<group>
<field name="accountmoveline_ids" nolabel="1" > <!--ontext="{'default_partner_id': active_id}" mode="kanban"-->
<tree string="Account Move line" editable="bottom" create="false" delete="false" colors="red:date_maturity and date_maturity&lt;current_date or date&lt;current_date">
<field name="date" readonly="True"/>
<field name="move_id" readonly="True"/>
<field name="blocked" string="Litigation"/>
<field name="date_maturity" readonly="True"/>
<field name="reconcile_partial_id" readonly="True"/>
<field name="result" readonly="True"/>
<field name="followup_line_id" invisible='1'/>
</tree>
<!-- <kanban default_group_by="followup_line_id" create="false">
<field name="followup_line_id"/>
<field name="result"/>
<field name="date_maturity"/>
<field name="blocked"/>
<field name="partner_id"/>
<field name="ref"/>
<field name="invoice"/>
<templates>
<t t-name="kanban-box">-->
<!--<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>-->
<!--<div class="oe_module_vignette oe_semantic_html_override">
<h4><a type="open"><field name="ref"/></a></h4>
<a type="open"><field name="invoice"/></a>
<i><div t-if="record.result.raw_value">
<field name="result"/></div></i>
<div><a t-if="record.date_maturity.raw_value" title="Date">
<field name="date_maturity"/>
</a></div>
<a t-if="record.blocked.raw_value === true" type="object" string="Lit." name="set_kanban_state_litigation" class="oe_kanban_status oe_kanban_status_red"> </a>
<a t-if="record.blocked.raw_value === false" type="object" string="Lit." name="set_kanban_state_litigation" class="oe_kanban_status oe_kanban_status_green"></a>
</div>
</t>
</templates>
</kanban>-->
</field>
</group>
<p align="right"><B>Total amount: <field name="payment_amount_due" class="oe_inline"/> </B></p>
</page>
</page>
</field>
</record>
<record id="action_view_customer_followup_form" model="ir.actions.act_window.view">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_partner_inherit_followup_form"/>
<field name="act_window_id" ref="action_customer_followup"/>
</record>
<record id="action_view_customer_followup_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="customer_followup_tree"/>
<field name="act_window_id" ref="action_customer_followup"/>
</record>
<!-- Menus about followup of customers -->
<menuitem id="account_followup_s" action="action_customer_followup" parent="menu_finance_followup" name="Customers Requiring Action" sequence="3"/>
</data>
</openerp>