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.

50 lines
1.9 KiB

  1. # Copyright 2021 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 SaleAdvancePaymentInv(models.TransientModel):
  5. _inherit = "sale.advance.payment.inv"
  6. # ------------------------------------------------------
  7. # Fields declaration
  8. # ------------------------------------------------------
  9. @api.multi
  10. def _create_invoice(self, order, so_line, amount):
  11. inv = super(SaleAdvancePaymentInv, self)._create_invoice(order, so_line, amount)
  12. inv.write({
  13. 'vracoop_point_retrait_id': order.vracoop_point_retrait_id.id,
  14. 'day_retrait': order.day_retrait,
  15. 'hour_retrait': order.hour_retrait,
  16. 'carrier_point_retrait': order.carrier_point_retrait
  17. })
  18. return inv
  19. # ------------------------------------------------------
  20. # SQL Constraints
  21. # ------------------------------------------------------
  22. # ------------------------------------------------------
  23. # Default methods
  24. # ------------------------------------------------------
  25. # ------------------------------------------------------
  26. # Computed fields / Search Fields
  27. # ------------------------------------------------------
  28. # ------------------------------------------------------
  29. # Onchange / Constraints
  30. # ------------------------------------------------------
  31. # ------------------------------------------------------
  32. # CRUD methods (ORM overrides)
  33. # ------------------------------------------------------
  34. # ------------------------------------------------------
  35. # Actions
  36. # ------------------------------------------------------
  37. # ------------------------------------------------------
  38. # Business methods
  39. # ------------------------------------------------------