Odoo18-Base/addons/pos_event/models/event_question_answer.py

17 lines
515 B
Python
Raw Permalink Normal View History

2025-01-06 10:57:38 +07:00
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
class EventQuestionAnswer(models.Model):
_name = 'event.question.answer'
_inherit = ['event.question.answer', 'pos.load.mixin']
@api.model
def _load_pos_data_fields(self, config_id):
return ['question_id', 'name', 'sequence']
@api.model
def _load_pos_data_domain(self, data):
return [('question_id', 'in', [quest['id'] for quest in data['event.question']['data']])]