From a247d643777c5aa5e3804bb6f07a7ba1d5753d26 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Fri, 7 Feb 2020 13:02:09 +0000 Subject: [PATCH] [MOV] account,sale --> (account,sale)_intrastat: intrastat code. closes odoo/odoo#44858 Related: odoo/enterprise#8277 Signed-off-by: Victor Feyens (vfe) --- addons/account/models/account_move.py | 7 ------- addons/sale/models/account_invoice.py | 9 --------- 2 files changed, 16 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 9b521296c0b..101851e808c 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1838,13 +1838,6 @@ class AccountMove(models.Model): self.ensure_one() return self.partner_id.address_get(['delivery'])['delivery'] - def _get_invoice_intrastat_country_id(self): - ''' Hook allowing to retrieve the intrastat country depending of installed modules. - :return: A res.country record's id. - ''' - self.ensure_one() - return self.partner_id.country_id.id - def _get_cash_basis_matched_percentage(self): """Compute the percentage to apply for cash basis method. This value is relevant only for moves that involve journal items on receivable or payable accounts. diff --git a/addons/sale/models/account_invoice.py b/addons/sale/models/account_invoice.py index 31914ed894c..57c9ef73e69 100644 --- a/addons/sale/models/account_invoice.py +++ b/addons/sale/models/account_invoice.py @@ -103,12 +103,3 @@ class AccountMove(models.Model): # OVERRIDE self.ensure_one() return self.partner_shipping_id.id or super(AccountMove, self)._get_invoice_delivery_partner_id() - - def _get_invoice_intrastat_country_id(self): - # OVERRIDE - self.ensure_one() - if self.is_sale_document(): - intrastat_country_id = self.partner_shipping_id.country_id.id - else: - intrastat_country_id = super(AccountMove, self)._get_invoice_intrastat_country_id() - return intrastat_country_id