Noviat / noviat-apps

6 stars 12 forks source link

[13.0] account_analytic_dimension_policy error on Odoo enterprise(aged partner report) #6

Open celm1990 opened 2 years ago

celm1990 commented 2 years ago

Hi, I tested your module and found issue when try concile from aged partner report

image

https://github.com/Noviat/noviat-apps/blob/13.0/account_analytic_dimension_policy/static/src/js/analytic_dimension_policy.js#L41-L48 this.context.active_model is undefined and call this._rpc model is undefined

image

luc-demeyer commented 2 years ago

@celm1990 I have made a fix for this issue, cf. https://github.com/Noviat/noviat-apps/commit/370e70d0cf297375658401dd09005f9386e59018

Can you test and let me know if it's ok now ?

celm1990 commented 2 years ago

Hi, i tested but now get this error: On Conciliation manual, add manual line, concile and show message when analytic account is not set, try change account and get error

https://user-images.githubusercontent.com/7775116/154966808-834e491e-6e3b-4c9f-bd25-ab41a6118ece.mp4

I see many changes, ples keep minimal changes, only with session.company working fine, bug other changes because?????

luc-demeyer commented 2 years ago

@celm1990 Thanks for the feedback. The 'raise' triggerd by the missing analytic account seems to break the standard Odoo reconcilation widget js code.

I have tested this module primarily by calling the reconcile from a bank statement line. When doing it from that place the Analytic Account becomes a required field and the validate button cannot be clicked unless you complete the dimension. I'll need to find a bit of time why this code fails outside the bank statement (the js ManualLineRenderer inherits from the LineRenderer hence it's probably not too hard to fix it).

Concerning your remark on 'many changes' : those changes come because I needed to fix the code on demand of one of our customers who wanted to configure 'partner_id' as a required dimension on certain accounts, hence the diff contains the fix for that one as well as the issue you have reported.

celm1990 commented 2 years ago

@celm1990 Thanks for the feedback. The 'raise' triggerd by the missing analytic account seems to break the standard Odoo reconcilation widget js code.

I have tested this module primarily by calling the reconcile from a bank statement line. When doing it from that place the Analytic Account becomes a required field and the validate button cannot be clicked unless you complete the dimension. I'll need to find a bit of time why this code fails outside the bank statement (the js ManualLineRenderer inherits from the LineRenderer hence it's probably not too hard to fix it).

Before commit, on reconciliation manual field is shown as required, see image take time ago image

Concerning your remark on 'many changes' : those changes come because I needed to fix the code on demand of one of our customers who wanted to configure 'partner_id' as a required dimension on certain accounts, hence the diff contains the fix for that one as well as the issue you have reported.

It is only my comment, because Odoo/OCA Guideslines say 1 commit for specific cases(1 commit for FIX error and other for new feature). Is only suggestion, thank you for explain me