Add MasterView.render_product(), fix edit for pricing batch row

This commit is contained in:
Lance Edgar 2018-10-23 17:20:47 -05:00
parent b9da7e1b12
commit 2bd107056c
7 changed files with 30 additions and 35 deletions

View file

@ -595,6 +595,9 @@ class BatchMasterView(MasterView):
f.set_readonly('status_code')
f.set_label('status_code', "Status")
# status text
f.set_readonly('status_text')
def configure_mobile_row_form(self, f):
super(BatchMasterView, self).configure_mobile_row_form(f)

View file

@ -138,6 +138,19 @@ class PricingBatchView(BatchMasterView):
def configure_row_form(self, f):
super(PricingBatchView, self).configure_row_form(f)
# readonly fields
f.set_readonly('product')
f.set_readonly('upc')
f.set_readonly('brand_name')
f.set_readonly('description')
f.set_readonly('size')
f.set_readonly('department_number')
f.set_readonly('department_name')
f.set_readonly('vendor')
# product
f.set_renderer('product', self.render_product)
# currency fields
f.set_type('old_price', 'currency')
f.set_type('new_price', 'currency')