odoo-addon-l10n-it-bill-of-entry 16.0.1.0.2__py3-none-any.whl → 16.0.1.0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ ITA - Bolle doganali
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:3f8183fa9cd01b3ee24af0e29dc9854c7f9ecbf0bef5e6eb3234fecf0a0f96c5
10
+ !! source digest: sha256:4b5e4ea6b0a95d75a37e030e47545ce5def73b288487ca3e4ead528fc56c921a
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -9,7 +9,7 @@
9
9
 
10
10
  {
11
11
  "name": "ITA - Bolle doganali",
12
- "version": "16.0.1.0.2",
12
+ "version": "16.0.1.0.3",
13
13
  "category": "Localization/Italy",
14
14
  "author": "Agile Business Group, CQ Creativi Quadrati, TAKOBI, "
15
15
  "Odoo Community Association (OCA)",
@@ -21,8 +21,8 @@ msgstr ""
21
21
  #: model_terms:ir.ui.view,arch_db:l10n_it_bill_of_entry.view_boe_config_settings
22
22
  msgid ""
23
23
  "<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
24
- "specific.\" aria-label=\"Values set here are company-specific.\" groups="
25
- "\"base.group_multi_company\" role=\"img\"/>"
24
+ "specific.\" aria-label=\"Values set here are company-specific.\" "
25
+ "groups=\"base.group_multi_company\" role=\"img\"/>"
26
26
  msgstr ""
27
27
  "<span class=\"fa fa-lg fa-building-o\" title=\"I valori impostati qui sono "
28
28
  "specifici per azienda.\" aria-label=\"I valori impostati qui sono specifici "
@@ -39,6 +39,7 @@ msgid "Advance Customs Vat"
39
39
  msgstr "IVA dogana anticipata"
40
40
 
41
41
  #. module: l10n_it_bill_of_entry
42
+ #: model:ir.model.fields,field_description:l10n_it_bill_of_entry.field_account_move_line__bill_of_entry_id
42
43
  #: model:ir.model.fields.selection,name:l10n_it_bill_of_entry.selection__account_move__customs_doc_type__bill_of_entry
43
44
  msgid "Bill of Entry"
44
45
  msgstr "Bolla doganale"
@@ -147,8 +148,8 @@ msgstr "Spese dogana"
147
148
  #. odoo-python
148
149
  #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
149
150
  #, python-format
150
- msgid "Customs supplier"
151
- msgstr "Fornitore dogana"
151
+ msgid "Customs supplier %s"
152
+ msgstr ""
152
153
 
153
154
  #. module: l10n_it_bill_of_entry
154
155
  #: model:product.template,name:l10n_it_bill_of_entry.product_product_delivery_product_template
@@ -243,6 +244,20 @@ msgstr "Nessun registro per storno della bolla doganale configurato"
243
244
  msgid "No bill of entries found for this invoice"
244
245
  msgstr "Nessuna bolla doganale trovata per questa fattura"
245
246
 
247
+ #. module: l10n_it_bill_of_entry
248
+ #. odoo-python
249
+ #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
250
+ #, python-format
251
+ msgid "No bill of entry lines to reconcile"
252
+ msgstr ""
253
+
254
+ #. module: l10n_it_bill_of_entry
255
+ #. odoo-python
256
+ #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
257
+ #, python-format
258
+ msgid "No storno lines to reconcile"
259
+ msgstr ""
260
+
246
261
  #. module: l10n_it_bill_of_entry
247
262
  #. odoo-python
248
263
  #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
@@ -326,6 +341,10 @@ msgstr ""
326
341
  "È possibile generare la bolla doganale solamente da una fattura fornitore "
327
342
  "extra UE"
328
343
 
344
+ #, python-format
345
+ #~ msgid "Customs supplier"
346
+ #~ msgstr "Fornitore dogana"
347
+
329
348
  #, python-format
330
349
  #~ msgid "Bill of entry %s is in state %s"
331
350
  #~ msgstr "La bolla doganale %s è nello stato %s"
@@ -32,6 +32,7 @@ msgid "Advance Customs Vat"
32
32
  msgstr ""
33
33
 
34
34
  #. module: l10n_it_bill_of_entry
35
+ #: model:ir.model.fields,field_description:l10n_it_bill_of_entry.field_account_move_line__bill_of_entry_id
35
36
  #: model:ir.model.fields.selection,name:l10n_it_bill_of_entry.selection__account_move__customs_doc_type__bill_of_entry
36
37
  msgid "Bill of Entry"
37
38
  msgstr ""
@@ -140,7 +141,7 @@ msgstr ""
140
141
  #. odoo-python
141
142
  #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
142
143
  #, python-format
143
- msgid "Customs supplier"
144
+ msgid "Customs supplier %s"
144
145
  msgstr ""
145
146
 
146
147
  #. module: l10n_it_bill_of_entry
@@ -236,6 +237,20 @@ msgstr ""
236
237
  msgid "No bill of entries found for this invoice"
237
238
  msgstr ""
238
239
 
240
+ #. module: l10n_it_bill_of_entry
241
+ #. odoo-python
242
+ #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
243
+ #, python-format
244
+ msgid "No bill of entry lines to reconcile"
245
+ msgstr ""
246
+
247
+ #. module: l10n_it_bill_of_entry
248
+ #. odoo-python
249
+ #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
250
+ #, python-format
251
+ msgid "No storno lines to reconcile"
252
+ msgstr ""
253
+
239
254
  #. module: l10n_it_bill_of_entry
240
255
  #. odoo-python
241
256
  #: code:addons/l10n_it_bill_of_entry/models/account_move.py:0
@@ -172,11 +172,12 @@ class AccountMove(models.Model):
172
172
  )
