Avoid error for tax field when creating new department

someday should fix that for real..
This commit is contained in:
Lance Edgar 2024-04-11 16:37:55 -05:00
parent de8751b86c
commit aa500351ed

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2023 Lance Edgar # Copyright © 2010-2024 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -111,9 +111,13 @@ class DepartmentView(MasterView):
f.set_type('personnel', 'boolean') f.set_type('personnel', 'boolean')
# tax # tax
f.set_renderer('tax', self.render_tax) if self.creating:
# TODO: make this editable # TODO: make this editable instead
f.set_readonly('tax') f.remove('tax')
else:
f.set_renderer('tax', self.render_tax)
# TODO: make this editable
f.set_readonly('tax')
# default_custorder_discount # default_custorder_discount
f.set_type('default_custorder_discount', 'percent') f.set_type('default_custorder_discount', 'percent')