when create one2many wizard with button , the button cannot able to click. Anyone explain.why?
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
Assume that you have
class ClassA
lines: fields.One2many('class.b', ....)
and class ClassB
def action_do_something(self):
...
Now in the form view of class A, you add a new item. What happens? you see a new line of class B in the list but it is only in the browser, it does not exist on server yet. Your button is linked to action_do_something of a not yet exist object of class B. How can you call that function of a not exist object? You can't. You must save object of class A first, so that new object of class B get saved too (actually, it is created). Then you can call its method.
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