| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
|
| 3 |
from odoo import api, models |
| 4 |
|
| 5 |
|
| 6 |
class ProductComboItem(models.Model): |
| 7 |
_name = 'product.combo.item' |
| 8 |
_inherit = ['product.combo.item', 'pos.load.mixin'] |
| 9 |
|
| 10 |
@api.model |
| 11 |
def _load_pos_data_domain(self, data, config): |
| 12 |
return [('id', 'in', list(set().union(*[combo.get('combo_item_ids') for combo in data['product.combo']])))] |
| 13 |
|
| 14 |
@api.model |
| 15 |
def _load_pos_data_fields(self, config): |
| 16 |
return ['id', 'combo_id', 'product_id', 'extra_price'] |