Odoo18-Base/addons/l10n_sa_pos/models/pos_order.py
2025-01-06 10:57:38 +07:00

15 lines
416 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class POSOrder(models.Model):
_inherit = 'pos.order'
def _prepare_invoice_vals(self):
vals = super()._prepare_invoice_vals()
if self.company_id.country_id.code == 'SA':
vals.update({'l10n_sa_confirmation_datetime': self.date_order})
return vals