Tweak form to make editing CORE product possible
may need to allow editing of those fields some day, but not yet
This commit is contained in:
parent
151c6c4bb2
commit
bff34758ce
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2021 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -172,6 +172,22 @@ class ProductView(CoreOfficeMasterView):
|
||||||
f.set_renderer('flags', self.render_flags)
|
f.set_renderer('flags', self.render_flags)
|
||||||
f.set_renderer('user_info', self.render_user_info)
|
f.set_renderer('user_info', self.render_user_info)
|
||||||
|
|
||||||
|
# TODO: these fields are not yet editable; improve later as needed
|
||||||
|
f.set_readonly('department')
|
||||||
|
f.set_readonly('subdepartment')
|
||||||
|
f.set_readonly('tax_rate')
|
||||||
|
f.set_readonly('physical_location')
|
||||||
|
f.set_readonly('default_vendor')
|
||||||
|
f.set_readonly('start_date')
|
||||||
|
f.set_readonly('end_date')
|
||||||
|
f.set_readonly('created')
|
||||||
|
f.set_readonly('modified')
|
||||||
|
f.set_readonly('last_sold')
|
||||||
|
if self.editing:
|
||||||
|
f.remove('vendor_items')
|
||||||
|
f.remove('scale_item')
|
||||||
|
f.remove('user_info')
|
||||||
|
|
||||||
f.set_type('start_date', 'datetime_local')
|
f.set_type('start_date', 'datetime_local')
|
||||||
f.set_type('end_date', 'datetime_local')
|
f.set_type('end_date', 'datetime_local')
|
||||||
f.set_type('last_sold', 'datetime_local')
|
f.set_type('last_sold', 'datetime_local')
|
||||||
|
|
Loading…
Reference in a new issue