Merge lp:~acsone-openerp/account-financial-tools/account_credit_control_portal_portal_lp1248906 into lp:~account-core-editors/account-financial-tools/7.0

Proposed by Stéphane Bidoul (Acsone)
Status: Work in progress
Proposed branch: lp:~acsone-openerp/account-financial-tools/account_credit_control_portal_portal_lp1248906
Merge into: lp:~account-core-editors/account-financial-tools/7.0
Diff against target: 12 lines (+2/-1)
1 file modified
account_credit_control/security/ir.model.access.csv (+2/-1)
To merge this branch: bzr merge lp:~acsone-openerp/account-financial-tools/account_credit_control_portal_portal_lp1248906
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Fixing
Yannick Vaucher @ Camptocamp Needs Fixing
Pedro Manuel Baeza code review, no test Approve
Review via email: mp+194315@code.launchpad.net

Commit message

[FIX] fix bug in account_credit_control preventing portal user to view their invoices

Description of the change

Here is a proposal to fix an issue preventing portal users to view their invoices.

The fix consists in allowing read access to credit control lines to portal users. The lines remain invisible on screen as the corresponding tab is reserved for specific accout credit control groups.

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM. It's an ugly hack, but for now I don't see better solution. It's up to OpenERP to fix the way account.invoice is queried to avoid giving permissions to all the linked models.

Regards.

review: Approve (code review, no test)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

A cleaner way could be to add this in a link module as you can uninstall portal (auto install but not mandatory).
There isn't any dependancy from account_credit_control on portal

This could be included in a account_credit_control_portal module depending on credit control and portal.

review: Needs Fixing
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

If I understand correctly, this change creates an implicit dependency on portal. While this module is set to autoinstall, we often disable it on our setups. Maybe it would be a slightly less ugly workaround to add the tab with the lines of this particular model in a separate view definition with group_ids set to the manager group?

review: Needs Fixing
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

s/group_ids/groups_id/

Unmerged revisions

125. By Stéphane Bidoul (Acsone)

[FIX] fix bug in account_credit_control preventing portal user to view their invoices

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_credit_control/security/ir.model.access.csv'
--- account_credit_control/security/ir.model.access.csv 2013-07-12 11:57:49 +0000
+++ account_credit_control/security/ir.model.access.csv 2013-11-07 11:02:25 +0000
@@ -18,4 +18,5 @@
18"account_credit_control.ir_model_access_289",0,0,"group_account_credit_control_info","credit_control_info_level","account_credit_control.model_credit_control_policy_level",1,018"account_credit_control.ir_model_access_289",0,0,"group_account_credit_control_info","credit_control_info_level","account_credit_control.model_credit_control_policy_level",1,0
19"account_credit_control.ir_model_access_290",0,0,"account.group_account_user","credit_control_fin_user_line","account_credit_control.model_credit_control_line",1,019"account_credit_control.ir_model_access_290",0,0,"account.group_account_user","credit_control_fin_user_line","account_credit_control.model_credit_control_line",1,0
20"account_credit_control.ir_model_access_291",0,0,"account.group_account_invoice","credit_control_fin_invoice_line","account_credit_control.model_credit_control_line",1,020"account_credit_control.ir_model_access_291",0,0,"account.group_account_invoice","credit_control_fin_invoice_line","account_credit_control.model_credit_control_line",1,0
21"account_credit_control.ir_model_access_292",1,1,"account.group_account_manager","credit_control_fin_manager_line","account_credit_control.model_credit_control_line",1,1
22\ No newline at end of file21\ No newline at end of file
22"account_credit_control.ir_model_access_292",1,1,"account.group_account_manager","credit_control_fin_manager_line","account_credit_control.model_credit_control_line",1,1
23"account_credit_control.ir_model_access_293",0,0,"portal.group_portal","credit_control_line_portal","account_credit_control.model_credit_control_line",1,0
23\ No newline at end of file24\ No newline at end of file

Subscribers

People subscribed via source and target branches