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