<field name="name">eee</field>
<field name="model">res.partner</field>
<field name="type">form</field>
+ <field name="priority" eval="20"/>
<field name="arch" type="xml">
- <form string="Customer FollowUp form">
- <field name="name"/>
- <field name="phone"/>
- <separator name="Detail of accounts"/>
- <field name="aml_ids"/>
- <separator name="Payment Followup Remarks"/>
- <field name="payment_responsible_id"/>
- <field name="payment_note"/>
- <field name="payment_followup_level_id"/>
- <field name="payment_new_action"/>
-
+ <form string="Customer FollowUp form" version="7.0">
+ <group>
+ <field name="name"/>
+ <field name="phone" />
+ <!--<field name="sales" readonly="True"/>-->
+ </group>
-
-
+ <separator string="Detail of accounts" />
+ <group>
+ <field name="accountmoveline_ids" nolabel="1" > <!--domain="[('reconcile_id', '=', False)]" not necessary-->
+ <tree string="Account Move line" editable="bottom">
+ <field name="date" readonly="True"/>
+ <field name="move_id" readonly="True"/>
+ <field name="ref" readonly="True"/>
+ <field name="debit" readonly="True"/>
+ <field name="credit" readonly="True"/>
+ <field name="followup_date" readonly="True"/>
+ <field name="followup_line_id" readonly="True"/>
+ <field name="blocked" string="Litigation"/>
+ <field name="payment_commitment"/>
+ <field name="payment_date"/>
+ <!--<field name="reconcile_id" invisible="True"/>-->
+ <field name="reconcile_partial_id" readonly="True"/>
+ <field name="invoice"/>
+ </tree>
+ </field>
+ </group>
+ <newline/>
+ <group>
+ <separator string="Actions to be taken"/>
+ <newline/>
+ <group>
+ <field name="payment_next_action" help="Describes agreement with the client"/>
+
+ <button name="action_done" type="object" string="Follow-up Action Done" class="oe_highlight" help="This button will clear the action and the action date. "/>
+ </group>
+ <group>
+ <field name="payment_responsible_id" help="The user who takes responsibility to follow it up. "/>
+ <field name="payment_next_action_date" help="This is when further follow-up is needed. The date will have been set to the currrent date when processing the follow-ups asks for a phone call"/>
+ </group>
+ </group>
+ <separator string="Payment Followup Remarks"/>
+ <newline/>
+ <group>
+
+ <field name="payment_note"/>
+
+ <!--<field name="payment_followup_level_id"/>-->
+ <field name="latest_followup_level_id"/>
+ <field name="latest_followup_date"/>
+ <field name="next_followup_level_id"/>
+
+ </group>
</form>
</field>
</record>
<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="type">tree</field>-->
+ <field name="priority" eval="20"/>
<field name="arch" type="xml">
<tree string="Customer Followup">
- <field name="name"/>
- <field name="payment_note"/>
- <field name="payment_new_action"/>
- <field name="email"/>
- <field name="phone"/>
-
- <!-- <field name="latest_followup_date"/>-->
+ <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"/>
+ <!--<field name="payment_note"/>
+ <field name="phone"/>-->
+ <field name="payment_amount_outstanding"/>
+ <field name="payment_responsible_id"/>
+ <!--<field name="email"/>-->
+ <field name="next_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="arch" type="xml">
+ <search string="Search view">
+
+ <!--<filter string="Actions to be taken with overdue amount" domain="['&', ('payment_amount_outstanding', '>', 0.0), ('payment_next_action_date', '<=', time.strftime('%%Y-%%m-%%d'))]"/>
+ <separator/>-->
+ <filter string="Overdue amount outstanding" domain="[('payment_amount_outstanding', '>', 0.0)]"/>
+ <separator/>
+ <filter string="Action to be taken now" domain="[('payment_next_action_date', '<=', time.strftime('%%Y-%%m-%%d'))]"/>
+ <separator/>
+ <filter string="Action to be taken" domain="[('payment_next_action', '!=', '')]"/>
+ <filter string="Follow-up sent" domain="[('latest_followup_level_id', '!=', False)]"/>
+ <separator/>
+ <filter string="Without responsible" domain="[('payment_responsible_id', '=', False)]"/>
+ <filter string="I am responsible" domain="[('payment_responsible_id','=', uid)]"/>
+
+ </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">tree</field>
-
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="domain">[]</field> <!--('customer', '=', True), ('latest_followup_date','!=', False)-->
+ <field name="search_view_id" ref="customer_followup_search_view"/>
</record>
<field name="view_id" ref="customer_followup_tree"/>
<field name="act_window_id" ref="action_customer_followup"/>
</record>
+
+
+ <record model="ir.ui.view" id="view_partner_inherit_followup_form">
+ <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 name="arch" type="xml">
+ <notebook position="inside">
+ <page string="Payments Follow-up" position="inside">
+ <separator string="Payments follow-up"/>
+ <group>
+ <field name="payment_amount_outstanding"/>
+ <field name="latest_followup_level_id"/>
+ <field name="payment_next_action"/>
+ <field name="payment_next_action_date"/>
+ </group>
+ </page>
+ </notebook>
+
+ <!--<field name="name" position="after">
+ <field name="payment_next_action"/>
+ </field>-->
+ <!--<field name="payment_amount_outstanding" position="after">
+ <separator string="Account Move Lines" colspan="4"/>
+ <field name="accountmoveline_ids" nolabel="1" colspan="4"/>
+ </field>-->
+ </field>
+ </record>
+
<!-- Menus about followup of customers -->
<menuitem id="account_followup_" action="action_customer_followup" parent="account.menu_configuration_misc" name="Customer follow up"/>