Make sure count mode is preserved when making new inventory batch
i.e. even if only one count mode is allowed for the user
This commit is contained in:
parent
6c0f243655
commit
a557ec614a
|
@ -225,7 +225,8 @@ class InventoryBatchView(BatchMasterView):
|
||||||
f.set_enum('mode', modes)
|
f.set_enum('mode', modes)
|
||||||
f.set_label('mode', "Count Mode")
|
f.set_label('mode', "Count Mode")
|
||||||
if len(modes) == 1:
|
if len(modes) == 1:
|
||||||
f.set_readonly('mode')
|
f.set_widget('mode', forms.widgets.ReadonlyWidget())
|
||||||
|
f.set_default('mode', list(modes)[0])
|
||||||
|
|
||||||
# total_cost
|
# total_cost
|
||||||
if self.creating:
|
if self.creating:
|
||||||
|
|
Loading…
Reference in a new issue