summaryrefslogtreecommitdiff
path: root/addons/purchase/views
diff options
context:
space:
mode:
authorRémy Voet (ryv) <ryv@odoo.com>2020-07-29 14:19:26 +0000
committerRémy Voet (ryv) <ryv@odoo.com>2020-08-18 07:48:27 +0000
commite40553723b893bcd2244e9b9fcc5c1a7e1bf27d3 (patch)
tree24eae5579cb91e9554226c7f56dd2afd3830e1c4 /addons/purchase/views
parentbb9ef004524e21c642abdff16aa6caa9abbb37ba (diff)
[IMP] stock,mrp,purchase: refactor priority
- MO/picking/PO/stock.move have now the "same" `priority` fields (Boolean logic: Normal or Urgent). These models are now sort by priority first. Note that the priority field of stock move is a technical one. - For MO and picking, the set of `priority` field change priority of the related stock move. The prioriry field on stock move is used by the scheduler for reservation ('Urgent' before 'Normal') - The Stock Replenishment Report also take in account the priority to be consistent with the reservation. task-2246665
Diffstat (limited to 'addons/purchase/views')
-rw-r--r--addons/purchase/views/purchase_views.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml
index 6faeb1b1218..a1bede8765b 100644
--- a/addons/purchase/views/purchase_views.xml
+++ b/addons/purchase/views/purchase_views.xml
@@ -164,6 +164,7 @@
<span class="o_form_label" attrs="{'invisible': [('state','not in',('draft','sent'))]}">Request for Quotation </span>
<span class="o_form_label" attrs="{'invisible': [('state','in',('draft','sent'))]}">Purchase Order </span>
<h1>
+ <field name="priority" widget="priority" class="mr-3"/>
<field name="name" readonly="1"/>
</h1>
</div>
@@ -393,6 +394,7 @@
<field name="user_id"/>
<field name="product_id"/>
<filter name="my_purchases" string="My Purchases" domain="[('user_id', '=', uid)]"/>
+ <filter string="Starred" name="starred" domain="[('priority', '=', '1')]"/>
<separator/>
<filter name="draft" string="RFQs" domain="[('state', 'in', ('draft', 'sent', 'to approve'))]"/>
<separator/>
@@ -434,6 +436,7 @@
<field name="user_id"/>
<field name="product_id"/>
<filter name="my_Orders" string="My Orders" domain="[('user_id', '=', uid)]"/>
+ <filter string="Starred" name="starred" domain="[('priority', '=', '1')]"/>
<separator/>
<filter name="unconfirmed" string="Not Acknowledged" domain="[('mail_reception_confirmed', '=', False), ('state', '=', 'purchase')]"/>
<filter name="not_invoiced" string="Waiting Bills" domain="[('invoice_status', '=', 'to invoice')]" help="Purchase orders that include lines not invoiced."/>
@@ -479,7 +482,8 @@
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="o_kanban_record_top mb16">
- <div class="o_kanban_record_headings mt4">
+ <field name="priority" widget="priority"/>
+ <div class="o_kanban_record_headings ml-1">
<strong class="o_kanban_record_title"><span><t t-esc="record.partner_id.value"/></span></strong>
</div>
<strong><field name="amount_total" widget="monetary"/></strong>
@@ -507,6 +511,7 @@
<field name="arch" type="xml">
<tree string="Purchase Order" multi_edit="1" decoration-bf="message_unread==True"
decoration-muted="state=='cancel'" decoration-info="state in ('wait','confirmed')" sample="1">
+ <field name="priority" optional="show" widget="priority" nolabel="1"/>
<field name="message_unread" invisible="1"/>
<field name="partner_ref" optional="hide"/>
<field name="name" string="Reference" readonly="1"/>
@@ -540,6 +545,7 @@
<header>
<button name="action_create_invoice" type="object" string="Create Bills"/>
</header>
+ <field name="priority" optional="show" widget="priority" nolabel="1"/>
<field name="message_unread" invisible="1"/>
<field name="partner_ref" optional="hide"/>
<field name="name" string="Reference" readonly="1" decoration-bf="1"/>
@@ -576,6 +582,7 @@
<header>
<button name="action_create_invoice" type="object" string="Create Bills"/>
</header>
+ <field name="priority" optional="show" widget="priority" nolabel="1"/>
<field name="message_unread" invisible="1"/>
<field name="partner_ref" optional="hide"/>
<field name="name" string="Reference" readonly="1" decoration-bf="1"/>