This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
im using odoo 12 for now and i will share about tricks how i did custom development of my odoo ERP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
active = fields.Boolean('Active', default=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this code on server action | |
if record.field: | |
existing_field= env['your_model'].search([('id','!=',record.id),('field','=',record.field)]) | |
if existing_field: | |
raise Warning("your message") |