mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-25 12:32:01 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -4,40 +4,65 @@
|
|||
<record id="project_sharing_inherit_project_task_view_form" model="ir.ui.view">
|
||||
<field name="name">project.task.view.inherit</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="priority">300</field>
|
||||
<field name="inherit_id" ref="project.project_sharing_project_task_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<field name="display_sale_order_button" invisible="1"/>
|
||||
<field name="allow_billable" invisible="1"/>
|
||||
<button class="oe_stat_button"
|
||||
type="object" name="action_project_sharing_view_so" icon="fa-dollar"
|
||||
attrs="{'invisible': [('display_sale_order_button', '=', False)]}"
|
||||
string="Sales Order"/>
|
||||
invisible="not display_sale_order_button">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Sales Order</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<xpath expr="//field[@name='partner_id']" position="attributes">
|
||||
<attribute name="options">{'no_open': True, 'no_create': True, 'no_edit': True}</attribute>
|
||||
<attribute name="context">{'res_partner_search_mode': 'customer'}</attribute>
|
||||
<attribute name="invisible">not allow_billable</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="commercial_partner_id" invisible="1" />
|
||||
<field name="sale_line_id" string="Sales Order Item" attrs="{'invisible': [('partner_id', '=', False)]}" options='{"no_open": True}' readonly="1" context="{'create': False, 'edit': False, 'delete': False}"/>
|
||||
<field name="sale_line_id" string="Sales Order Item" options='{"no_open": True}' readonly="1" invisible="not partner_id" context="{'create': False, 'edit': False, 'delete': False}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']/list/field[@name='partner_id']" position="after">
|
||||
<field name="allow_billable" column_invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='depend_on_ids']/list/field[@name='partner_id']" position="after">
|
||||
<field name="allow_billable" column_invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']/list/field[@name='partner_id']" position="attributes">
|
||||
<attribute name="column_invisible">not parent.allow_billable</attribute>
|
||||
<attribute name="invisible">not allow_billable</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='depend_on_ids']/list/field[@name='partner_id']" position="attributes">
|
||||
<attribute name="column_invisible">not parent.allow_billable</attribute>
|
||||
<attribute name="invisible">not allow_billable</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="project_sharing_inherit_project_task_view_search" model="ir.ui.view">
|
||||
<field name="name">project.task.search.inherit</field>
|
||||
<record id="project_sharing_inherit_project_task_view_tree" model="ir.ui.view">
|
||||
<field name="name">project.task.view.list.inherit</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="project.project_sharing_project_task_view_search"/>
|
||||
<field name="priority">300</field>
|
||||
<field name="inherit_id" ref="project.project_sharing_project_task_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="sale_order_id" string="Sale Order" filter_domain="['|', ('sale_order_id', 'ilike', self), ('sale_line_id', 'ilike', self)]"/>
|
||||
</xpath>
|
||||
<xpath expr="//group/filter[@name='customer']" position="after">
|
||||
<!-- TODO: Remove me in master -->
|
||||
<filter name="sale_order_id" string="Sales Order Id" invisible="1" />
|
||||
<filter name="group_by_sale_order" string="Sales Order" context="{'group_by': 'sale_order_id'}" />
|
||||
<field name="allow_milestones" position="after">
|
||||
<field name="allow_billable" column_invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='partner_id']" position="attributes">
|
||||
<attribute name="column_invisible">not allow_billable</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="project.project_sharing_project_task_action" model="ir.actions.act_window">
|
||||
<field name="context">{
|
||||
'default_project_id': active_id,
|
||||
'active_id_chatter': active_id,
|
||||
'delete': false,
|
||||
'sale_show_partner_name': true,
|
||||
}</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue