mirror of
https://github.com/bringout/oca-workflow-process.git
synced 2026-04-19 15:52:01 +02:00
85 lines
3.6 KiB
XML
85 lines
3.6 KiB
XML
<?xml version="1.0" ?>
|
|
<odoo>
|
|
<record id="action_purchase_test_tree" model="ir.actions.act_window">
|
|
<field name="name">Purchase Exception Rules</field>
|
|
<field name="res_model">exception.rule</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="view_id" ref="base_exception.view_exception_rule_tree" />
|
|
<field
|
|
name="domain"
|
|
>[('model', 'in', ['purchase.order', 'purchase.order.line'])]</field>
|
|
<field
|
|
name="context"
|
|
>{'active_test': False, 'default_model' : 'purchase.order'}</field>
|
|
</record>
|
|
<menuitem
|
|
action="action_purchase_test_tree"
|
|
id="menu_purchase_test"
|
|
parent="purchase.menu_purchase_config"
|
|
/>
|
|
<record id="view_order_form" model="ir.ui.view">
|
|
<field name="name">purchase_exception.view_order_form</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="inherit_id" ref="purchase.purchase_order_form" />
|
|
<field name="arch" type="xml">
|
|
<sheet position="before">
|
|
<div
|
|
class="alert alert-danger"
|
|
role="alert"
|
|
style="margin-bottom:0px;"
|
|
attrs="{'invisible': [('exceptions_summary','=',False)]}"
|
|
>
|
|
<p>
|
|
<strong
|
|
>There are exceptions blocking this Purchase Order:</strong>
|
|
</p>
|
|
<field name="exceptions_summary" />
|
|
<button
|
|
name="action_ignore_exceptions"
|
|
type="object"
|
|
class="btn-danger"
|
|
string="Ignore Exceptions"
|
|
help="Click here to be able to confirm this Agreement regardless of the exceptions."
|
|
groups="base_exception.group_exception_rule_manager"
|
|
/>
|
|
</div>
|
|
</sheet>
|
|
<xpath expr="//field[@name='date_order']/.." position="inside">
|
|
<field
|
|
name="ignore_exception"
|
|
states="purchase"
|
|
groups='base_exception.group_exception_rule_manager'
|
|
/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='company_id']" position="after">
|
|
<field name="exception_ids" widget="many2many_tags" readonly="True" />
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="view_order_tree" model="ir.ui.view">
|
|
<field name="name">purchase_exception.view_order_tree</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="inherit_id" ref="purchase.purchase_order_tree" />
|
|
<field name="arch" type="xml">
|
|
<field name="state" position="after">
|
|
<field name="main_exception_id" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
<record id="view_purchase_order_filter" model="ir.ui.view">
|
|
<field name="name">purchase_exception.view_purchases_order_filter</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="inherit_id" ref="purchase.view_purchase_order_filter" />
|
|
<field name="arch" type="xml">
|
|
<filter name="activities_exception" position="after">
|
|
<separator orientation="vertical" />
|
|
<filter
|
|
icon="fa-exclamation-circle"
|
|
name="tofix"
|
|
string="Blocked in Draft"
|
|
domain="[('main_exception_id','!=',False)]"
|
|
/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
</odoo>
|