odoo14-addon-l10n-br-repair 14.0.1.0.2__py3-none-any.whl → 14.0.2.0.0__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.
@@ -3,8 +3,6 @@
3
3
 
4
4
  from odoo import api, fields, models
5
5
 
6
- import odoo.addons.decimal_precision as dp
7
-
8
6
 
9
7
  class FiscalLineMixin(models.AbstractModel):
10
8
  _name = "l10n_br_repair.fiscal.line.mixin"
@@ -13,7 +11,7 @@ class FiscalLineMixin(models.AbstractModel):
13
11
 
14
12
  @api.model
15
13
  def _default_fiscal_operation(self):
16
- return self.env.user.company_id.repair_fiscal_operation_id
14
+ return self.env.company.repair_fiscal_operation_id
17
15
 
18
16
  fiscal_operation_id = fields.Many2one(
19
17
  comodel_name="l10n_br_fiscal.operation",
@@ -35,9 +33,11 @@ class FiscalLineMixin(models.AbstractModel):
35
33
  price_subtotal = fields.Float(
36
34
  "Subtotal",
37
35
  compute="_compute_price_subtotal",
38
- digits=dp.get_precision("Account"),
36
+ digits="Product Price",
39
37
  )
40
38
 
39
+ fiscal_operation_type = fields.Selection(string="Fiscal Operation Type")
40
+
41
41
  @api.model
42
42
  def _fiscal_operation_domain(self):
43
43
  domain = [("state", "=", "approved")]
@@ -67,13 +67,11 @@ class FiscalLineMixin(models.AbstractModel):
67
67
 
68
68
  @api.onchange("fiscal_tax_ids")
69
69
  def _onchange_fiscal_tax_ids(self):
70
- result = super()._onchange_fiscal_tax_ids()
71
- self.tax_id |= self.fiscal_tax_ids.account_taxes(user_type="sale")
72
- if self.repair_id.fiscal_operation_id.deductible_taxes:
73
- self.tax_id |= self.fiscal_tax_ids.account_taxes(
74
- user_type="sale", deductible=True
70
+ if self.product_id and self.fiscal_operation_line_id:
71
+ super()._onchange_fiscal_tax_ids()
72
+ self.tax_id = self.fiscal_tax_ids.account_taxes(
73
+ user_type="sale", fiscal_operation=self.fiscal_operation_id
75
74
  )
76
- return result
77
75
 
78
76
  @api.onchange("product_uom", "product_uom_qty")
79
77
  def _onchange_product_uom(self):
@@ -3,8 +3,6 @@
3
3
 
4
4
  from odoo import api, fields, models
5
5
 
6
- from ...l10n_br_fiscal.constants.fiscal import TAX_FRAMEWORK
7
-
8
6
 
9
7
  class RepairFee(models.Model):
10
8
  _name = "repair.fee"
@@ -20,7 +18,6 @@ class RepairFee(models.Model):
20
18
  )
21
19
 
22
20
  tax_framework = fields.Selection(
23
- selection=TAX_FRAMEWORK,
24
21
  related="repair_id.company_id.tax_framework",
25
22
  string="Tax Framework",
26
23
  )
@@ -57,6 +54,10 @@ class RepairFee(models.Model):
57
54
  store=True,
58
55
  )
59
56
 
57
+ # Fields compute need parameter compute_sudo
58
+ price_subtotal = fields.Monetary(compute_sudo=True)
59
+ price_gross = fields.Monetary(compute_sudo=True)
60
+
60
61
  @api.depends(
61
62
  "price_unit",
62
63
  "repair_id",
@@ -68,7 +69,7 @@ class RepairFee(models.Model):
68
69
  result = super()._compute_price_subtotal()
69
70
  for line in self:
70
71
  # Update taxes fields
71
- line._update_taxes()
72
+ line._update_fiscal_taxes()
72
73
  # Call mixin compute method
73
74
  line._compute_amounts()
74
75
  # Update record
@@ -3,8 +3,6 @@
3
3
 
4
4
  from odoo import api, fields, models
5
5
 
6
- from ...l10n_br_fiscal.constants.fiscal import TAX_FRAMEWORK
7
-
8
6
 
9
7
  class RepairLine(models.Model):
10
8
  _name = "repair.line"
@@ -20,7 +18,6 @@ class RepairLine(models.Model):
20
18
  )
21
19
 
22
20
  tax_framework = fields.Selection(
23
- selection=TAX_FRAMEWORK,
24
21
  related="repair_id.company_id.tax_framework",
25
22
  string="Tax Framework",
26
23
  )
@@ -57,6 +54,10 @@ class RepairLine(models.Model):
57
54
  store=True,
58
55
  )
59
56
 
57
+ # Fields compute need parameter compute_sudo
58
+ price_subtotal = fields.Monetary(compute_sudo=True)
59
+ price_gross = fields.Monetary(compute_sudo=True)
60
+
60
61
  @api.depends(
61
62
  "price_unit",
62
63
  "repair_id",
@@ -68,7 +69,7 @@ class RepairLine(models.Model):
68
69
  result = super()._compute_price_subtotal()
69
70
  for line in self:
70
71
  # Update taxes fields
71
- line._update_taxes()
72
+ line._update_fiscal_taxes()
72
73
  # Call mixin compute method
73
74
  line._compute_amounts()
74
75
  # Update record
@@ -14,11 +14,11 @@ class RepairOrder(models.Model):
14
14
 
15
15
  @api.model
16
16
  def _default_fiscal_operation(self):
17
- return self.env.user.company_id.repair_fiscal_operation_id
17
+ return self.env.company.repair_fiscal_operation_id
18
18
 
19
19
  @api.model
20
20
  def _default_copy_note(self):
21
- return self.env.user.company_id.copy_repair_quotation_notes
21
+ return self.env.company.copy_repair_quotation_notes
22
22
 
23
23
  @api.model
24
24
  def _fiscal_operation_domain(self):
@@ -96,6 +96,11 @@ class RepairOrder(models.Model):
96
96
  lines += [lin for lin in self.mapped("fees_lines")]
97
97
  return lines
98
98
 
99
+ def _get_product_amount_lines(self):
100
+ """Get object lines instaces used to compute fields"""
101
+
102
+ return self._get_amount_lines()
103
+
99
104
  @api.depends("operations", "fees_lines")
100
105
  def _compute_amount(self):
101
106
  return super()._compute_amount()
@@ -133,11 +138,7 @@ class RepairOrder(models.Model):
133
138
  "move_id"
134
139
  ).filtered(
135
140
  lambda r: r.move_type in ["out_invoice", "out_refund"]
136
- ) + order.fees_lines.mapped(
137
- "invoice_line_id"
138
- ).mapped(
139
- "move_id"
140
- ).filtered(
141
+ ) + order.fees_lines.mapped("invoice_line_id").mapped("move_id").filtered(
141
142
  lambda r: r.move_type in ["out_invoice", "out_refund"]
142
143
  )
143
144
  # Search for invoices which have been
@@ -153,7 +154,7 @@ class RepairOrder(models.Model):
153
154
  )
154
155
 