173
173
  boe_account = first(boe_payable_lines).account_id
174
174
  line_vals = {
175
- "name": _("Customs supplier"),
175
+ "name": _("Customs supplier %s", bill_of_entry.name),
176
176
  "account_id": first(boe_account).id,
177
177
  "debit": bill_of_entry.amount_total,
178
178
  "credit": 0.0,
179
179
  "partner_id": bill_of_entry.partner_id.id,
180
+ "bill_of_entry_id": bill_of_entry.id,
180
181
  }
181
182
  move_lines.append((0, 0, line_vals))
182
183
  for boe_line in bill_of_entry.invoice_line_ids.filtered(
@@ -204,20 +205,23 @@ class AccountMove(models.Model):
204
205
 
205
206
  def _reconcile_bill_of_entry_storno(self, move):
206
207
  self.ensure_one()
207
- reconcile_ids = []
208
- for move_line in move.line_ids:
209
- line_account = move_line.account_id
210
- for boe in self.forwarder_bill_of_entry_ids:
211
- boe_payable_lines = boe.line_ids.filtered(
212
- lambda line: line.account_type == "liability_payable"
213
- )
214
- boe_account = first(boe_payable_lines).account_id
215
- if line_account == boe_account:
216
- reconcile_ids.append(move_line.id)
217
- for boe_move_line in boe.line_ids:
218
- if boe_move_line.account_id == boe_account:
219
- reconcile_ids.append(boe_move_line.id)
220
- return self.env["account.move.line"].browse(reconcile_ids).reconcile()
208
+ move_line_ids = move.line_ids.filtered(
209
+ lambda line: line.account_type == "liability_payable"
210
+ )
211
+ if not move_line_ids:
212
+ raise UserError(_("No storno lines to reconcile"))
213
+ for move_line in move_line_ids:
214
+ reconcile_ids = []
215
+ reconcile_ids.append(move_line.id)
216
+ boe_line_ids = move_line.bill_of_entry_id.line_ids.filtered(
217
+ lambda boe_line,
218
+ move_line_account=move_line.account_id: boe_line.account_id
219
+ == move_line_account
220
+ )
221
+ if not boe_line_ids:
222
+ raise UserError(_("No bill of entry lines to reconcile"))
223
+ reconcile_ids.extend(boe_line_ids.ids)
224
+ self.env["account.move.line"].browse(reconcile_ids).reconcile()
221
225
 
222
226
  def action_post(self):
223
227
  res = super().action_post()
@@ -300,3 +304,10 @@ class AccountMoveLine(models.Model):
300
304
  _inherit = "account.move.line"
301
305
 
302
306
  advance_customs_vat = fields.Boolean()
307
+ bill_of_entry_id = fields.Many2one(
308
+ "account.move",
309
+ string="Bill of Entry",
310
+ readonly=True,
311
+ copy=False,
312
+ domain="[('customs_doc_type', '=', 'bill_of_entry')]",
313
+ )
@@ -367,7 +367,7 @@ ul.auto-toc {
367
367
  !! This file is generated by oca-gen-addon-readme !!
368
368
  !! changes will be overwritten. !!
369
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:3f8183fa9cd01b3ee24af0e29dc9854c7f9ecbf0bef5e6eb3234fecf0a0f96c5
370
+ !! source digest: sha256:4b5e4ea6b0a95d75a37e030e47545ce5def73b288487ca3e4ead528fc56c921a
371
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
372
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_bill_of_entry"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_bill_of_entry"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <p>This module enables to manage extraUE import purchases, generating a
@@ -171,6 +171,22 @@ class TestBillOfEntry(AccountTestInvoicingCommon):
171
171
  bill_of_entry_form.supplier_invoice_ids.add(self.supplier_invoice)
172
172
  bill_of_entry_form.save()
173
173
 
174
+ # Bill of Entry 2 - draft state
175
+ self.bill_of_entry_2 = self._create_invoice(
176
+ self.customs,
177
+ "bill_of_entry",
178
+ self.journal,
179
+ [
180
+ (self.product_extra, 1, 1000),
181
+ (self.product_extra, 1, 100),
182
+ ],
183
+ [],
184
+ )
185
+ bill_of_entry_2_form = Form(self.bill_of_entry_2)
186
+ bill_of_entry_2_form.supplier_invoice_ids.clear()
187
+ bill_of_entry_2_form.supplier_invoice_ids.add(self.supplier_invoice)
188
+ bill_of_entry_2_form.save()
189
+
174
190
  # Forwarder Invoice - draft state
175
191
  self.forwarder_invoice = self._create_invoice(
176
192
  self.forwarder,
@@ -178,7 +194,7 @@ class TestBillOfEntry(AccountTestInvoicingCommon):
178
194
  self.journal,
179
195
  [
180
196
  (self.product_delivery, 1, 300),
181
- (self.adv_customs_expense, 1, 550),
197
+ (self.adv_customs_expense, 1, 792),
182
198
  ],
183
199
  [],
184
200
  )
@@ -192,7 +208,9 @@ class TestBillOfEntry(AccountTestInvoicingCommon):
192
208
  )
193
209
  self.forwarder_invoice.update(
194
210
  {
195
- "forwarder_bill_of_entry_ids": [(4, self.bill_of_entry.id)],
211
+ "forwarder_bill_of_entry_ids": [
212
+ (6, 0, [self.bill_of_entry.id, self.bill_of_entry_2.id])
213
+ ],
196
214
  }
197
215
  )
198
216
 
@@ -238,8 +256,9 @@ class TestBillOfEntry(AccountTestInvoicingCommon):
238
256
  self.assertEqual(bill_of_entry.state, "draft")
239
257
 
240
258
  def test_storno_create(self):
241
- # Validate bill of entry
259
+ # Validate bills of entry
242
260
  self.bill_of_entry.action_post()
261
+ self.bill_of_entry_2.action_post()
243
262
 
244
263
  # Validate forwarder invoice
245
264
  self.forwarder_invoice.action_post()
@@ -275,7 +294,11 @@ class TestBillOfEntry(AccountTestInvoicingCommon):
275
294
  self.assertEqual(len(customs_expense_moveline), 1)
276
295
 
277
296
  # Extra EU goods purchase account.move.lines
278
- for boe_line in self.bill_of_entry.invoice_line_ids:
297
+ boes_lines = self.bill_of_entry.line_ids + self.bill_of_entry_2.line_ids
298
+ invoice_line_ids = boes_lines.filtered(
299
+ lambda line: line.display_type == "product"
300
+ )
301
+ for boe_line in invoice_line_ids:
279
302
  move_line_domain = [
280
303
  ("account_id", "=", boe_line.account_id.id),
281
304
  ("debit", "=", 0.0),
@@ -292,9 +315,11 @@ class TestBillOfEntry(AccountTestInvoicingCommon):
292
315
  .mapped("full_reconcile_id")
293
316
  .ids
294
317
  )
318
+ self.assertEqual(len(storno_reconcile_ids), 2)
295
319
  boe_reconcile_ids = (
296
- self.bill_of_entry.line_ids.filtered(lambda line: line.full_reconcile_id)
320
+ boes_lines.filtered(lambda line: line.full_reconcile_id)
297
321
  .mapped("full_reconcile_id")
298
322
  .ids
299
323
  )
324
+ self.assertEqual(len(boe_reconcile_ids), 2)
300
325
  self.assertEqual(sorted(storno_reconcile_ids), sorted(boe_reconcile_ids))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-l10n_it_bill_of_entry
3
- Version: 16.0.1.0.2
3
+ Version: 16.0.1.0.3.1
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo>=16.0a,<16.1dev
6
6
  Summary: ITA - Bolle doganali
@@ -22,7 +22,7 @@ ITA - Bolle doganali
22
22
  !! This file is generated by oca-gen-addon-readme !!
23
23
  !! changes will be overwritten. !!
24
24
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25
- !! source digest: sha256:3f8183fa9cd01b3ee24af0e29dc9854c7f9ecbf0bef5e6eb3234fecf0a0f96c5
25
+ !! source digest: sha256:4b5e4ea6b0a95d75a37e030e47545ce5def73b288487ca3e4ead528fc56c921a
26
26
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
27
 
28
28
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,23 +1,23 @@
1
- odoo/addons/l10n_it_bill_of_entry/README.rst,sha256=8mHjxgWryspkx7a6dm-nNP9ttrUDyh9q0S9Eg2Vf6pM,7212
1
+ odoo/addons/l10n_it_bill_of_entry/README.rst,sha256=7yxfSPUwCc7os7E0zsHFCpAMZcoxdqjd3U_caQldWOA,7212
2
2
  odoo/addons/l10n_it_bill_of_entry/__init__.py,sha256=eShEGRadAlxopoLqIQ4-N42FM7MWPSuBe0h_l1cXTPM,87
3
- odoo/addons/l10n_it_bill_of_entry/__manifest__.py,sha256=3g3or8uXvmSid1xWlaDG6SpcYJAzFhopA4fbomHvroQ,1054
3
+ odoo/addons/l10n_it_bill_of_entry/__manifest__.py,sha256=CNnCNYMnX720sJ_lJkKZ6H69m0j_JgZl6rYyo3r50hg,1054
4
4
  odoo/addons/l10n_it_bill_of_entry/demo/bill_of_entry_demo.xml,sha256=WCxPeUlDUuZHSFv4gxegvLbIruqbGESNw-QjdVe_XoA,5903
5
- odoo/addons/l10n_it_bill_of_entry/i18n/it.po,sha256=aZuPN5qPMu-y-e2djRt36tzYq1V1RDrebSsyETv-iFM,14620
6
- odoo/addons/l10n_it_bill_of_entry/i18n/l10n_it_bill_of_entry.pot,sha256=n-7ImsmTxseKeG2-F6lxZOEEs11csIetYg1Ap3LBRyc,12452
5
+ odoo/addons/l10n_it_bill_of_entry/i18n/it.po,sha256=znSC-mq3FW1jfJ_HiJyKIucA0RxlTpWDgpsuB3NoqhQ,15146
6
+ odoo/addons/l10n_it_bill_of_entry/i18n/l10n_it_bill_of_entry.pot,sha256=fyEbrI9igpKBRLhLPaYxc9y_CE-qork6DL4ph_CKepE,12919
7
7
  odoo/addons/l10n_it_bill_of_entry/models/__init__.py,sha256=Y7JROQtv-6sdgmZdUUAg3PdDYGdyXGnaLSeNcon0yCo,115
8
- odoo/addons/l10n_it_bill_of_entry/models/account_move.py,sha256=HHr5b7-WDbnZwr4Z-_2RQ2B9L70J6OHuVJuwiAFs11o,11760
8
+ odoo/addons/l10n_it_bill_of_entry/models/account_move.py,sha256=2c7qyTnRkpmuiWhSRUcmI-0tMeLlDqpOIYUGrS61W5s,12086
9
9
  odoo/addons/l10n_it_bill_of_entry/models/company.py,sha256=f-D7l8IIHIBogt7LgtVCRLjK9GU9DDgE0g4-ex8MHWg,1250
10
10
  odoo/addons/l10n_it_bill_of_entry/readme/CONFIGURE.md,sha256=c2YSOi5auDOEDtvQHRs4v86vO1Gw2Gxv_PwkFFTxqs8,3266
11
11
  odoo/addons/l10n_it_bill_of_entry/readme/CONTRIBUTORS.md,sha256=3Mgj2cT3vRqqSAh6jbGuZY8LwAyw4bNsnElVapegW-Q,289
12
12
  odoo/addons/l10n_it_bill_of_entry/readme/DESCRIPTION.md,sha256=7vAu89RlPuQRrHxbdv7wR5SYaHXUnhZkUnzgubmJbwA,204
13
13
  odoo/addons/l10n_it_bill_of_entry/readme/USAGE.md,sha256=vs1XYz7Es9WG9q4Bt7gLWslu7ktV7TkirE-9Ynzyy94,642
14
14
  odoo/addons/l10n_it_bill_of_entry/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
15
- odoo/addons/l10n_it_bill_of_entry/static/description/index.html,sha256=7xnw3HR1FsKVmJ84F1HeqD0_jjKdwk6rm9qTzKt5n3Y,17747
15
+ odoo/addons/l10n_it_bill_of_entry/static/description/index.html,sha256=jx-IhJlNK9msGNEQ_NpyrZlmD_bHS94pbvrzsuptkjc,17747
16
16
  odoo/addons/l10n_it_bill_of_entry/tests/__init__.py,sha256=2wyRcHlMdzJV4P-H8BDZj2HAvSG1xX4c3M604Vy-LGk,100
17
- odoo/addons/l10n_it_bill_of_entry/tests/test_bill_of_entry.py,sha256=fkSWAfIMT3toKr7cYqcVfsdcKUTcGf71Can7e7JPE5U,11850
17
+ odoo/addons/l10n_it_bill_of_entry/tests/test_bill_of_entry.py,sha256=g8-_vl48nw9YZ-MLqBDN-ruivdY7ytafqvmo0JRcrMU,12780
18
18
  odoo/addons/l10n_it_bill_of_entry/views/account_invoice_view.xml,sha256=TZIHC_QNS-kxsqSf3eYj_vcOiiSrW8xw_Jxx8jkv_W8,10901
19
19
  odoo/addons/l10n_it_bill_of_entry/views/company_view.xml,sha256=eYRSrsCOJNJsO-5s8KcFXxmBaDSdkdFSFrZxLo2__js,3351
20
- odoo_addon_l10n_it_bill_of_entry-16.0.1.0.2.dist-info/METADATA,sha256=5MRfv535PKn9Aj6TnQxhYoJzKLP147zEp_5Zr_lXYds,7798
21
- odoo_addon_l10n_it_bill_of_entry-16.0.1.0.2.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
22
- odoo_addon_l10n_it_bill_of_entry-16.0.1.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
23
- odoo_addon_l10n_it_bill_of_entry-16.0.1.0.2.dist-info/RECORD,,
20
+ odoo_addon_l10n_it_bill_of_entry-16.0.1.0.3.1.dist-info/METADATA,sha256=e6o_msvI30UCNshpA7h8G5PtCCsQfrqIZJXyfegtD94,7800
21
+ odoo_addon_l10n_it_bill_of_entry-16.0.1.0.3.1.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
22
+ odoo_addon_l10n_it_bill_of_entry-16.0.1.0.3.1.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
23
+ odoo_addon_l10n_it_bill_of_entry-16.0.1.0.3.1.dist-info/RECORD,,