-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE] forward port of branch saas-6 up to 63e92cb
- Loading branch information
Showing
493 changed files
with
18,736 additions
and
14,338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
- | ||
We create a simple hierarchy like this | ||
Toplevel view account | ||
├ Real analytic account 1 | ||
└ Real analytic account 2 | ||
- | ||
!record {model: account.analytic.account, id: analytic_account_view1}: | ||
name: 'Toplevel view account' | ||
type: 'view' | ||
- | ||
!record {model: account.analytic.account, id: analytic_account1}: | ||
name: 'Real analytic account 1' | ||
type: 'normal' | ||
parent_id: analytic_account_view1 | ||
- | ||
!record {model: account.analytic.account, id: analytic_account2}: | ||
name: 'Real analytic account 2' | ||
type: 'normal' | ||
parent_id: analytic_account_view1 | ||
- | ||
We add analytic lines in real accounts and journal | ||
- | ||
!record {model: account.analytic.journal, id: analytic_journal1}: | ||
name: 'Analytic journal' | ||
- | ||
!record {model: account.analytic.line, id: analytic_line1}: | ||
name: 'Analytic line 1' | ||
account_id: analytic_account1 | ||
journal_id: analytic_journal1 | ||
general_account_id: account.a_expense | ||
- | ||
!record {model: account.analytic.line, id: analytic_line2}: | ||
name: 'Analytic line 2' | ||
account_id: analytic_account2 | ||
journal_id: analytic_journal1 | ||
general_account_id: account.a_expense | ||
- | ||
Now we copy the toplevel account | ||
- | ||
!function {model: account.analytic.account, name: copy, id: analytic_account_view1}: | ||
- eval: "ref('analytic_account_view1')" | ||
- | ||
!python {model: account.analytic.account}: | | ||
# the toplevel account has been copied with the (copy) suffix | ||
accounts = self.search(cr, uid, [('name', 'like', '%Toplevel view account%')]) | ||
assert len(accounts) == 2, 'The toplevel account has not been copied' | ||
accounts = self.search(cr, uid, [('name', '=', 'Toplevel view account')]) | ||
assert len(accounts) == 1, 'The toplevel account copy has a bad name' | ||
# the sub-accounts and sub-accounts have been copied without the (copy) suffix | ||
accounts = self.search(cr, uid, [('name', '=', 'Real analytic account 1')]) | ||
assert len(accounts) == 2, 'The sub-account has not been copied' | ||
accounts = self.search(cr, uid, [('name', '=', 'Real analytic account 2')]) | ||
assert len(accounts) == 2, 'The sub-account has not been copied' | ||
# the analytic lines should not be duplicated | ||
lines = self.pool.get('account.analytic.line').search(cr, uid, [('name', 'like', '%Analytic line %')]) | ||
assert len(lines) == 2, "The analytic lines shouldn't have been copied" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.