Skip to content

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

Description

@legalsylvain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions