Hello guys,
Hi guys i was using Odoo 10, Is there a way to search partner using vat number instead of partner name when creating invoice?
Thanks in advance
Hello guys,
Hi guys i was using Odoo 10, Is there a way to search partner using vat number instead of partner name when creating invoice?
Thanks in advance
Hai Henok Wubet,
class res_partner(models.Model):
_inherit = 'res.partner'
@api.multi
def name_get(self):
res = []
for each in self:
name = each.name
if each.desc:
res.append((each.id, name + '[' + str(each.vat) + ']'))
else:
res.append((each.id, each.name))
return res
thank you.
The Answer is Posted Here
https://stackoverflow.com/questions/45459567/odoo-searching-partner-using-vat-number
this module is work only in odoo V8, You just convert it into 10. then only it works properly.
Is there any way to convert it to odoo10?
and there are too many res_partner.py files on which file should i put the function? or you want me to create a new module based on the code?
Hi i tried your code but i have got this error when i opened sales to invoice
AttributeError: 'res.partner' object has no attribute 'desc'...
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
1
dec. 21
|
4066 | |||
|
1
feb. 17
|
11257 | |||
|
1
mar. 15
|
6394 | |||
|
1
jul. 23
|
4262 | |||
|
0
jul. 22
|
6655 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.