mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 10: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
|
|
@ -7,23 +7,81 @@
|
|||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_view_invoice']" position="before">
|
||||
<field name="project_ids" invisible="1"/>
|
||||
<field name="is_product_milestone" invisible="1"/>
|
||||
<button type="object" name="action_view_project_ids" class="oe_stat_button" icon="fa-puzzle-piece" attrs="{'invisible': ['|', ('state', 'in', ['draft', 'sent']), ('project_ids', '=', [])]}" groups="project.group_project_user">
|
||||
<field name="project_count" widget="statinfo" string="Projects"/>
|
||||
<button name="action_view_invoice" position="before">
|
||||
<button
|
||||
name="action_view_project_ids"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-puzzle-piece"
|
||||
invisible="not show_project_button"
|
||||
groups="project.group_project_user"
|
||||
>
|
||||
<div class="o_stat_info">
|
||||
<div class="o_row">
|
||||
<span class="o_stat_value order-first">
|
||||
<field name="project_count"/>
|
||||
</span>
|
||||
<span class="o_stat_text"> Projects</span>
|
||||
</div>
|
||||
<div class="o_row">
|
||||
<span class="o_stat_value order-first">
|
||||
<field name="tasks_count"/>
|
||||
</span>
|
||||
<span class="o_stat_text"> Tasks</span>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_milestone" type="object" icon="fa-check-square-o" attrs="{'invisible': ['|', '|', ('is_product_milestone', '=', False), ('project_ids', '=', []), ('state', '=', 'draft')]}" groups="project.group_project_milestone">
|
||||
<button
|
||||
name="action_view_milestone"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-check-square-o"
|
||||
invisible="not is_product_milestone or not project_ids or state == 'draft'"
|
||||
groups="project.group_project_milestone"
|
||||
>
|
||||
<field name="milestone_count" widget="statinfo" string="Milestones"/>
|
||||
</button>
|
||||
<button type="object" name="action_view_task" class="oe_stat_button" icon="fa-tasks" attrs="{'invisible': [('tasks_count', '=', 0)]}" groups="project.group_project_user">
|
||||
<field name="tasks_count" widget="statinfo" string="Tasks"/>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='analytic_account_id']" position="after">
|
||||
<field name="visible_project" invisible="1"/>
|
||||
<field name="project_id" options="{'no_create': True}" attrs="{'invisible': [('visible_project', '=', False)]}"/>
|
||||
</xpath>
|
||||
</button>
|
||||
<field name="journal_id" position="before">
|
||||
<field name="project_id" groups="project.group_project_user"
|
||||
context="{'default_allow_billable': True, 'default_partner_id': partner_id, 'order_id': id, 'order_state' : state}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sales_order_filter_inherit_sale_project" model="ir.ui.view">
|
||||
<field name="name">sale.order.list.select.inherit.sale_project</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="order_line" position="after">
|
||||
<field name="project_id" groups="project.group_project_user"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="model_sale_order_action_create_project" model="ir.actions.server">
|
||||
<field name="name">Create Project</field>
|
||||
<field name="model_id" ref="sale.model_sale_order"/>
|
||||
<field name="binding_model_id" ref="sale.model_sale_order"/>
|
||||
<field name="binding_view_types">form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_create_project()</field>
|
||||
</record>
|
||||
|
||||
<record id="view_order_simple_form" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.from.task</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<header position="replace"/>
|
||||
<sheet position="after">
|
||||
<footer>
|
||||
<button string="Confirm & Close" special="save" class="btn btn-primary"/>
|
||||
<button string="Discard" special="cancel" class="btn btn-secondary"/>
|
||||
</footer>
|
||||
</sheet>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue