Guys I need to resolve a very serious issue.
My aim is to print the value in computing fields for example if both warning rise then print both values in computing fields. I can print one warning in print but unable to print both value.
how can i Make list to print both value?
@ api.onchange ( 'noo_brand_id' , 'brand_id' , 'customer_box_code' , 'noo_box_code' ,)def compute_fields ( self ):
list = [ 'a' ]
if self .brand_id:
# brand = list
if self .noon_brand_id! = self .brand_id:
brand = {'warning' : { 'title' :( 'warning' ), 'message' :( 'Brand is not machted' ), }}
list.append (brand)
return brandif self .customer_box_code:print ( 'this print is outside of the if' , list)
if self .noon_box_code! = self .customer_box_code:
box = { 'warning' : {
'title' : ( 'warning' ),
'message' : ( 'box code is not matched' ),
}}
print (box [ 'warning' ] [ 'message' ])
list.append (box)
print ( 'this print inside of the if' , list)
# self.warning_brand_id = box ['warning'] ['message']
return box
Show DialogBox: https://goo.gl/6P7aR1