Avoid "physical location" product field, if underlying table is missing
This commit is contained in:
parent
41ce64b67f
commit
1ec511b60c
|
@ -25,6 +25,7 @@ CORE-POS product views
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from corepos.db.office_op import model as corepos
|
from corepos.db.office_op import model as corepos
|
||||||
|
from corepos.db.util import table_exists
|
||||||
|
|
||||||
from webhelpers2.html import HTML
|
from webhelpers2.html import HTML
|
||||||
|
|
||||||
|
@ -90,6 +91,9 @@ class ProductView(CoreOfficeMasterView):
|
||||||
def configure_form(self, f):
|
def configure_form(self, f):
|
||||||
super(ProductView, self).configure_form(f)
|
super(ProductView, self).configure_form(f)
|
||||||
|
|
||||||
|
if not table_exists(self.Session(), corepos.FloorSection):
|
||||||
|
f.remove('physical_location')
|
||||||
|
|
||||||
f.set_renderer('vendor', self.render_corepos_vendor)
|
f.set_renderer('vendor', self.render_corepos_vendor)
|
||||||
|
|
||||||
f.set_renderer('flags', self.render_flags)
|
f.set_renderer('flags', self.render_flags)
|
||||||
|
|
Loading…
Reference in a new issue