[IMP] stock: add the field Preferred Routes in Procurement Request wizard, and also restrict the field to Manage Advanced Routes group.
This commit is contained in:
committed by
Antony Lesuisse
parent
e7e452f38c
commit
708cc7bbf1
@@ -1753,7 +1753,7 @@
|
||||
<group>
|
||||
<field name="warehouse_id" on_change="change_warehouse_id(warehouse_id, context)"/>
|
||||
<field name="location_id" domain="[('usage', '=', 'internal')]"/>
|
||||
<field name="route_ids" widget="many2many_tags"/>
|
||||
<field name="route_ids" widget="many2many_tags" groups="stock.group_adv_location"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<div name="button_box" position="inside">
|
||||
|
||||
@@ -28,6 +28,7 @@ class make_procurement(osv.osv_memory):
|
||||
'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
|
||||
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True),
|
||||
'date_planned': fields.date('Planned Date', required=True),
|
||||
'route_ids': fields.many2many('stock.location.route', string='Preferred Routes'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -60,6 +61,7 @@ class make_procurement(osv.osv_memory):
|
||||
'warehouse_id': proc.warehouse_id.id,
|
||||
'location_id': wh.lot_stock_id.id,
|
||||
'company_id': wh.company_id.id,
|
||||
'route_ids': [(6, 0, proc.route_ids.ids)],
|
||||
})
|
||||
procurement_obj.signal_workflow(cr, uid, [procure_id], 'button_confirm')
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<field name="uom_id" groups="product.group_uom" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="date_planned"/>
|
||||
<field name="route_ids" widget="many2many_tags" groups="stock.group_adv_location"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="make_procurement" string="Ask New Products" type="object" class="oe_highlight" />
|
||||
|
||||
Reference in New Issue
Block a user