191 lines
12 KiB
XML
Executable File
191 lines
12 KiB
XML
Executable File
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<odoo>
|
|
<data>
|
|
<record id='rental_product_contract_form' model="ir.ui.view">
|
|
<field name="name">Rental Contracts</field>
|
|
<field name="model">rental.product.contract</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="contract_close" states="open,expired,future" type="object" class="oe_highlight" string="Close Contract" />
|
|
<button name="send_product_contract" string="Send Contract by Email" type="object" class="oe_highlight" />
|
|
<button name="contract_open" states="closed" type="object" class="oe_highlight" string="Set
|
|
Contract In Progress" />
|
|
<button class="oe_highlight" name="act_renew_contract" type="object" string="Renew
|
|
Contract" help="Create a new contract automatically with
|
|
all the same informations except for the date that will
|
|
start at the end of current contract" attrs="{'invisible':[('state','!=','diesoon')]}" />
|
|
<button class="oe_highlight" name="create_invoice" type="object" string="Create invoice" attrs="{'invisible':[('first_invoice_created','=',True)]}" />
|
|
<button name="generate_policy" type="object" string="Generate Policy" invisible="1" />
|
|
<field name="state" widget="statusbar" />
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="name" placeholder="New" />
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group col="2">
|
|
<field name="currency_id" invisible="1" />
|
|
<field name="partner_id" invisible="1" />
|
|
<field name="origin" string="Source Document" invisible="1" />
|
|
<field name="company_id" readonly="1" />
|
|
<field name="rental_id" invisible="1" />
|
|
<field name="picking_id" invisible="1" />
|
|
<field name="is_hours" invisible="1" />
|
|
<field name="is_days" invisible="1" />
|
|
</group>
|
|
<group>
|
|
<field name="contract_date" readonly="1" />
|
|
<field name="from_date" required="1" readonly="1" />
|
|
<field name="to_date" required="1" readonly="1" />
|
|
<field name="cost" invisible="1" />
|
|
<field name="account_type" invisible="1" />
|
|
<label for="cost_generated" invisible="1" />
|
|
<div>
|
|
<field name="cost_frequency" class="oe_inline" invisible="1" />
|
|
<field name="cost_generated" style="width:142px;" invisible="1" />
|
|
</div>
|
|
</group>
|
|
<group col="2">
|
|
<separator string="Payment Details" />
|
|
<field name="account_payment_term" readonly="1" />
|
|
<field name="first_invoice_created" invisible="1" />
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Product Details" name="product_details">
|
|
<group>
|
|
<field name="attachment_ids" widget="many2many_binary" />
|
|
</group>
|
|
<group>
|
|
<field name="product_contract_lines_ids" nolabel="1">
|
|
<tree editable="bottom">
|
|
<field name="product_id" string="Product" domain="[('is_rental', '=', True)]" />
|
|
<field name="description" />
|
|
<field name="currency_id" invisible="1" />
|
|
<field name="price_based" />
|
|
<field name="enter_days" attrs="{'column_invisible':[('parent.is_days', '=', False)],
|
|
'invisible': [('price_based', '=', 'per_hour')]}" />
|
|
<field name="enter_hour" attrs="{'column_invisible':[('parent.is_hours', '=', False)],
|
|
'invisible': [('price_based', '=', 'per_day')]}" />
|
|
<field name="qty_needed" />
|
|
<field name="price" widget="monetary" options="{'currency_field': 'currency_id'}" />
|
|
<field name="tax_id" widget="many2many_tags" />
|
|
<field name="sub_total" widget="monetary" options="{'currency_field': 'currency_id'}" />
|
|
<field name="product_contract_id" invisible="1" />
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</page>
|
|
<page string="Recurring Invoice">
|
|
<field name="recurring_line" mode="tree" sum="recurring_amount">
|
|
<tree string="product Reccurring Lines" colors="#0b7a35:payment_info=='paid';#f20b07:payment_info!='paid'">
|
|
<field name="date_today" />
|
|
<field name="payment_info" />
|
|
<field name="recurring_amount" sum="recurring_amount" />
|
|
</tree>
|
|
</field>
|
|
<field name="sum_cost" invisible="1" />
|
|
</page>
|
|
<page string="Document">
|
|
<field name="document_ids" nolabel="1">
|
|
<tree editable="bottom">
|
|
<field name="name" />
|
|
<field name="id_number" />
|
|
<field name="contract_id" invisible="1" />
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Cancellation Policy">
|
|
<group>
|
|
<field name="number_of_slot" required="True" />
|
|
</group>
|
|
<field name="cancel_policy_ids" mode="tree">
|
|
<tree string="Cancellation Policy" editable="bottom" create="false" delete="false">
|
|
<field name="contract_id" invisible="1" />
|
|
<field name="from_date" />
|
|
<field name="to_date" />
|
|
<field name="policy_charged" />
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
<group>
|
|
<group>
|
|
<label for="first_payment" />
|
|
<field name="first_payment" nolabel="1" widget='monetary' />
|
|
</group>
|
|
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
|
<label for="untaxed_amount" />
|
|
<field name="untaxed_amount" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}" />
|
|
<label for="taxes" />
|
|
<field name="taxes" nolabel="1" widget='monetary' />
|
|
<label for="extra_charges" />
|
|
<field name="extra_charges" readonly="1" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}" />
|
|
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
|
<label for="total_amount" />
|
|
</div>
|
|
<field name="total_amount" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}" />
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<field name="terms_condition" />
|
|
|
|
</group>
|
|
<group col="4">
|
|
<label for="signature_contractor" />
|
|
<div>
|
|
<field name="signature_contractor" widget="image" options="{'size': [90, 35]}" />
|
|
<button name="signature_contractor" string="Contractor Signature" class="oe_highlight" />
|
|
</div>
|
|
<label for="signature_customer" />
|
|
<div>
|
|
<field name="signature_customer" widget="image" options="{'size': [90, 35]}" />
|
|
<button name="signature_customer" string="Customer Signature" class="oe_highlight" />
|
|
</div>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id='rental_product_contract_tree' model='ir.ui.view'>
|
|
<field name="name">Rental Contracts</field>
|
|
<field name="model">rental.product.contract</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="partner_id" />
|
|
<field name="from_date" />
|
|
<field name="to_date" />
|
|
<field name="state" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id='action_rental_product_contract' model='ir.actions.act_window'>
|
|
<field name="name">Rental Contracts</field>
|
|
<field name="res_model">rental.product.contract</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class='oe_view_nocontent_create'>Click to add Products Contract</p>
|
|
</field>
|
|
</record>
|
|
<record id='action_rental_product_contract_form' model='ir.actions.act_window'>
|
|
<field name="name">Rental Contracts</field>
|
|
<field name="res_model">rental.product.contract</field>
|
|
<field name="view_mode">form,tree</field>
|
|
<field name="help" type="html">
|
|
<p class='oe_view_nocontent_create'>Click to add Products Contract</p>
|
|
</field>
|
|
</record>
|
|
<record id="action_rental_contract_view_tree" model="ir.actions.act_window">
|
|
<field name="name">Contract</field>
|
|
<field name="res_model">rental.product.contract</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="view_id" ref="rental_product_contract_tree" />
|
|
<field name="domain">[('state', 'not in', ['futur', 'closed'])]</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo> |