Close fiscal year wizard usable for a multi company database
The "Close a fiscal year" wizard doesn't allow to do a closure in a multi company database.
People normally use record rules to show only the account of their company, and that's a problem when this wizard wants to access an account of another company. So, I added these lines in the wizard to access only the account from the company of the user and now I can do my closure in a multi company database.
Maybe there is already a solution in OpenERP 5 like that or maybe there should be one. This is usable too for a single company database.
+++ /home/andre/
@@ -75,6 +75,11 @@
ids = map(lambda x: x[0], cr.fetchall())
+ #we give a new value to ids which are only the account that belong to the user company
+ user = pool.get(
+ ids = pool.get(
for account in pool.get(
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by