| 1 |
from odoo import api, fields, models |
| 2 |
|
| 3 |
|
| 4 |
class UomUom(models.Model): |
| 5 |
_name = 'uom.uom' |
| 6 |
_inherit = ['uom.uom', 'pos.load.mixin'] |
| 7 |
|
| 8 |
is_pos_groupable = fields.Boolean(string='Group Products in POS', help="Check if you want to group products of this unit in point of sale orders") |
| 9 |
|
| 10 |
@api.model |
| 11 |
def _load_pos_data_fields(self, config): |
| 12 |
taxes = self.env['account.tax'].search(self.env['account.tax']._check_company_domain(config.company_id.id)) |
| 13 |
product_uom_fields = taxes._eval_taxes_computation_prepare_product_uom_fields() |
| 14 |
return list(product_uom_fields.union({'id', 'name', 'factor', 'is_pos_groupable', 'parent_path', 'rounding'})) |