mirror of
https://github.com/bringout/oca-financial.git
synced 2026-04-25 13:42:03 +02:00
292 lines
12 KiB
XML
292 lines
12 KiB
XML
<odoo>
|
|
<record id="view_account_billing_tree" model="ir.ui.view">
|
|
<field name="name">account.billing.tree</field>
|
|
<field name="model">account.billing</field>
|
|
<field name="arch" type="xml">
|
|
<tree
|
|
decoration-info="state == 'draft'"
|
|
decoration-muted="state == 'cancel'"
|
|
edit="false"
|
|
>
|
|
<field name="name" />
|
|
<field name="partner_id" string="Customer" />
|
|
<field name="date" />
|
|
<field name="threshold_date" />
|
|
<field name="payment_paid_all" />
|
|
<field
|
|
name="state"
|
|
widget="badge"
|
|
decoration-success="state == 'billed'"
|
|
decoration-info="state == 'draft'"
|
|
decoration-danger="state == 'cancel'"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_supplier_billing_tree" model="ir.ui.view">
|
|
<field name="name">account.supplier.billing.tree</field>
|
|
<field name="model">account.billing</field>
|
|
<field name="arch" type="xml">
|
|
<tree
|
|
decoration-info="state == 'draft'"
|
|
decoration-muted="state == 'cancel'"
|
|
edit="false"
|
|
>
|
|
<field name="name" />
|
|
<field name="partner_id" string="Vendor" />
|
|
<field name="date" />
|
|
<field name="threshold_date" />
|
|
<field name="payment_paid_all" />
|
|
<field
|
|
name="state"
|
|
widget="badge"
|
|
decoration-success="state == 'billed'"
|
|
decoration-info="state == 'draft'"
|
|
decoration-danger="state == 'cancel'"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="view_billing_search" model="ir.ui.view">
|
|
<field name="name">account.billing.search</field>
|
|
<field name="model">account.billing</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Billings">
|
|
<field name="name" string="Name" />
|
|
<field name="partner_id" />
|
|
<filter
|
|
name="state_draft"
|
|
string="Draft"
|
|
domain="[('state','=','draft')]"
|
|
help="Draft Billing"
|
|
/>
|
|
<filter
|
|
name="state_billed"
|
|
string="Billed"
|
|
domain="[('state','=','billed')]"
|
|
help="Billed Billing"
|
|
/>
|
|
<separator />
|
|
<filter
|
|
string="Vendor"
|
|
domain="[('bill_type','=','in_invoice')]"
|
|
name="vendor_filter"
|
|
/>
|
|
<filter
|
|
string="Customer"
|
|
domain="[('bill_type','=','out_invoice')]"
|
|
name="customer_filter"
|
|
/>
|
|
<group expand="0" string="Group By">
|
|
<filter
|
|
name="group_by_customer"
|
|
string="Customer"
|
|
context="{'group_by':'partner_id'}"
|
|
/>
|
|
<filter
|
|
name="group_by_state"
|
|
string="Status"
|
|
context="{'group_by':'state'}"
|
|
/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_billing_form" model="ir.ui.view">
|
|
<field name="name">account.billing.form</field>
|
|
<field name="model">account.billing</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button
|
|
name="validate_billing"
|
|
class="oe_highlight"
|
|
states="draft"
|
|
string="Validate"
|
|
type="object"
|
|
/>
|
|
<button
|
|
name="action_register_payment"
|
|
type="object"
|
|
class="oe_highlight"
|
|
attrs="{'invisible': ['|', ('state', '!=', 'billed'), ('payment_paid_all', '!=', False)]}"
|
|
string="Register Payment"
|
|
data-hotkey="g"
|
|
groups="account.group_account_invoice"
|
|
/>
|
|
<button
|
|
name="action_cancel"
|
|
states="draft"
|
|
string="Cancel"
|
|
type="object"
|
|
/>
|
|
<button
|
|
name="action_cancel"
|
|
states="billed"
|
|
string="Cancel"
|
|
type="object"
|
|
confirm="Are you sure to cancel this document?"
|
|
/>
|
|
<button
|
|
name="action_cancel_draft"
|
|
states="cancel"
|
|
string="Set to Draft"
|
|
type="object"
|
|
/>
|
|
<field
|
|
name="state"
|
|
widget="statusbar"
|
|
statusbar_visible="draft,billed"
|
|
/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button
|
|
class="oe_stat_button"
|
|
name="invoice_relate_billing_tree_view"
|
|
type="object"
|
|
attrs="{'invisible':[('state', 'not in', ['billed'])]}"
|
|
icon="fa-pencil-square-o"
|
|
>
|
|
<field
|
|
name="invoice_related_count"
|
|
string="Invoices"
|
|
widget="statinfo"
|
|
/>
|
|
</button>
|
|
</div>
|
|
<h1>
|
|
<label
|
|
for="name"
|
|
string="Draft Billing"
|
|
attrs="{'invisible': [('state','!=', 'draft')]}"
|
|
/>
|
|
<field
|
|
name="name"
|
|
readonly="1"
|
|
class="oe_inline"
|
|
attrs="{'invisible': [('state', '=', 'draft')]}"
|
|
/>
|
|
</h1>
|
|
<group>
|
|
<group>
|
|
<field
|
|
name="partner_id"
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
|
/>
|
|
<field name="bill_type" invisible="1" />
|
|
<field name="payment_paid_all" />
|
|
</group>
|
|
<group>
|
|
<field name="threshold_date_type" />
|
|
<field name="threshold_date" string="Threshold Date" />
|
|
<field name="date" />
|
|
<field name="currency_id" />
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Billing Lines" groups="base.group_user">
|
|
<button
|
|
name="compute_lines"
|
|
type="object"
|
|
string="Compute items"
|
|
states="draft"
|
|
/>
|
|
<field name="billing_line_ids">
|
|
<tree name="billing" create="0" editable="bottom">
|
|
<field name="move_id" invisible="1" />
|
|
<field name="name" />
|
|
<field name="invoice_date" />
|
|
<field name="threshold_date" />
|
|
<field name="origin" />
|
|
<field name="currency_id" invisible="1" />
|
|
<field
|
|
name="amount_total"
|
|
sum="Total Amount"
|
|
optional="show"
|
|
/>
|
|
<field
|
|
name="amount_residual"
|
|
sum="Total Amount Residual"
|
|
optional="show"
|
|
/>
|
|
<field
|
|
name="state"
|
|
widget="badge"
|
|
decoration-success="state == 'posted'"
|
|
decoration-info="state == 'draft'"
|
|
decoration-danger="state == 'cancel'"
|
|
/>
|
|
<field
|
|
name="payment_state"
|
|
widget="badge"
|
|
decoration-success="payment_state == 'paid'"
|
|
decoration-info="payment_state == 'not_paid'"
|
|
decoration-danger="payment_state == 'reversed'"
|
|
decoration-warning="payment_state == 'in_payment'"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
<group>
|
|
<group>
|
|
<separator string="Notes" />
|
|
<field name="narration" colspan="4" nolabel="1" />
|
|
</group>
|
|
<group />
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers" />
|
|
<field name="message_ids" widget="mail_thread" />
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="action_customer_billing" model="ir.actions.act_window">
|
|
<field name="name">Billing</field>
|
|
<field name="res_model">account.billing</field>
|
|
<field name="view_id" eval="view_account_billing_tree" />
|
|
<field
|
|
name="context"
|
|
>{'bill_type':'out_invoice', 'search_default_customer_filter': 1, 'default_group_payment': 1}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Click to register a new billing.
|
|
</p>
|
|
<p>
|
|
Enter the customer the invoices expect to be paid by the customer for this
|
|
bill period. By default the pending invoices will be listed, automatically.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<record id="action_supplier_billing" model="ir.actions.act_window">
|
|
<field name="name">Billing</field>
|
|
<field name="res_model">account.billing</field>
|
|
<field name="view_id" eval="view_account_supplier_billing_tree" />
|
|
<field
|
|
name="context"
|
|
>{'bill_type':'in_invoice', 'search_default_vendor_filter': 1, 'default_group_payment': 1}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Click to register a new billing.
|
|
</p>
|
|
<p>
|
|
Manage supplier billing you want to be used in the system.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<menuitem
|
|
action="action_customer_billing"
|
|
id="menu_action_customer_billing"
|
|
parent="account.menu_finance_receivables"
|
|
sequence="11"
|
|
/>
|
|
<menuitem
|
|
action="action_supplier_billing"
|
|
id="menu_action_supplier_billing"
|
|
parent="account.menu_finance_payables"
|
|
sequence="11"
|
|
/>
|
|
</odoo>
|