Hi
The accountant asks us for a feature in the currency settings (res.currency)
Be enabled by activating an option
Changed currency display
For example, put negative values in parentheses ()
-100=>(-100)
Or if the value was zero
Dash - Display
Has anyone had experience doing this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
2
Respuestas
2616
Vistas
no experience. I don't know technically if currency is the appropriate object for this customization, but maybe you should check the Translation settings as well to find the right object for the customization.
var fields = require('web.basic_fields'); var _formatValue = require('web.AbstractField').prototype._formatValue; var ParenthesesField = fields.FieldMonetary.extend({ className: 'o_field_parentheses', _renderReadonly: function () {
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
jul 25
|
454 | ||
|
0
ene 21
|
2377 | ||
Can't select my currency
Resuelto
|
|
4
sept 16
|
5213 | |
|
1
may 16
|
3716 | ||
|
0
may 25
|
792 |
If I inherit from the FieldMonetary
And override function
"_renderReadonly"
There is still a problem
Only fields that have "widget = monetary"
They will have this feature
var fields = require('web.basic_fields');
var _formatValue = require('web.AbstractField').prototype._formatValue;
var ParenthesesField = fields.FieldMonetary.extend({
className: 'o_field_parentheses',
_renderReadonly: function () {