Skip to content

Commit a980538

Browse files
committed
[REF] l10n_it_intrastat: removed superfluous browse()
1 parent 25d6330 commit a980538

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

l10n_it_intrastat/models/account.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _prepare_intrastat_line(self):
8282

8383
def _prepare_intrastat_line_country_payment(self, res):
8484
self.ensure_one()
85-
country_payment_id = self.env["res.country"].browse()
85+
country_payment_id = self.env["res.country"]
8686
if self.move_id.is_sale_document():
8787
country_payment_id = self.move_id.company_id.partner_id.country_id
8888
if self.move_id.partner_bank_id:
@@ -105,7 +105,7 @@ def _prepare_intrastat_line_payment(self, res):
105105

106106
def _prepare_intrastat_line_province_dest(self, company_id, res):
107107
self.ensure_one()
108-
province_destination_id = self.env["res.country.state"].browse()
108+
province_destination_id = self.env["res.country.state"]
109109
if self.move_id.is_sale_document():
110110
province_destination_id = self.move_id.partner_id.state_id
111111
elif self.move_id.is_purchase_document():
@@ -117,7 +117,7 @@ def _prepare_intrastat_line_province_dest(self, company_id, res):
117117

118118
def _prepare_intrastat_line_country_dest(self, res):
119119
self.ensure_one()
120-
country_destination_id = self.env["res.country"].browse()
120+
country_destination_id = self.env["res.country"]
121121
if self.move_id.is_sale_document():
122122
country_destination_id = self.move_id.partner_id.country_id
123123
elif self.move_id.is_purchase_document():
@@ -126,7 +126,7 @@ def _prepare_intrastat_line_country_dest(self, res):
126126

127127
def _prepare_intrastat_line_province_origin(self, company_id, res):
128128
self.ensure_one()
129-
province_origin_id = self.env["res.country.state"].browse()
129+
province_origin_id = self.env["res.country.state"]
130130
if self.move_id.is_sale_document():
131131
province_origin_id = (
132132
company_id.intrastat_sale_province_origin_id
@@ -158,12 +158,12 @@ def _prepare_intrastat_line_country_good_origin(self, res):
158158
elif self.move_id.is_purchase_document():
159159
country_good_origin_id = self.move_id.partner_id.country_id
160160
else:
161-
country_good_origin_id = self.env["res.country"].browse()
161+
country_good_origin_id = self.env["res.country"]
162162
res.update({"country_good_origin_id": country_good_origin_id.id})
163163

164164
def _prepare_intrastat_line_country_origin(self, res):
165165
self.ensure_one()
166-
country_origin_id = self.env["res.country"].browse()
166+
country_origin_id = self.env["res.country"]
167167
if self.move_id.is_sale_document():
168168
country_origin_id = self.move_id.company_id.partner_id.country_id
169169
elif self.move_id.is_purchase_document():

0 commit comments

Comments
 (0)