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

[12.0] (+16.0 I guess) unable to develop a module that depends on l10n_xx + pos_customer_wallet #320

Open
legalsylvain opened this issue Apr 9, 2024 · 0 comments

Comments

@legalsylvain
Copy link
Contributor

legalsylvain commented Apr 9, 2024

Rational

  • create an empty module that depends on l10n_fr + pos_customer_wallet and install it with demo data;
  • on account_customer_wallet installation : it will create accounting demo data : (account_account_customer_wallet_demo, account_journal_customer_wallet_demo)
  • on l10n_fr installation : it will unlink account and journal created before. See _load_for_current_company code.
  • on pos_custom_wallet : it will fail when loading the file pos_customer_wallet/demo/account_journal_demo.xml
odoo.tools.convert.ParseError: "Cannot update missing record 'account_customer_wallet.account_journal_customer_wallet_demo'" while parsing /home/sylvain/grap_dev/grap-odoo-env-12.0/src/coopiteasy/coopiteasy-addons/pos_customer_wallet/demo/account_journal_demo.xml:7, near
<record id="account_customer_wallet.account_journal_customer_wallet_demo" model="account.journal">
        <field name="journal_user" eval="True"/>
    </record>

Possible solution :

  • Move demo data definition into test_module.py file. (We loose the possibility to test the module out of the box, as functional people should recreate manually data account, journal, etc...)
  • create dedicated "test" module that depends on l10n_generic_coa
  • add a new demo company "Wallet Company" and add accounting stuff in that new company. So when installing l10n_xx module, existing account settings will not be deleted.
legalsylvain added a commit to legalsylvain/coopiteasy-addons that referenced this issue Apr 9, 2024
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

No branches or pull requests

1 participant