155
156
  invoice_ids |= refunds.filtered(
156
- lambda r: order.name
157
+ lambda r, order=order: order.name
157
158
  in [
158
159
  invoice_origin.strip()
159
160
  for invoice_origin in r.invoice_origin.split(",")
@@ -200,11 +201,9 @@ class RepairOrder(models.Model):
200
201
  def fields_view_get(
201
202
  self, view_id=None, view_type="form", toolbar=False, submenu=False
202
203
  ):
203
-
204
204
  order_view = super().fields_view_get(view_id, view_type, toolbar, submenu)
205
205
 
206
206
  if view_type == "form":
207
-
208
207
  view = self.env["ir.ui.view"]
209
208
 
210
209
  sub_form_view = order_view["fields"]["operations"]["views"]["form"]["arch"]
@@ -468,7 +467,6 @@ class RepairOrder(models.Model):
468
467
  return {repair.id: repair.invoice_id.id for repair in repairs}
469
468
 
470
469
  def _split_invoice(self, group=False):
471
-
472
470
  self.ensure_one()
473
471
 
474
472
  document_type_list = []
@@ -491,7 +489,6 @@ class RepairOrder(models.Model):
491
489
  if (
492
490
  fiscal_document_type.id != invoice_created_by_super.document_type_id.id
493
491
  ) or (len(document_type_list) > 1):
494
-
495
492
  # Remove the First Document Type,
496
493
  # already has Invoice created
497
494
  invoice_created_by_super.document_type_id = document_type_list.pop(0)
@@ -5,7 +5,6 @@ from odoo import fields, models
5
5
 
6
6
 
7
7
  class ResCompany(models.Model):
8
-
9
8
  _inherit = "res.company"
10
9
 
11
10
  repair_fiscal_operation_id = fields.Many2one(
@@ -1,6 +1,10 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
2
  <odoo>
3
- <template id="report_repair_order" inherit_id="repair.report_repairorder">
3
+ <template
4
+ id="report_repair_order"
5
+ inherit_id="repair.report_repairorder"
6
+ priority="100"
7
+ >
4
8
 
5
9
  <xpath
6
10
  expr="//table[hasclass('table', 'table-sm', 'o_main_table')]//tbody//t[1]/tr[1]"
@@ -1,20 +1,20 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
3
  <head>
5
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
7
- <title>Brazilian Localization Repair</title>
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>README.rst</title>
8
7
  <style type="text/css">
9
8
 
10
9
  /*
11
10
  :Author: David Goodger (goodger@python.org)
12
- :Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
13
12
  :Copyright: This stylesheet has been placed in the public domain.
14
13
 
15
14
  Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
16
 
17
- See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
18
  customize this style sheet.
19
19
  */
20
20
 
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
275
  margin-left: 2em ;
276
276
  margin-right: 2em }
277
277
 
278
- pre.code .ln { color: grey; } /* line numbers */
278
+ pre.code .ln { color: gray; } /* line numbers */
279
279
  pre.code, code { background-color: #eeeeee }
280
280
  pre.code .comment, code .comment { color: #5C6576 }
281
281
  pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
301
301
  span.pre {
302
302
  white-space: pre }
303
303
 
304
- span.problematic {
304
+ span.problematic, pre.problematic {
305
305
  color: red }
306
306
 
307
307
  span.section-subtitle {
@@ -360,14 +360,21 @@ ul.auto-toc {
360
360
  </style>
361
361
  </head>
362
362
  <body>
363
- <div class="document" id="brazilian-localization-repair">
364
- <h1 class="title">Brazilian Localization Repair</h1>
363
+ <div class="document">
365
364
 
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="brazilian-localization-repair">
370
+ <h1>Brazilian Localization Repair</h1>
366
371
  <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
372
  !! This file is generated by oca-gen-addon-readme !!
368
373
  !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:41bae2ea1404e56be92e7ef3c222d2f101538c8a2ede79d63aef33f294a2bd54
369
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370
- <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_repair"><img alt="OCA/l10n-brazil" src="https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_repair"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/124/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_repair"><img alt="OCA/l10n-brazil" src="https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_repair"><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-brazil&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371
378
  <p>This module extends the Odoo Repair module to adapt it to the Brazilian needs, with this module you have tax data for collection and generation of fiscal documents (NF-e, NFS-e, CF-e, NFC-e and others), calculation Brazilian taxes and contributions (municipal, state and federal).</p>
372
379
  <div class="admonition important">
373
380
  <p class="first admonition-title">Important</p>
@@ -378,22 +385,22 @@ Only for development or testing purpose, do not use in production.
378
385
  <p><strong>Table of contents</strong></p>
379
386
  <div class="contents local topic" id="contents">
380
387
  <ul class="simple">
381
- <li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
382
- <li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li>
383
- <li><a class="reference internal" href="#usage" id="id3">Usage</a></li>
384
- <li><a class="reference internal" href="#known-issues-roadmap" id="id4">Known issues / Roadmap</a></li>
385
- <li><a class="reference internal" href="#bug-tracker" id="id5">Bug Tracker</a></li>
386
- <li><a class="reference internal" href="#credits" id="id6">Credits</a><ul>
387
- <li><a class="reference internal" href="#authors" id="id7">Authors</a></li>
388
- <li><a class="reference internal" href="#contributors" id="id8">Contributors</a></li>
389
- <li><a class="reference internal" href="#other-credits" id="id9">Other credits</a></li>
390
- <li><a class="reference internal" href="#maintainers" id="id10">Maintainers</a></li>
388
+ <li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
389
+ <li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
390
+ <li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
391
+ <li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a></li>
392
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-5">Bug Tracker</a></li>
393
+ <li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a><ul>
394
+ <li><a class="reference internal" href="#authors" id="toc-entry-7">Authors</a></li>
395
+ <li><a class="reference internal" href="#contributors" id="toc-entry-8">Contributors</a></li>
396
+ <li><a class="reference internal" href="#other-credits" id="toc-entry-9">Other credits</a></li>
397
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-10">Maintainers</a></li>
391
398
  </ul>
392
399
  </li>
393
400
  </ul>
394
401
  </div>
395
402
  <div class="section" id="installation">
396
- <h1><a class="toc-backref" href="#id1">Installation</a></h1>
403
+ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
397
404
  <p>This module depends on:</p>
398
405
  <ul class="simple">
399
406
  <li>repair</li>
@@ -401,7 +408,7 @@ Only for development or testing purpose, do not use in production.
401
408
  </ul>
402
409
  </div>
403
410
  <div class="section" id="configuration">
404
- <h1><a class="toc-backref" href="#id2">Configuration</a></h1>
411
+ <h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
405
412
  <p>To configure this module, you need to:</p>
406
413
  <ol class="arabic simple">
407
414
  <li>Go to Settings -&gt; Users &amp; Companies -&gt; Companies</li>
@@ -410,7 +417,7 @@ Only for development or testing purpose, do not use in production.
410
417
  </ol>
411
418
  </div>
412
419
  <div class="section" id="usage">
413
- <h1><a class="toc-backref" href="#id3">Usage</a></h1>
420
+ <h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
414
421
  <p>To use this module, you need to:</p>
415
422
  <ol class="arabic simple">
416
423
  <li>Go to Repair</li>
@@ -421,30 +428,30 @@ Only for development or testing purpose, do not use in production.
421
428
  </ol>
422
429
  </div>
423
430
  <div class="section" id="known-issues-roadmap">
424
- <h1><a class="toc-backref" href="#id4">Known issues / Roadmap</a></h1>
431
+ <h2><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h2>
425
432
  <ul class="simple">
426
433
  <li>This module hasn’t been tested with <em>repair_discount</em> module installed, so maybe it’s incompatible with it.</li>
427
434
  <li>Add Fiscal Position Resource</li>
428
435
  </ul>
429
436
  </div>
430
437
  <div class="section" id="bug-tracker">
431
- <h1><a class="toc-backref" href="#id5">Bug Tracker</a></h1>
438
+ <h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
432
439
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-brazil/issues">GitHub Issues</a>.
433
440
  In case of trouble, please check there if your issue has already been reported.
434
- If you spotted it first, help us smashing it by providing a detailed and welcomed
441
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
435
442
  <a class="reference external" href="https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_repair%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
436
443
  <p>Do not contact contributors directly about support or help with technical issues.</p>
437
444
  </div>
438
445
  <div class="section" id="credits">
439
- <h1><a class="toc-backref" href="#id6">Credits</a></h1>
446
+ <h2><a class="toc-backref" href="#toc-entry-6">Credits</a></h2>
440
447
  <div class="section" id="authors">
441
- <h2><a class="toc-backref" href="#id7">Authors</a></h2>
448
+ <h3><a class="toc-backref" href="#toc-entry-7">Authors</a></h3>
442
449
  <ul class="simple">
443
450
  <li>Escodoo</li>
444
451
  </ul>
445
452
  </div>
446
453
  <div class="section" id="contributors">
447
- <h2><a class="toc-backref" href="#id8">Contributors</a></h2>
454
+ <h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
448
455
  <ul class="simple">
449
456
  <li><a class="reference external" href="https://www.escodoo.com.br">Escodoo</a>:<ul>
450
457
  <li>Marcel Savegnago &lt;<a class="reference external" href="mailto:marcel.savegnago&#64;escodoo.com.br">marcel.savegnago&#64;escodoo.com.br</a>&gt;</li>
@@ -462,25 +469,28 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
462
469
  </ul>
463
470
  </div>
464
471
  <div class="section" id="other-credits">
465
- <h2><a class="toc-backref" href="#id9">Other credits</a></h2>
472
+ <h3><a class="toc-backref" href="#toc-entry-9">Other credits</a></h3>
466
473
  <p>The development of this module has been financially supported by:</p>
467
474
  <ul class="simple">
468
475
  <li>Escodoo - <a class="reference external" href="https://www.escodoo.com.br">https://www.escodoo.com.br</a></li>
469
476
  </ul>
470
477
  </div>
471
478
  <div class="section" id="maintainers">
472
- <h2><a class="toc-backref" href="#id10">Maintainers</a></h2>
479
+ <h3><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h3>
473
480
  <p>This module is maintained by the OCA.</p>
474
- <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
481
+ <a class="reference external image-reference" href="https://odoo-community.org">
482
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
483
+ </a>
475
484
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
476
485
  mission is to support the collaborative development of Odoo features and
477
486
  promote its widespread use.</p>
478
487
  <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
479
- <p><a class="reference external" href="https://github.com/marcelsavegnago"><img alt="marcelsavegnago" src="https://github.com/marcelsavegnago.png?size=40px" /></a></p>
488
+ <p><a class="reference external image-reference" href="https://github.com/marcelsavegnago"><img alt="marcelsavegnago" src="https://github.com/marcelsavegnago.png?size=40px" /></a></p>
480
489
  <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_repair">OCA/l10n-brazil</a> project on GitHub.</p>
481
490
  <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
482
491
  </div>
483
492
  </div>
484
493
  </div>
494
+ </div>
485
495
  </body>
486
496
  </html>
@@ -19,12 +19,13 @@ class L10nBrRepairBaseTest(SavepointCase):
19
19
  @classmethod
20
20
  def setUpClass(cls):
21
21
  super().setUpClass()
22
- cls.main_company = cls.env.ref("base.main_company")
23
22
  cls.company = cls.env.ref("base.main_company")
24
23
  cls.so_products = cls.env.ref("l10n_br_repair.main_so_only_products")
25
24
  cls.so_services = cls.env.ref("l10n_br_repair.main_so_only_services")
26
25
  cls.so_prod_srv = cls.env.ref("l10n_br_repair.main_so_product_service")
27
26
  cls.fsc_op_sale = cls.env.ref("l10n_br_fiscal.fo_venda")
27
+ # Testa os Impostos Dedutiveis
28
+ cls.fsc_op_sale.deductible_taxes = True
28
29
  cls.fsc_op_line_sale = cls.env.ref("l10n_br_fiscal.fo_venda_venda")
29
30
  cls.fsc_op_line_sale_non_contr = cls.env.ref(
30
31
  "l10n_br_fiscal.fo_venda_venda_nao_contribuinte"
@@ -336,8 +337,6 @@ class L10nBrRepairBaseTest(SavepointCase):
336
337
  self.assertEqual(action_created_invoice["type"], "ir.actions.act_window")
337
338
  self.assertEqual(action_created_invoice["view_mode"], "form")
338
339
 
339
- self._change_user_company(self.company)
340
-
341
340
  def test_l10n_br_repair_services(self):
342
341
  """Test brazilian Repair Order with only Services."""
343
342
  self._change_user_company(self.company)
@@ -458,8 +457,6 @@ class L10nBrRepairBaseTest(SavepointCase):
458
457
  self.assertEqual(action_created_invoice["type"], "ir.actions.act_window")
459
458
  self.assertEqual(action_created_invoice["view_mode"], "form")
460
459
 
461
- self._change_user_company(self.company)
462
-
463
460
  def test_l10n_br_repair_products_services(self):
464
461
  """Test brazilian Repair Order with Product and Services."""
465
462
  self._change_user_company(self.company)
@@ -699,8 +696,6 @@ class L10nBrRepairBaseTest(SavepointCase):
699
696
  self.assertEqual(action_created_invoice["type"], "ir.actions.act_window")
700
697
  self.assertEqual(action_created_invoice["view_mode"], "tree,form")
701
698
 
702
- self._change_user_company(self.main_company)
703
-
704
699
  def test_action_views(self):
705
700
  act1 = self.so_services.action_created_invoice()
706
701
  self.assertTrue(act1)
@@ -100,6 +100,10 @@
100
100
  name="city_taxation_code_id"
101
101
  attrs="{'invisible': [('tax_icms_or_issqn', '=', 'icms')]}"
102
102
  />
103
+ <field
104
+ name="national_taxation_code_id"
105
+ attrs="{'invisible': [('tax_icms_or_issqn', '=', 'icms')]}"
106
+ />
103
107
  <field name="cfop_destination" invisible="1" />
104
108
  <field name="price_total" invisible="1" />
105
109
  <field name="price_subtotal" invisible="1" />
@@ -100,6 +100,10 @@
100
100
  name="city_taxation_code_id"
101
101
  attrs="{'invisible': [('tax_icms_or_issqn', '=', 'icms')]}"
102
102
  />
103
+ <field
104
+ name="national_taxation_code_id"
105
+ attrs="{'invisible': [('tax_icms_or_issqn', '=', 'icms')]}"
106
+ />
103
107
  <field
104
108
  name="lot_id"
105
109
  domain="[('product_id', '=', product_id)]"
@@ -8,7 +8,7 @@
8
8
  <field name="model">res.company</field>
9
9
  <field name="inherit_id" ref="l10n_br_fiscal.fiscal_res_company_form" />
10
10
  <field name="arch" type="xml">
11
- <xpath expr="//page[@name='certificate']" position="after">
11
+ <xpath expr="//notebook/page[@name='fiscal']/notebook" position="inside">
12
12
  <page name="l10n_br_repair" string="Repair">
13
13
  <group>
14
14
  <group>
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
- Name: odoo14-addon-l10n-br-repair
3
- Version: 14.0.1.0.2
2
+ Name: odoo14-addon-l10n_br_repair
3
+ Version: 14.0.2.0.0
4
4
  Summary: Brazilian Localization Repair
5
5
  Home-page: https://github.com/OCA/l10n-brazil
6
6
  Author: Escodoo, Odoo Community Association (OCA)
7
7
  Author-email: support@odoo-community.org
8
8
  License: AGPL-3
9
- Platform: UNKNOWN
10
9
  Classifier: Programming Language :: Python
11
10
  Classifier: Framework :: Odoo
12
11
  Classifier: Framework :: Odoo :: 14.0
@@ -14,21 +13,28 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
14
13
  Classifier: Development Status :: 3 - Alpha
15
14
  Requires-Python: >=3.6
16
15
  Requires-Dist: odoo14-addon-l10n-br-stock-account
17
- Requires-Dist: odoo (<14.1dev,>=14.0a)
16
+ Requires-Dist: odoo<14.1dev,>=14.0a
17
+
18
+ .. image:: https://odoo-community.org/readme-banner-image
19
+ :target: https://odoo-community.org/get-involved?utm_source=readme
20
+ :alt: Odoo Community Association
18
21
 
19
22
  =============================
20
23
  Brazilian Localization Repair
21
24
  =============================
22
25
 
23
- .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26
+ ..
27
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24
28
  !! This file is generated by oca-gen-addon-readme !!
25
29
  !! changes will be overwritten. !!
26
30
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
+ !! source digest: sha256:41bae2ea1404e56be92e7ef3c222d2f101538c8a2ede79d63aef33f294a2bd54
32
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
33
 
28
34
  .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
29
35
  :target: https://odoo-community.org/page/development-status
30
36
  :alt: Alpha
31
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
37
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
32
38
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
33
39
  :alt: License: AGPL-3
34
40
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github
@@ -37,11 +43,11 @@ Brazilian Localization Repair
37
43
  .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
38
44
  :target: https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_repair
39
45
  :alt: Translate me on Weblate
40
- .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
41
- :target: https://runbot.odoo-community.org/runbot/124/14.0
42
- :alt: Try me on Runbot
46
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
47
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&target_branch=14.0
48
+ :alt: Try me on Runboat
43
49
 
44
- |badge1| |badge2| |badge3| |badge4| |badge5|
50
+ |badge1| |badge2| |badge3| |badge4| |badge5|
45
51
 
46
52
  This module extends the Odoo Repair module to adapt it to the Brazilian needs, with this module you have tax data for collection and generation of fiscal documents (NF-e, NFS-e, CF-e, NFC-e and others), calculation Brazilian taxes and contributions (municipal, state and federal).
47
53
 
@@ -95,7 +101,7 @@ Bug Tracker
95
101
 
96
102
  Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-brazil/issues>`_.
97
103
  In case of trouble, please check there if your issue has already been reported.
98
- If you spotted it first, help us smashing it by providing a detailed and welcomed
104
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
99
105
  `feedback <https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_repair%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
100
106
 
101
107
  Do not contact contributors directly about support or help with technical issues.
@@ -155,5 +161,3 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
155
161
  This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_repair>`_ project on GitHub.
156
162
 
157
163
  You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
158
-
159
-
@@ -1,17 +1,17 @@
1
- odoo/addons/l10n_br_repair/README.rst,sha256=e94xEVhx1hHUpiTqcC-BqJYB6kmj3GtyCfXMXvX8eqg,4539
1
+ odoo/addons/l10n_br_repair/README.rst,sha256=kvX03Wc3dZYuE6WSvW_4IPnjseuyLc-24-CnMZCIQXo,4890
2
2
  odoo/addons/l10n_br_repair/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
3
- odoo/addons/l10n_br_repair/__manifest__.py,sha256=NsbfeAhl0rOFTYFWbj03Go5FGQLrXOq-WQMRlWqrzjc,934
4
- odoo/addons/l10n_br_repair/data/res_company.xml,sha256=rAEmBN10nb28-TmskAcDVydgmjlIolFishvY-Vgb_NA,391
3
+ odoo/addons/l10n_br_repair/__manifest__.py,sha256=IUEEVfJdYnPCmFkGLacSYKn63eovRUxCr5EOT1xievc,934
4
+ odoo/addons/l10n_br_repair/data/res_company.xml,sha256=ffiH6mcFBim9lTajXR8Uyd5Qtssie4jUYT98Z4EGTJo,404
5
5
  odoo/addons/l10n_br_repair/demo/repair_order.xml,sha256=MnifaUzLMa4RzwMhq9bradZN6DYqJ1rCMlWod_O3rYg,28282
6
6
  odoo/addons/l10n_br_repair/demo/res_company.xml,sha256=eB-qsYqtpVOOPPm8Bk_OZJgsC-nU0vsGjBpTvohtNmY,584
7
- odoo/addons/l10n_br_repair/i18n/l10n_br_repair.pot,sha256=iksytUuWaBYqMeGXxa-XV5wmhk5NI86nx3ts0WbCETU,93667
8
- odoo/addons/l10n_br_repair/i18n/pt_BR.po,sha256=LKiXIppUZc6MIzm3uOIBWgfO0KeHtQ3Yt6vT_EBC-H4,96978
7
+ odoo/addons/l10n_br_repair/i18n/l10n_br_repair.pot,sha256=BhxY_VKcqy9joS1UxFvIprFlj5hRBatE-cQ046d6cnc,111741
8
+ odoo/addons/l10n_br_repair/i18n/pt_BR.po,sha256=GUoqbKnBTnLcN7BxFtWYobCZYq8R-9T1sZ8Q7AlU_y0,120872
9
9
  odoo/addons/l10n_br_repair/models/__init__.py,sha256=uyVq3f2utkj4x3jL16GdJP253C0Lqi1dqRoE-zfpo2Y,170
10
- odoo/addons/l10n_br_repair/models/fiscal_line_mixin.py,sha256=J_Ph-Z-KghafCeSCw2MjZ7isvPR25GXwLQp47cFH514,2765
11
- odoo/addons/l10n_br_repair/models/repair_fee.py,sha256=JXuEbKrfHhJzfW778PsdL09nrsMyfNYMSztisL11si4,2256
12
- odoo/addons/l10n_br_repair/models/repair_line.py,sha256=tyIqWi3NgPjDQzE0pkYpDW4eR01ydhhrFI2pWiZxjfw,2261
13
- odoo/addons/l10n_br_repair/models/repair_order.py,sha256=Me1BtwVIu2Lrjp3aObovqk0LiWDXkRYUFEFvtUeV7sA,20856
14
- odoo/addons/l10n_br_repair/models/res_company.py,sha256=DDoaMXKMRk7SckXmMNYEmBcMMbK4k-A1xu4NiTuZ2UM,532
10
+ odoo/addons/l10n_br_repair/models/fiscal_line_mixin.py,sha256=W5a_rpXw_cPpKWJiZBMPisV56HklyhtG1fcDfiywnjQ,2700
11
+ odoo/addons/l10n_br_repair/models/repair_fee.py,sha256=e34AGwkSNOYSnj9QnPeVcoa8CHsljKkEj_3gaQRPTiE,2327
12
+ odoo/addons/l10n_br_repair/models/repair_line.py,sha256=CLM0y0bobaI57LMD2s44ZbKw8pDLhoALcYm105jHJP4,2332
13
+ odoo/addons/l10n_br_repair/models/repair_order.py,sha256=koy8i_uToaicbEMScXXw_DvReNuKaPYe4jNcPUQyAxs,20935
14
+ odoo/addons/l10n_br_repair/models/res_company.py,sha256=hIBsmdRPM0CxsZsYYHQn7aNQGBzwwiOuePURKeTSVrU,531
15
15
  odoo/addons/l10n_br_repair/models/res_config_settings.py,sha256=iZZiC_x-gh6yUl9IKRrnCYATOm3tH27LzA87s44joYI,471
16
16
  odoo/addons/l10n_br_repair/readme/CONFIGURE.rst,sha256=YgXGv7uen2hjfnV38q5SZhXZcUJUunK9ca_SdVfnJII,194
17
17
  odoo/addons/l10n_br_repair/readme/CONTRIBUTORS.rst,sha256=A3G6oQKTUU4I52SPra6UyOKqDBvKC33XDmPGM99pRYE,340
@@ -21,19 +21,19 @@ odoo/addons/l10n_br_repair/readme/HISTORY.rst,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
21
21
  odoo/addons/l10n_br_repair/readme/INSTALL.rst,sha256=YlIoTn8_JpFrIfSE7VqS8Ydb0UaXGO1P5wkxFSicYaY,58
22
22
  odoo/addons/l10n_br_repair/readme/ROADMAP.rst,sha256=PcCmOpdzEL6otpkQlSaJSFsAt39MZxmK7d7jwwszVB4,142
23
23
  odoo/addons/l10n_br_repair/readme/USAGE.rst,sha256=kZ0NSbWZ8FsLUoUW_64TKtk_o_gyNyGhgx0PI12PNcg,172
24
- odoo/addons/l10n_br_repair/report/repair_templates_repair_order.xml,sha256=DEP3_zrDj2O5q4jocHE7FDDfuwinEGqyoYwJh-8TkvQ,6048
24
+ odoo/addons/l10n_br_repair/report/repair_templates_repair_order.xml,sha256=LbeOJFNBn_WJkSNt_AkDK83X9-5nSzYz9Vp_pNtSYyE,6092
25
25
  odoo/addons/l10n_br_repair/static/description/banner.png,sha256=79JnvZusJn5gdi7q1pyW-clP6q0U8X2ecMGV-w-6FI0,6733
26
26
  odoo/addons/l10n_br_repair/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
27
- odoo/addons/l10n_br_repair/static/description/index.html,sha256=dUsgSFHdvM2SfYzTWOopRFLdpP68B3tH7doahDg3k7M,15412
27
+ odoo/addons/l10n_br_repair/static/description/index.html,sha256=zIQUQdMHcC0RgKqXX4QYkc-SMtpwWgfWL-R86cYJWOI,16102
28
28
  odoo/addons/l10n_br_repair/tests/__init__.py,sha256=rO5zjq-9t2aJJIAzCRGaft464b91827wVzMt-n0e0Nc,108
29
- odoo/addons/l10n_br_repair/tests/test_l10n_br_repair.py,sha256=h0MMZj5-xKvOlKo5kbjeFrDjyO9pDSMn-6L9n52Nxl0,26401
29
+ odoo/addons/l10n_br_repair/tests/test_l10n_br_repair.py,sha256=KwHIXzsKPP2gIt0eDAwXnh14NW377gj6-yTOLs2VJ0c,26276
30
30
  odoo/addons/l10n_br_repair/tests/test_l10n_br_repair_lc.py,sha256=QkVavzwsk9_IrSnRDUym4_dJx4h3A-w5A_obihZNYgA,696
31
31
  odoo/addons/l10n_br_repair/tests/test_l10n_br_repair_sn.py,sha256=tLW1Zd4gndHXiHiUk65vPDgY1DVijwbxS-NAnjbhDQQ,697
32
- odoo/addons/l10n_br_repair/views/repair_fee.xml,sha256=UCterMzvSDbpSn_Q4lvdAAKmxV9XcrxPYxYyfkY9ic4,6295
33
- odoo/addons/l10n_br_repair/views/repair_line.xml,sha256=4F1Hw4uWAWxcN8zq1zQ-NToslIWnu4kSRHFmupR9t8s,6585
32
+ odoo/addons/l10n_br_repair/views/repair_fee.xml,sha256=_nIHvTJlcnRz94My2znvRN-t9eGlDu_ZLOlakfww3ak,6486
33
+ odoo/addons/l10n_br_repair/views/repair_line.xml,sha256=R1Lo-m8n410PBTVKCEsk72KsKQ-BtOLTjEvrqsWdxjY,6776
34
34
  odoo/addons/l10n_br_repair/views/repair_order.xml,sha256=lPTt9Zo-a5HCQALspoEoZ5Wx9Z0jcgCtZL96USLNj8A,2853
35
- odoo/addons/l10n_br_repair/views/res_company.xml,sha256=oMseD8mVeU9-PzZKojsVRzlH_U_009WR3medVtcm_XU,961
36
- odoo14_addon_l10n_br_repair-14.0.1.0.2.dist-info/METADATA,sha256=UoZZ8Jtck9GTfXbU5lsueo79v3VBcihARk8egsatVG0,5171
37
- odoo14_addon_l10n_br_repair-14.0.1.0.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
38
- odoo14_addon_l10n_br_repair-14.0.1.0.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
39
- odoo14_addon_l10n_br_repair-14.0.1.0.2.dist-info/RECORD,,
35
+ odoo/addons/l10n_br_repair/views/res_company.xml,sha256=lFuF6NR1QMqLYMI2eNUVxIr1bkHFX7JXcvH7o-4xO8k,975
36
+ odoo14_addon_l10n_br_repair-14.0.2.0.0.dist-info/METADATA,sha256=gibE9TYPocvY8kJ5O_JfaQitnQG8LvtHZkEoHRtnIv0,5499
37
+ odoo14_addon_l10n_br_repair-14.0.2.0.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
38
+ odoo14_addon_l10n_br_repair-14.0.2.0.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
39
+ odoo14_addon_l10n_br_repair-14.0.2.0.0.dist-info/RECORD,,