Hopefully fix "single store" behavior when make a new ordering batch
this does seem to fix for this use case, but previous commit for this code implied that it was fixing something for the receiving use case...
This commit is contained in:
parent
937c2920ac
commit
5cfe69d24b
|
@ -254,15 +254,12 @@ class PurchasingBatchView(BatchMasterView):
|
|||
f.replace('store', 'store_uuid')
|
||||
if single_store:
|
||||
store = self.rattail_config.get_store(self.Session())
|
||||
f.set_widget('store_uuid', forms.widgets.ReadonlyWidget())
|
||||
f.set_widget('store_uuid', dfwidget.HiddenWidget())
|
||||
f.set_default('store_uuid', store.uuid)
|
||||
f.set_hidden('store_uuid')
|
||||
else:
|
||||
f.set_widget('store_uuid', dfwidget.SelectWidget(values=self.get_store_values()))
|
||||
f.set_label('store_uuid', "Store")
|
||||
else:
|
||||
if single_store:
|
||||
f.remove_field('store')
|
||||
else:
|
||||
f.set_readonly('store')
|
||||
f.set_renderer('store', self.render_store)
|
||||
|
|
Loading…
Reference in a new issue