Technical Information¶
Change settings using CLI¶
To change Odoo settings using CLI, run the Odoo CLI shell by adding
shellto your original command line to start Odoo.Such as
./odoo-bin shell --addons-path=./addons,{custom_addons_path}/tops -u payment_taler -d odoo18_tops_0.1.1.1.
Run these commands to edit the settings. You can use
get_paramsto print the current value, andset_paramsto set a new value:env['ir.config_parameter'].set_param('payment_taler.taler_merchant_url', 'https://backend.demo.taler.net/instances/sandbox/')env['ir.config_parameter'].set_param('payment_taler.taler_merchant_password', 'sandbox')
Warning
You need to commit the changes to the database before closing the shell instance and restarting Odoo:
env.cr.commit()exit()
Editing rights to the payment provider settings¶
As with other payment providers, Odoo users will have limited access to the Taler payment provider settings.
Only user that belong in the
base.group_systemuser group will be able to access and modify the Taler payment provider settings.
Run unit tests¶
To run unit tests on a new db, use this command:
./odoo-bin --addons-path=./addons,{custom_addons_path}/tops --test-enable -d test_db_2 -i payment_taler -u payment_taler --stop-after-init --test-tags talerThe db name (after -d) is arbitrary and can be replaced by any other names.
In the results logs, you should expect to see
odoo.tests.result: 0 failed, 0 error(s) of x tests when loading database.x is the number of unit tests, currently 11.
Folder structure¶
This add-on uses a standard folder structure:
controllerscontains the controllers used by the add-on.datacontains setup data that is processed when someone installs the add-on, as well as email templates.i18ncontains the data for localization and translation.modelscontains the Odoo models. There are 4 models:taler_api_method, which contains the methods used to communicate to the Taler merchant API.taler_invoicing, which contains the methods used when creating invoices with Taler.taler_provider, which contains the methods used by the Taler payment provider.taler_transaction, which contains the methods used to complete a transaction with Taler.
securitycontains the (unused)ir.moder.access.csvfile to manage access rights.staticcontains logo data and other image assets for the add-on.testscontains unit tests for this project.utilscontains utility methods (such as logging).viewscontains the views used for the models.