Make some product fields readonly
This commit is contained in:
parent
7ad2ec48f0
commit
aa13cbfa07
|
@ -276,7 +276,8 @@ class ProductsView(MasterView):
|
|||
renderer=forms.renderers.EnumFieldRenderer(self.enum.UNIT_OF_MEASURE))
|
||||
fs.regular_price.set(renderer=forms.renderers.PriceFieldRenderer, readonly=True)
|
||||
fs.current_price.set(renderer=forms.renderers.PriceFieldRenderer, readonly=True)
|
||||
fs.append(fa.Field('current_price_ends', type=fa.types.DateTime,
|
||||
fs.last_sold.set(readonly=True)
|
||||
fs.append(fa.Field('current_price_ends', type=fa.types.DateTime, readonly=True,
|
||||
value=lambda p: p.current_price.ends if p.current_price else None))
|
||||
|
||||
def configure_fieldset(self, fs):
|
||||
|
|
Loading…
Reference in a new issue