can i use write() & create() to test if an model has new records or modified recods
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
2333
Views
Hi MouBou,
Yes, you can use the functions of writing and creating, you leave an example to follow and you can see the data:
import logging
_logger = logging.getLogger(__name__)
class ew_example(models.Model):
_name = 'ew.example
api.model
def create(self, vals):
_logger.info('VALS>>>>>%r',vals)
return super(ew_example, self).create(vals)
@api.multi
def write(self, vals):
_logger.info('VALS>>>>>%r',vals)
return super(ew_example, self).write(vals)
I hope it helps you, regards.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up