[IMP] stock: show cancel state only when cancelled
before this commit, in the stock move and stock move line form view, the cancelled state is shown in the second position and in the stock move line form view, the cancelled state is always visible. after this commit, the cancelled state will be moved to last position as in all status bar and in the cancelled state in move line will be shown only if the record is in the cancelled state. closes odoo/odoo#121333 Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -99,12 +99,13 @@ class StockMove(models.Model):
|
||||
help="Optional: previous stock move when chaining them")
|
||||
picking_id = fields.Many2one('stock.picking', 'Transfer', index=True, states={'done': [('readonly', True)]}, check_company=True)
|
||||
state = fields.Selection([
|
||||
('draft', 'New'), ('cancel', 'Cancelled'),
|
||||
('draft', 'New'),
|
||||
('waiting', 'Waiting Another Move'),
|
||||
('confirmed', 'Waiting Availability'),
|
||||
('partially_available', 'Partially Available'),
|
||||
('assigned', 'Available'),
|
||||
('done', 'Done')], string='Status',
|
||||
('done', 'Done'),
|
||||
('cancel', 'Cancelled')], string='Status',
|
||||
copy=False, default='draft', index=True, readonly=True,
|
||||
help="* New: When the stock move is created and not yet confirmed.\n"
|
||||
"* Waiting Another Move: This state can be seen when a move is waiting for another one, for example in a chained flow.\n"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Move Lines" create="0" edit="0">
|
||||
<header>
|
||||
<field name="state" widget="statusbar"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<field name="company_id" invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user