Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][IMP] Add subscription journal to account chart template #50

Conversation

DaniilDigtyar
Copy link
Member

Add the subscription journal to the account.chart.template to be created when apply a chart template.

@DaniilDigtyar DaniilDigtyar changed the title [IMP] Add subscription journal to account chart template [14.0][IMP] Add subscription journal to account chart template Jan 31, 2023
Copy link
Contributor

@robinkeunen robinkeunen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DaniilDigtyar the journal is already added in the data.xml.

Test mode
If you launch test twice, Odoo complains with this error :

psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "account_journal_code_company_uniq"
DETAIL:  Key (code, name, company_id)=(SUBJ, Subscription Journal, 1) already exists.

Production mode
This journal won't be installed if account is already installed on the database.

What are you trying to achieve ?

@DaniilDigtyar
Copy link
Member Author

For multi-company journals are created when applied an account.chart.template not by data.xml.

I'm trying to have the subscription journal created in multi-companies that every one use the cooperator, I don't know if for the ´base.company´ we should use the account.chart.template journal creation or the data one.

@robinkeunen
Copy link
Contributor

Hi, if I'm not mistaken, if charts of account are already installed before you install cooperator, the CAO won't be loaded and therefore the subscription journal not created.

You could try to add a post-init hook but I actually think journals for each company should be configured manually (that is removing the journal in data.xml).

WDYT @huguesdk ?

@huguesdk
Copy link
Member

huguesdk commented Jun 9, 2023

indeed, it is a little more complicated than that, as explained here. i created #75 to handle this. thanks @DaniilDigtyar for this proposal, as it gave me a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants