Add issue10680.diff [product] Fix get_template in reference field case
This commit is contained in:
parent
82bc0e967a
commit
dbc0f4db36
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/product.py b/product.py
|
||||||
|
--- a/trytond/trytond/modules/product/product.py
|
||||||
|
+++ b/trytond/trytond/modules/product/product.py
|
||||||
|
@@ -282,6 +282,10 @@ class Product(
|
||||||
|
|
||||||
|
def get_template(self, name):
|
||||||
|
value = getattr(self.template, name)
|
||||||
|
+ if getattr(self.__class__, name)._type == 'reference':
|
||||||
|
+ if value:
|
||||||
|
+ return str(value)
|
||||||
|
+ return value
|
||||||
|
if isinstance(value, Model):
|
||||||
|
return value.id
|
||||||
|
elif (isinstance(value, (list, tuple))
|
2
series
2
series
|
@ -104,3 +104,5 @@ issue9122.diff # [stock_supply] Add cron job to supply stock
|
||||||
issue10500.diff # [account_invoice] Fix msg_invoice_same_account_line variables name
|
issue10500.diff # [account_invoice] Fix msg_invoice_same_account_line variables name
|
||||||
|
|
||||||
issue9049-issue4050.diff # [purchase] Add origin and set on returned purchase + Add return wizard
|
issue9049-issue4050.diff # [purchase] Add origin and set on returned purchase + Add return wizard
|
||||||
|
|
||||||
|
issue10680.diff # [product] Fix get_template in reference field case
|
Loading…
Reference in New Issue