3

I want to create budgets module divided into months in Odoo.

Something like this:

Sample budget


Requirements:

  1. Editable in place, like in Excel. I've used List View and Editable parameter so it is done.

  2. 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.

alexander.polomodov
  • 5,396
  • 14
  • 39
  • 46
Daniel
  • 31
  • 1

1 Answers1

0

Alexander,

Here, I suggest you take two fields earlier before creating list view. I those fields first one is for budget and a second one is date field or month and year field.

Then put condition if the second field has value then and then it will create the list and make that list editable so, it works. It might not be the right way but, I think it's temporary work for you. Thanks