Base Amount To Text
This module allows defining method "amount to text" as python code. The method can be registered for each languanges or currencies.
To install this module, you need to:
- Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-server-tools
- Add the path to this repository in your configuration (addons-path)
- Update the module list
- Go to menu Setting -> Modules -> Local Modules
- Search For Base Amount To Text
- Install the module
To use this module, you need to:
- Go to menu Setting -> Translations -> Languanges or Go to menu Accounting -> Miscellaneous -> Currencies
- Edit or create one.
- There will be a new field named Amount To Text
- Click add an item
- There will be a new field named Python Definition for Method Amount To Text
- Fill this field with a python code
- To call the method use <model:base.amount_to_text>.amount_to_text(value)
... obj_base_amount2text = self.env['base.amount_to_text'] obj_res_currency = self.env['res.currency'] obj_res_lang = self.env['res.lang'] lang = self.obj_res_lang.search( [('code', '=', 'en_US')]) curr = self.obj_res_currency.search( [('name', '=', 'IDR')]) amount2text = self.obj_amount2text.search([ ('currency_id', '=', curr.id), ('lang_id', '=', lang.id)]) result = amount2text.amount_to_text(self.amount_total) ...
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.