- The deadline of MO generated via procurements is calculated differently. Now, it doesn't take anymore in account the manufacturing_lead of the company (Security Lead Time of MO). The computation of planned date remains unchanged. - The date_expected fields was duplicated with the date fields except when the move was done. Merge both fields. The only information lost is: we can't know what was the scheduled date before processing move (`state` == done). Indeed, the date becomes the actual move processing datetime. - The `date` in `stock.picking` field contained the time of (purchase) order `date_order` (`purchase.order`). This field is was wrongly used in the kanban view where we expected to see date_planned instead. Also, the `_order` used this date instead of date_planned too. - The `delay_alert` is activate independently of stock rules. Then it is now activate in all case. - Remove the auto-reschedulting process of stock move via the stock rule (`propagate_date` and `propagate_date_minimum_delta`). Replace it by a automatic deadline date (`date_deadline`) propagation. The deadline is the promise done to/by vendor/client (SO/PO) then it is a readonly fields on picking/move and MO. - Now the Scheduled date (`date`) of stock move is never propagate and it is only related to the Scheduled date of related document (MO or picking). - Now when a move is created from procurement (sale), `date_planned` = `date_deadline` - `security_lead`. - The `delivery_date` of sale is no editable after confirmation and propagate as the deadline to related stock move linked to order_line - Adapt filter and decoration of MO and picking. - Because we are the client in case of purchase (PO), the promise of vendor can be not respected. Then we add the lead security to the deadline (inverse the sale order logic) of PO picking (promise reciept date + security lead) to match with the replenishment. task-2246665
141 lines
7.2 KiB
XML
141 lines
7.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<!--
|
|
Procurement
|
|
-->
|
|
|
|
<record id="procurement_group_form_view" model="ir.ui.view">
|
|
<field name="name">procurement.group.form</field>
|
|
<field name="model">procurement.group</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Procurement group">
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="%(do_view_pickings)d" string="Transfers" type="action" class="oe_stat_button" icon="fa-truck"/>
|
|
</div>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="move_type"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Stock Rules -->
|
|
|
|
<record id="view_stock_rule_filter" model="ir.ui.view">
|
|
<field name="name">stock.rule.select</field>
|
|
<field name="model">stock.rule</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Procurement">
|
|
<field name="name"/>
|
|
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
|
<group expand='0' string='Group by...'>
|
|
<filter string='Route' name="groupby_route" context="{'group_by': 'route_id'}"/>
|
|
<filter string='Warehouse' name="groupby_warehouse" context="{'group_by': 'warehouse_id'}" groups="stock.group_stock_multi_warehouses"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- <Rules> -->
|
|
<record id="view_stock_rule_tree" model="ir.ui.view">
|
|
<field name="name">stock.rule.tree</field>
|
|
<field name="model">stock.rule</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Rules">
|
|
<field name="action"/>
|
|
<field name="location_src_id" options="{'no_create': True}"/>
|
|
<field name="location_id" options="{'no_create': True}"/>
|
|
<field name="route_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_stock_rule_form" model="ir.ui.view">
|
|
<field name="name">stock.rule.form</field>
|
|
<field name="model">stock.rule</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Rules">
|
|
<sheet>
|
|
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_edit_only"/>
|
|
<h1><field name="name"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="active" invisible="1"/>
|
|
<field name="picking_type_code_domain" invisible="1"/>
|
|
<field name="action"/>
|
|
<field name="picking_type_id"/>
|
|
<field name="location_src_id" options="{'no_create': True}" attrs="{'required': [('action', 'in', ['pull', 'push', 'pull_push'])]}"/>
|
|
<field name="location_id" options="{'no_create': True}"/>
|
|
<field name="auto" attrs="{'invisible': [('action', 'not in', ['push', 'pull_push'])]}"/>
|
|
<field name="procure_method" attrs="{'invisible': [('action', 'not in', ['pull', 'pull_push'])]}"/>
|
|
</group>
|
|
<group>
|
|
<div colspan="2">
|
|
<label for="rule_message" invisible="1"/>
|
|
<div>
|
|
<field name="rule_message" readonly="1"/>
|
|
</div>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<group name="apply_on" string="Applicability">
|
|
<field name="route_id"/>
|
|
<field name="warehouse_id" attrs="{'invisible': [('action', '=', 'push')]}" groups="base.group_no_one"/>
|
|
<field name="route_company_id" invisible="1"/>
|
|
<field name="company_id" options="{'no_create': True}" attrs="{'required': [('action', '=', 'push')]}" groups="base.group_multi_company"/>
|
|
<field name="sequence" string="Sequence" groups="base.group_no_one"/>
|
|
</group>
|
|
<group name="propagation_group" string="Propagation" attrs="{'invisible': [('action', '=', 'push')]}" groups="base.group_no_one">
|
|
<field name="group_propagation_option"/>
|
|
<field name="group_id" attrs="{'invisible': [('group_propagation_option', '!=', 'fixed')], 'required': [('group_propagation_option', '=', 'fixed')]}"/>
|
|
<field name="propagate_cancel"/>
|
|
<field name="propagate_warehouse_id"/>
|
|
</group>
|
|
<group string="Options" attrs="{'invisible': [('action', 'not in', ['pull', 'push', 'pull_push'])]}">
|
|
<field name="partner_address_id" attrs="{'invisible': [('action', '=', 'push')]}"/>
|
|
<label for="delay"/>
|
|
<div><field name="delay" class="oe_inline"/> days</div>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form view for route -->
|
|
|
|
<record id="view_route_rule_form" model="ir.ui.view">
|
|
<field name="name">stock.rule.form</field>
|
|
<field name="model">stock.rule</field>
|
|
<field name="mode">primary</field>
|
|
<field name="inherit_id" ref="stock.view_stock_rule_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='route_id']" position="replace"></xpath>
|
|
<xpath expr="//group[@name='apply_on']" position="attributes">
|
|
<attribute name="groups">base.group_multi_company,base.group_no_one</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_rules_form" model="ir.actions.act_window">
|
|
<field name="name">Rules</field>
|
|
<field name="res_model">stock.rule</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<menuitem action="action_rules_form" id="menu_action_rules_form"
|
|
parent="menu_warehouse_config" sequence="2" groups="stock.group_adv_location"/>
|
|
|
|
</data>
|
|
</odoo>
|