You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
722 B

  1. # Copyright 2018 Lambda IS DOOEL <https://www.lambda-is.com>
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import api, models
  4. class PosOrderLine(models.Model):
  5. _inherit = 'pos.order.line'
  6. @api.model
  7. def _order_line_fields(self, line, session_id=None):
  8. line = super(PosOrderLine, self)._order_line_fields(
  9. line, session_id=session_id)
  10. if line and 'reward_id' in line[2]:
  11. # Delete the key since field doesn't exist
  12. # and raises a warning in the logs.
  13. # TODO: add field and remove this if data will be
  14. # used on server, example in report / widget.
  15. del line[2]['reward_id']
  16. return line