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.

18 lines
567 B

  1. # Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
  2. # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, fields, models
  5. class PosOrder(models.Model):
  6. _inherit = 'pos.order'
  7. # Columns section
  8. place_id = fields.Many2one(
  9. string='Place', comodel_name='pos.place')
  10. @api.model
  11. def _order_fields(self, ui_order):
  12. res = super()._order_fields(ui_order)
  13. res['place_id'] = ui_order.get('place_id', False)
  14. return res