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.

35 lines
1.0 KiB

  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 fields, models
  5. class PosPaymentChangeWizardOldLine(models.TransientModel):
  6. _name = "pos.payment.change.wizard.old.line"
  7. _description = "PoS Payment Change Wizard Old Line"
  8. wizard_id = fields.Many2one(
  9. comodel_name="pos.payment.change.wizard", required=True,
  10. )
  11. old_journal_id = fields.Many2one(
  12. comodel_name="account.journal",
  13. string="Journal",
  14. required=True,
  15. readonly=True,
  16. )
  17. company_currency_id = fields.Many2one(
  18. comodel_name='res.currency', store=True,
  19. related='old_journal_id.currency_id',
  20. string="Company Currency", readonly=True,
  21. help='Utility field to express amount currency'
  22. )
  23. amount = fields.Monetary(
  24. string="Amount",
  25. required=True,
  26. readonly=True, default=0.0,
  27. currency_field='company_currency_id'
  28. )