fix trigger on none
This commit is contained in:
parent
62c57e9447
commit
dfd53d296a
|
|
@ -1107,7 +1107,11 @@ class StockItem(
|
||||||
|
|
||||||
item.add_tracking_entry(code, user, deltas, notes=notes)
|
item.add_tracking_entry(code, user, deltas, notes=notes)
|
||||||
|
|
||||||
trigger_event('stockitem.assignedtocustomer', id=self.id, customer=customer.id)
|
trigger_event(
|
||||||
|
'stockitem.assignedtocustomer',
|
||||||
|
id=self.id,
|
||||||
|
customer=customer.id if customer else None,
|
||||||
|
)
|
||||||
|
|
||||||
# Return the reference to the stock item
|
# Return the reference to the stock item
|
||||||
return item
|
return item
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue