I'm trying to prevent users from creating duplicate customers, how can i do this for Odoo 8?
Thank you.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I'm trying to prevent users from creating duplicate customers, how can i do this for Odoo 8?
Thank you.
Here is the example.
# An old way
def copy(self, cr, uid, id, default=None, context=None):
raise osv.except_osv(_('Warning!'), _('You are not allowed to duplicate this!!!'))
And
# for new api
@api.one
def copy(self, default=None):
raise UserError(_('You are not allowed to duplicate this!!!'))
enjoy!
Thank you, Jusab.
Create an account today to enjoy exclusive features and engage with our awesome community!
Реєстрація| Related Posts | Відповіді | Переглядів | Дія | |
|---|---|---|---|---|
|
0
груд. 23
|
1492 | |||
|
1
лист. 21
|
7729 | |||
|
3
серп. 20
|
6248 | |||
|
1
черв. 20
|
2917 | |||
|
3
груд. 19
|
10043 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Is it ok to add unique constraint on customer name + email ?