Show UPC for receiving line item if no product reference
to help with troubleshooting invoice file parsing etc.
This commit is contained in:
parent
38e6441b61
commit
be533922a2
2 changed files with 12 additions and 1 deletions
|
@ -1479,6 +1479,14 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
super(ReceivingBatchView, self).configure_row_form(f)
|
||||
batch = self.get_instance()
|
||||
|
||||
# when viewing a row which has no product reference, enable
|
||||
# the 'upc' field to help with troubleshooting
|
||||
# TODO: this maybe should be optional..?
|
||||
if self.viewing and 'upc' not in f:
|
||||
row = self.get_row_instance()
|
||||
if not row.product:
|
||||
f.append('upc')
|
||||
|
||||
# allow input for certain fields only; all others are readonly
|
||||
mutable = [
|
||||
'invoice_unit_cost',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue