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.

16 lines
508 B

3 years ago
  1. # © 2020 Le Filament (<http://www.le-filament.com>)
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo import api, fields, models
  4. class ProductTempleate(models.Model):
  5. _inherit = "product.template"
  6. is_returnable = fields.Boolean('Est une consigne')
  7. return_product_ids = fields.Many2many(
  8. 'product.product',
  9. 'product_returnable_rel',
  10. 'src_id',
  11. 'dest_id',
  12. domain=[('is_returnable', '=', True)],
  13. string='Consignes')