Hello,
Im trying to create a button with method when you click on it would create a new row with default values in the tree view maybe there is any examples that i could have a look?
I already got the button just strugling with the function.
Any examples and help would be appreaciated
Thank you,
Why not using the Add Item link? Make the tree view not readonly?
I mean yes add a link is a good example, but what im trying to do is generate lots of date when you click a button with predefined default values.
Check the create_period method in odoo/odoo/addons/account/account.py. It is called from a button in view_account_fiscalyear_form view (odoo/addons/account/account_view.xml)
And if you create without passing any value, it will use all default values.
Ivan thanks very good example!