@@ -82,7 +82,7 @@ def _prepare_intrastat_line(self):
82
82
83
83
def _prepare_intrastat_line_country_payment (self , res ):
84
84
self .ensure_one ()
85
- country_payment_id = self .env ["res.country" ]. browse ()
85
+ country_payment_id = self .env ["res.country" ]
86
86
if self .move_id .is_sale_document ():
87
87
country_payment_id = self .move_id .company_id .partner_id .country_id
88
88
if self .move_id .partner_bank_id :
@@ -105,7 +105,7 @@ def _prepare_intrastat_line_payment(self, res):
105
105
106
106
def _prepare_intrastat_line_province_dest (self , company_id , res ):
107
107
self .ensure_one ()
108
- province_destination_id = self .env ["res.country.state" ]. browse ()
108
+ province_destination_id = self .env ["res.country.state" ]
109
109
if self .move_id .is_sale_document ():
110
110
province_destination_id = self .move_id .partner_id .state_id
111
111
elif self .move_id .is_purchase_document ():
@@ -117,7 +117,7 @@ def _prepare_intrastat_line_province_dest(self, company_id, res):
117
117
118
118
def _prepare_intrastat_line_country_dest (self , res ):
119
119
self .ensure_one ()
120
- country_destination_id = self .env ["res.country" ]. browse ()
120
+ country_destination_id = self .env ["res.country" ]
121
121
if self .move_id .is_sale_document ():
122
122
country_destination_id = self .move_id .partner_id .country_id
123
123
elif self .move_id .is_purchase_document ():
@@ -126,7 +126,7 @@ def _prepare_intrastat_line_country_dest(self, res):
126
126
127
127
def _prepare_intrastat_line_province_origin (self , company_id , res ):
128
128
self .ensure_one ()
129
- province_origin_id = self .env ["res.country.state" ]. browse ()
129
+ province_origin_id = self .env ["res.country.state" ]
130
130
if self .move_id .is_sale_document ():
131
131
province_origin_id = (
132
132
company_id .intrastat_sale_province_origin_id
@@ -158,12 +158,12 @@ def _prepare_intrastat_line_country_good_origin(self, res):
158
158
elif self .move_id .is_purchase_document ():
159
159
country_good_origin_id = self .move_id .partner_id .country_id
160
160
else :
161
- country_good_origin_id = self .env ["res.country" ]. browse ()
161
+ country_good_origin_id = self .env ["res.country" ]
162
162
res .update ({"country_good_origin_id" : country_good_origin_id .id })
163
163
164
164
def _prepare_intrastat_line_country_origin (self , res ):
165
165
self .ensure_one ()
166
- country_origin_id = self .env ["res.country" ]. browse ()
166
+ country_origin_id = self .env ["res.country" ]
167
167
if self .move_id .is_sale_document ():
168
168
country_origin_id = self .move_id .company_id .partner_id .country_id
169
169
elif self .move_id .is_purchase_document ():
0 commit comments