You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
186 lines
11 KiB
186 lines
11 KiB
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
<!-- action to view sale order list-from tender form-->
|
|
<record id="action_sale_tender_list" model="ir.actions.act_window">
|
|
<field name="name">Quotations</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">sale.order</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('tender_id','=',active_id)]</field>
|
|
<field name="context">{
|
|
"default_tender_id":active_id,
|
|
}
|
|
</field>
|
|
</record>
|
|
<!-- action to view sale order from tender form-->
|
|
<record id="sale_tender_action_so" model="ir.actions.act_window">
|
|
<field name="name">Quotation</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">sale.order</field>
|
|
<field name="view_mode">form,tree</field>
|
|
<field name="domain">[('tender_id','=',active_id)]</field>
|
|
<field name="context">{
|
|
"default_tender_id":active_id,
|
|
}
|
|
</field>
|
|
</record>
|
|
<!-- sale tender form-->
|
|
<record id="view_sale_tender_form" model="ir.ui.view">
|
|
<field name="name">sale.tender.form</field>
|
|
<field name="model">sale.tender</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Sale Agreements">
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
<header>
|
|
<button name="%(sale_tender_action_so)d"
|
|
type="action"
|
|
string="New Quotation"
|
|
context="{'default_currency_id': currency_id, 'default_user_id': user_id}"
|
|
attrs="{'invisible': [('state', '!=', 'open')]}"/>
|
|
<button name="%(sale_tender_action_so)d"
|
|
type="action"
|
|
string="New Quotation" class="btn-primary"
|
|
context="{'default_currency_id': currency_id, 'default_user_id': user_id}"
|
|
attrs="{'invisible': [('state', 'not in', ('in_progress', 'ongoing'))]}"/>
|
|
<button name="action_in_progress" states="draft"
|
|
string="Confirm" type="object"
|
|
class="btn-primary"/>
|
|
<button name="action_cancel"
|
|
states="draft,in_progress,ongoing"
|
|
string="Cancel" type="object"/>
|
|
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft,in_progress,open,done"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="%(action_sale_tender_list)d"
|
|
type="action" class="oe_stat_button"
|
|
icon="fa-list-alt"
|
|
attrs="{'invisible': [('state', '=', 'draft')]}"
|
|
context="{'default_currency_id': currency_id}">
|
|
<field name="order_count" widget="statinfo"
|
|
string="Quotations/Orders"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_inline"/>
|
|
<h1>
|
|
<field name="name"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="user_id"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open'))]}"
|
|
domain="[('share', '=', False)]"/>
|
|
<field name="type_id"
|
|
attrs="{'readonly': [('state','!=','draft')]}"/>
|
|
<field name="customer_id"
|
|
context="{'res_partner_search_mode': 'customer'}"
|
|
attrs="{'readonly': [('state', 'in', ['ongoing','done'])]}"/>
|
|
<field name="currency_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="date_end"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open','ongoing'))]}"/>
|
|
<field name="ordering_date"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open','ongoing'))]}"/>
|
|
<field name="schedule_date"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open','ongoing'))]}"/>
|
|
<field name="company_id"
|
|
options="{'no_create': True}"
|
|
attrs="{'readonly': [('state','not in',('draft'))]}"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Products" name="products">
|
|
<field name="line_ids">
|
|
<tree string="Products" editable="bottom">
|
|
<field name="product_id"
|
|
domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
|
<field name="product_description_variants"
|
|
attrs="{'invisible': [('product_description_variants', '=', '')], 'readonly': [('parent.state', '!=', 'draft')]}"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom_category_id"
|
|
invisible="1"/>
|
|
<field name="product_uom_id"
|
|
string="UoM"
|
|
groups="uom.group_uom"
|
|
optional="show"
|
|
attrs="{'required': [('product_id', '!=', False)]}"/>
|
|
<field name="schedule_date"
|
|
optional="hide"/>
|
|
<field name="analytic_distribution"
|
|
widget="analytic_distribution"
|
|
optional="hide"
|
|
groups="analytic.group_analytic_accounting"
|
|
options="{'product_field': 'product_id', 'business_domain': 'purchase_order'}"/>
|
|
<field name="price_unit"/>
|
|
</tree>
|
|
<form string="Products">
|
|
<group>
|
|
<field name="product_id"
|
|
domain="[('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom_category_id"
|
|
invisible="1"/>
|
|
<field name="product_uom_id"
|
|
groups="uom.group_uom"/>
|
|
<field name="schedule_date"/>
|
|
<field name="analytic_distribution"
|
|
widget="analytic_distribution"
|
|
groups="analytic.group_analytic_accounting"
|
|
options="{'product_field': 'product_id', 'business_domain': 'sale_order'}"/>
|
|
<field name="company_id"
|
|
groups="base.group_multi_company"
|
|
options="{'no_create': True}"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
<separator string="Terms and Conditions"/>
|
|
<field name="description"
|
|
class="oe-bordered-editor"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open'))]}"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="activity_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!-- tree view-->
|
|
<record id="view_sale_tender_tree" model="ir.ui.view">
|
|
<field name="name">sale.tender.tree</field>
|
|
<field name="model">sale.tender</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Sale Agreements" sample="1">
|
|
<field name="name" decoration-bf="1"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!-- action for the tender-->
|
|
<record id="sale_tender_action" model="ir.actions.act_window">
|
|
<field name="name">Sale Tenders</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">sale.tender</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="context">{}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Start a new Sale agreement
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- menu item for the tender -->
|
|
<menuitem id="sale_tender_menu" sequence="10" parent="sale.sale_order_menu"
|
|
action="sale_tender_action"/>
|
|
</data>
|
|
</odoo>
|
|
|