summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields_owl.js
AgeCommit message (Collapse)Author
2020-05-07[IMP] web: remove _lt from envAaron Bohy
Having _lt in the env doesn't make much sense, as it is useless at run time, and it would incite people to require 'web.env' to use it (at load time). The env should never be directly imported, it is automatically propagated from parents to children. To sum up, in Owl components: - when terms have to be translated at run time (e.g. in a function called when the user clicks on a button), the env is available and env._t must be used - when terms have to be translated at load time (e.g. a JS module defining a component with a translatable static property), one must require 'web.translation' and use function _lt it exports. closes odoo/odoo#50656 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-05-05[IMP] web: add BadgeField componentAaron Bohy
This new field component displays the field's value inside a bootstrap pill badge. Supported field types are 'char', 'selection' and 'many2one'. The background color of the badge can be customized by using the decoration-xxx mechanism, e.g. <field name="state" decoration-danger="state == 'cancel'" widget="badge"/> Part of task 2195254
2020-03-31[REF] web: convert FieldBoolean to owlMichael Mattiello (mcm)
This commit does 4 things: - adds a file for deprecated legacy fields. - moves legacy FieldBoolean into this file. - converts FieldBoolean to owl component. - adds a new xml file for component fields' templates. task id: 2193996