its may be a silly question..i need to override the save button in WAREHOUSE->DELIVERY ORDERS->PRODUCT INLINE but unfortunately i couldn't find the create function file .can anyone help me to find the file
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
When you click on Save button it calls two methods.
create
: When you are creating a new record.'write': When you are updating a record.
You can override these two methods by inherit the object.
class stock_picking_out(osv.Model): _inherit = 'stock.picking.out' def create(cr, uid, vals, context=None): #your code res_id = super(stock_picking_out, self).create(cr, uid, vals, context=context) #your code return res_id def write(cr, uid, ids, vals, context=None): #your code super(stock_picking_out, self).wite(cr, uid, ids, vals, context=context) #your code return True
This is how you can override the methods.
If you want to see these methods in server here: def create and def write
Sudhir's answer is unfortunately wrong.
The "Save" does NOT call write if there was no change!
What is the correct answer?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Aug 20
|
4260 | ||
|
1
Aug 15
|
4686 | ||
|
0
Mar 15
|
4076 | ||
|
1
Mar 21
|
6726 | ||
|
0
Jan 21
|
583 |