forked from Mapan/odoo17e
15 lines
407 B
Python
15 lines
407 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
|
|
|
|
class PurchaseOrder(models.Model):
|
|
_inherit = "purchase.order"
|
|
|
|
def _prepare_invoice(self):
|
|
res = super()._prepare_invoice()
|
|
if self.partner_id.country_id.intrastat:
|
|
res["intrastat_country_id"] = self.partner_id.country_id.id
|
|
return res
|