Browse Source

[IMP] move loan line to dedicated xml

pull/134/head
houssine 4 years ago
parent
commit
b0f7d3dde1
  1. 109
      easy_my_coop_loan/views/loan_line_view.xml
  2. 110
      easy_my_coop_loan/views/loan_view.xml

109
easy_my_coop_loan/views/loan_line_view.xml

@ -0,0 +1,109 @@
<odoo>
<record id="action_loan_issue_lines" model="ir.actions.act_window">
<field name="name">Loans</field>
<field name="res_model">loan.issue.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="loan_issue_line_view_tree" model="ir.ui.view">
<field name="name">loan_issue_line_view_tree</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<tree string="Loans">
<field name="name"/>
<field name="loan_issue_id"/>
<field name="partner_id"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_loan_issue_line_form" model="ir.ui.view">
<field name="name">loan.issue.line.form</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<form string="Loan">
<header>
<button name="action_validate" string="Validate"
type="object" states="draft"/>
<button name="action_request_payment"
string="Request Payment"
type="object" states="subscribed"/>
<button name="action_cancel" string="Cancel" type="object"
states="draft,subscribed,waiting"
confirm="Are you sure you want to cancel this loan subscription ?"/>
<button name="action_draft" string="Set to draft"
type="object" states="cancelled"/>
<button name="action_paid" string="Paid"
type="object" states="waiting"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>
<group>
<field name="loan_issue_id"/>
<field name="name"/>
<field name="quantity"/>
<field name="face_value"/>
</group>
<group>
<field name="date"/>
<field name="payment_date"/>
<field name="partner_id"/>
<field name="amount"/>
</group>
</group>
<notebook>
<page string="Interest lines">
<field name="interest_lines">
<tree delete="false" create="false">
<field name="name"/>
<field name="amount"/>
<field name="accrued_amount"/>
<field name="interest"/>
<field name="net_interest"/>
<field name="taxes_amount"/>
<field name="due_amount"/>
<field name="due_date"/>
<field name="state"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_loan_issue_line_filter" model="ir.ui.view">
<field name="name">Loans Search</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<search string="Search Loans">
<field name="name"/>
<field name="partner_id"/>
<field name="loan_issue_id"/>
<separator/>
<filter string="Draft" name="state_draft"
domain="[('state','=','draft')]"/>
<filter string="Paid" name="state_paid"
domain="[('state','=','paid')]"/>
<filter string="Done" name="state_done"
domain="[('state','=','done')]"/>
<filter string="Subscribed" name="state_subscribed"
domain="[('state','=','subscribed')]"/>
<group expand="0" name="group_by" string="Group By">
<filter name="loan_issue_id" string="Loan Issue"
context="{'group_by' : 'loan_issue_id'}"/>
<filter name="date" string="Subscription Date"
context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
</odoo>

110
easy_my_coop_loan/views/loan_view.xml

@ -110,7 +110,7 @@
</group>
<notebook>
<page name="lines" string="Lines">
<field name="loan_issue_lines">
<field name="loan_issue_lines" context="{'default_loan_issue_id': id}">
<tree delete="false">
<field name="name"/>
<field name="partner_id"/>
@ -146,110 +146,4 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="action_loan_issue_lines" model="ir.actions.act_window">
<field name="name">Loans</field>
<field name="res_model">loan.issue.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="loan_issue_line_view_tree" model="ir.ui.view">
<field name="name">loan_issue_line_view_tree</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<tree string="Loans">
<field name="name"/>
<field name="loan_issue_id"/>
<field name="partner_id"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_loan_issue_line_form" model="ir.ui.view">
<field name="name">loan.issue.line.form</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<form string="Loan issue">
<header>
<button name="action_validate" string="Validate"
type="object" states="draft"/>
<button name="action_request_payment"
string="Request Payment"
type="object" states="subscribed"/>
<button name="action_cancel" string="Cancel" type="object"
states="draft,subscribed,waiting"
confirm="Are you sure you want to cancel this loan subscription ?"/>
<button name="action_draft" string="Set to draft"
type="object" states="cancelled"/>
<button name="action_paid" string="Paid"
type="object" states="waiting"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>
<group>
<field name="loan_issue_id"/>
<field name="name"/>
<field name="quantity"/>
<field name="face_value"/>
</group>
<group>
<field name="date"/>
<field name="partner_id"/>
<field name="amount"/>
</group>
</group>
<notebook>
<page string="Interest lines">
<field name="interest_lines">
<tree delete="false" create="false">
<field name="name"/>
<field name="amount"/>
<field name="accrued_amount"/>
<field name="interest"/>
<field name="net_interest"/>
<field name="taxes_amount"/>
<field name="due_date"/>
<field name="state"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_loan_issue_line_filter" model="ir.ui.view">
<field name="name">Loans Search</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<search string="Search Loans">
<field name="name"/>
<field name="partner_id"/>
<field name="loan_issue_id"/>
<separator/>
<filter string="Draft" name="state_draft"
domain="[('state','=','draft')]"/>
<filter string="Paid" name="state_paid"
domain="[('state','=','paid')]"/>
<filter string="Done" name="state_done"
domain="[('state','=','done')]"/>
<filter string="Subscribed" name="state_subscribed"
domain="[('state','=','subscribed')]"/>
<group expand="0" name="group_by" string="Group By">
<filter name="loan_issue_id" string="Loan Issue"
context="{'group_by' : 'loan_issue_id'}"/>
<filter name="date" string="Subscription Date"
context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
</odoo>
</odoo>
Loading…
Cancel
Save