I want to create budgets module divided into months in Odoo.
Something like this:
Requirements:
Editable in place, like in Excel. I've used List View and Editable parameter so it is done.
I want to have dynamic number of months. Different budgets have different number of months. Moreover it would be great to add new month to existing budget.
What I know?
I know that it is impossible to have dynamic fields, because tables in database are created earlier.
My solutions:
Solution 1:
I'm setting maximum number of months. For example 36 months. If I need only 4 months I'm hiding remaining 32 fields. I'm creating a button to unhide next hidden column of month.
Solution 2:
I'm making each budget value as object with value, budget line and month. For example in my table above I need first object with:
Month: January 2018
Budget line: Accommodation
Value: 10000
Then I have to build my own view. I'd dont't know if it is good idea. I dont't even know where to start.
Solution 3:
Use/modify some existing module. Maybe "2D matrix for x2many fields" module?
Conclusion:
Please help me with some advise. Any hint will be much appreciated.
PS. I'm using Odoo 11 Enterprise.