I would like to create a tag such as "blind dropship" that would represent a partner that we are not supposed to contact, but that we just ship to for another reseller. Upon selecting "blind dropship" as the tag, I would like the opt-out to become true, and the customer and supplier checkboxes to become false. Is this possible?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
4597
Widoki
Hi,
must be create a new module inherit of res.partner
for add a onchange() methode
to category_id field.
in your file.xml
<field name="category_id"
on_change="onchange_category(category_id)"
widget="many2many_tags" placeholder="Tags..."/>
in your file.py
def onchange_category(self, cr, uid, ids, value):
for category_id in value[0][2] :
category_name = self.pool.get('res.partner.category').browse(cr, uid, category_id).name
if category_name == 'blind dropship' :
return {'value':{'customer':False,'supplier':False,'opt_out':True}}
break
return {}
Thank you.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
mar 16
|
4818 | ||
|
0
lis 23
|
1333 | ||
|
3
lut 18
|
3955 | ||
|
0
mar 16
|
3145 | ||
|
1
mar 15
|
4005 |