Replies: 6 comments
-
This opening move field is relatively new (Odoo 11). Is there Official documentation from Odoo about it (to be sure on the right way to use it in calculations)? |
Beta Was this translation helpful? Give feedback.
-
I thought you were joking so I had a good laugh. Then I realized you were serious and I cried a little. So (of course) I couldn't find any documentation, even though you can find reference to account_opening_move_id or its associated method opening_move_posted(), both members of res.company object. But interestingly, nowhere in the enterprise reports. For whatever it's worth, I can tell you that the field does not appear in any view. From experience, the only way to have any effect on this field is to go through the accounting setup wizard. In any case, should we play the devil's advocate and say this concept is useless, wouldn't I be forced to record the initial balance for 2019 with a date of 31.12.2018? |
Beta Was this translation helpful? Give feedback.
-
Eh eh let's say I was not in a mood to play the guess-what-the-mighty-powers-who-design-odoo-intended game this morning. I've not investigated in very much details... it seems to be used in account.account.opening_debit/credit but those in turn do not seem to be used in any report either so... Anyway, the opening balance is the same as the closing balance on the previous day no? So recording it on 2018-12-31 works just fine. |
Beta Was this translation helpful? Give feedback.
-
You are right about adjusting the date. I guess I didn't convince you. What makes me a bit disappointed is that it turns out Odoo did something very elegant - perhaps totally by accident - to mimic how real accountants work. Every time I train an accountant on Odoo and ask them to enter the opening balance, they will put it on the first day of the year. That's the natural thing for them. Otherwise it would make more sense to ask for the "closing balance of the previous fiscal year". Anyway I guess you can close the issue, I will find a workaround on my side. Thanks a bunch. |
Beta Was this translation helpful? Give feedback.
-
Let's keep this open for future reference. The point is not really to convince me. The important thing is that the balance calculations in MIS Builder must be exactly the same as in Odoo (enterprise) and other OCA financial reports. So before changing MIS Builder we need to understand exactly how Odoo uses this opening move in balance calculations. If it appears it's used nowhere in Odoo CE nor EE and users are confused about it, then I guess the next step is opening an issue at Odoo under an enterprise contract to try and understand better what's going on there. |
Beta Was this translation helpful? Give feedback.
-
I totally understand your point. I wasn't thinking about coherence between reports on the Odoo and OCA side. I can see now that is not going to be an easy undertaking. I will try to open an issue with Odoo, but I will prepare screenshots for them to be as clear as possible. Thanks for your time as always. |
Beta Was this translation helpful? Give feedback.
-
Hi Stephane,
Just sharing my two cents with you before sending you a pull request because there's a slight chance I am only encountering this issue because I am doing something else wrong.
When I take over the accounting of a company in Odoo, I set the opening balance using the Odoo wizard, which assigns this initial move to the account_opening_move_id of the res.company object. If I were to take over the accounting as of 2019, I would set the date on the move to 01.01.2019.
When I use MIS Builder and ask for an expression of type bali for the year 2019, it comes up as 0. That is because around line 281 of aep.py, there is a domain restriction on the move lines of date < date_from for computation of initial balance. So my opening move is not included in the initial balance.
In my own reports, I always deal with opening balance as anything prior to the date specified + the account_opening_move_id.
In the case of MIS Builder, solving this is "easy", in a sense that you can just add to the domain to take this move into account. The problem is that the notion of company is kind of fuzzy in that part of the code, as exemplified by the comment
TODO this takes the fy from the first company
make that user controllable (nice to have)?
I am proposing to take into account account_opening_line_id only in the case where len(self.companies) == 1. It's just a cop-out until a better company management is available.
I would greatly appreciate your thoughts on the idea.
Kind regards,
Stephane
Beta Was this translation helpful? Give feedback.
All reactions