Skip to content
Snippets Groups Projects
Commit d3d0fd7c authored by yhu-odoo's avatar yhu-odoo
Browse files

[IMP] purchase_stock: improve usability of on-time delivery rate

Change how we show on-time delivery rate on the purchase form to
imporve usability.

Task 2265912
PR #52693
parent aa8588e3
Branches
Tags
No related merge requests found
......@@ -33,4 +33,3 @@ class ResPartner(models.Model):
on_time, ordered = numbers
partner.on_time_rate = on_time / ordered * 100 if ordered else 100
(self - seen_partner).on_time_rate = 100
......@@ -21,25 +21,17 @@
<field name="picking_ids" invisible="1"/>
</button>
</xpath>
<xpath expr="//field[@name='partner_id']" position="replace">
<label for="partner_id"/>
<div>
<field name="partner_id" widget="res_partner_many2one" context="{'res_partner_search_mode': 'supplier', 'show_vat': True}"
placeholder="Name, TIN, Email, or Reference"
/>
<div class="oe_edit_only">
<button name="%(action_purchase_vendor_delay_report)d" type="action" class="oe_stat_button" context="{'search_default_partner_id': partner_id}">
<field name="on_time_rate" class="text-muted" widget='percentpie'/>
</button>
</div>
</div>
</xpath>
<xpath expr="//field[@name='currency_id']" position="after">
<field name="is_shipped" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='date_planned']" position="after">
<field name="move_dest_ids" invisible="1"/>
</xpath>
<xpath expr="//div[@name='date_planned_div']" position="inside">
<button name="%(action_purchase_vendor_delay_report)d" class="oe_link" type="action" context="{'search_default_partner_id': partner_id}" attrs="{'invisible': ['|', ('state', 'in', ['purchase', 'done']), ('partner_id', '=', False)]}">
<span><field name="on_time_rate" widget="integer" class="oe_inline"/>% On-Time Delivery</span>
</button>
</xpath>
<xpath expr="//div[@name='confirmation']" position="replace">
<div name="confirmation" class="oe_edit_only o_row" attrs="{'invisible': [('effective_date', '!=', False)]}" groups='purchase.group_send_reminder'>
<field name="receipt_reminder_email"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment