Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semana 22 #696

Merged
merged 138 commits into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
1261a5d
remove useless default @api.multi
rvalyi May 16, 2021
d5dd92b
add missing self.ensure_one() statements
rvalyi May 24, 2021
8c0adef
more flexible xpath extension point issue #1199
rvalyi May 24, 2021
91bc821
Merge PR #1391 into 12.0
OCA-git-bot May 24, 2021
8a6ab8d
[REF] l10n_br_sale lint - group
mileo May 24, 2021
d924bea
[REF] l10n_br_base - lint convert tabs to spaces
mileo May 24, 2021
9491f45
[REF] l10n_br_sale_stock lint compute method name
mileo May 24, 2021
5774a5f
compute should assign all records!
rvalyi May 24, 2021
a29770a
unfuck whitespace coding
rvalyi May 24, 2021
7c0ae6e
fields.Selection expects a list, not a tuple
rvalyi May 24, 2021
82bda46
performance: store=True if used in @api.depends
rvalyi May 24, 2021
6bacb13
[REF] l10n_br_repair lint
mileo May 24, 2021
cf17d6a
Merge PR #1397 into 12.0
OCA-git-bot May 24, 2021
a85477c
remove useless default @api.multi
rvalyi May 16, 2021
dc24363
remove useless default @api.multi
rvalyi May 16, 2021
bc44bb5
remove useless default @api.multi
rvalyi May 16, 2021
9aefbb5
remove useless default @api.multi
rvalyi May 16, 2021
4173bde
[FIX] IE/RG UX
mileo May 24, 2021
6198657
remove useless default @api.multi
rvalyi May 16, 2021
56e1b8f
Merge PR #1392 into 12.0
OCA-git-bot May 24, 2021
c7a7c46
remove useless default @api.multi
rvalyi May 16, 2021
a8e8957
remove useless default @api.multi
rvalyi May 16, 2021
6501337
[UPD] Update l10n_br_fiscal.pot
oca-travis May 24, 2021
b38dae7
l10n_br_fiscal 12.0.13.3.0
OCA-git-bot May 24, 2021
ff11ae9
Merge PR #1394 into 12.0
OCA-git-bot May 24, 2021
7910f13
[UPD] addons table in README.md
OCA-git-bot May 25, 2021
a8ec41b
Merge PR #1398 into 12.0
OCA-git-bot May 25, 2021
d0dc788
l10n_br_sale_stock 12.0.5.3.0
OCA-git-bot May 25, 2021
d6d58f4
[UPD] addons table in README.md
OCA-git-bot May 25, 2021
05fb1ce
Merge PR #1395 into 12.0
OCA-git-bot May 25, 2021
f9d6c5c
Merge PR #1403 into 12.0
OCA-git-bot May 25, 2021
dcd5358
[UPD] Update l10n_br_base.pot
oca-travis May 25, 2021
888abf3
l10n_br_base 12.0.3.2.0
OCA-git-bot May 25, 2021
db7332e
[UPD] addons table in README.md
OCA-git-bot May 25, 2021
ebc057e
Merge PR #1399 into 12.0
OCA-git-bot May 25, 2021
f620f16
[UPD] Update l10n_br_base.pot
oca-travis May 25, 2021
b09791e
Merge PR #1400 into 12.0
OCA-git-bot May 25, 2021
ce5f5f0
[UPD] Update l10n_br_fiscal.pot
oca-travis May 25, 2021
32e5688
Merge PR #1401 into 12.0
OCA-git-bot May 25, 2021
f8d824c
[UPD] Update l10n_br_account.pot
oca-travis May 25, 2021
cae73c3
Merge PR #1402 into 12.0
OCA-git-bot May 25, 2021
d8c35ed
[UPD] Update l10n_br_stock_account.pot
oca-travis May 25, 2021
bfd090d
Merge PR #1404 into 12.0
OCA-git-bot May 25, 2021
a95546c
Merge PR #1405 into 12.0
OCA-git-bot May 25, 2021
e39361c
pis_wh_cst_id and cofins_wh_cst_id do not exist
rvalyi May 25, 2021
21a099f
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
750ba48
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
974d4e3
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
6f0b219
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
6063cfd
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
d8e49b3
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
33d8f83
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
5503544
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
7480837
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
f5de947
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
0948c23
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
bc4756e
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
b859cf4
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
ee9f549
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
82c7c2e
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
f27cbdd
lint: sed -i 's/assertEquals/assertEqual/g'
rvalyi May 25, 2021
d90533a
Merge PR #1407 into 12.0
OCA-git-bot May 26, 2021
780c5d2
Merge PR #1408 into 12.0
OCA-git-bot May 26, 2021
341642c
[NEW] Nota Paulistana
mileo Jul 22, 2020
065416d
[ADD] serialize_nfse_paulistana
luismalta Aug 26, 2020
46a7589
[ADD] Selection for provedor paulistana
luismalta Aug 26, 2020
afbc49c
[IMP] Nota Paulistana send flow
luismalta Oct 20, 2020
5c169c6
[IMP] New Nfselib Paulistana structure
luismalta Oct 21, 2020
b794f24
[ADD] Consultar nfse Paulistana por RPS
luismalta Oct 22, 2020
9485021
[IMP] Consulta Lote Paulistana flow
luismalta Oct 22, 2020
0ec68df
[ADD] Cancel NFSe Paulistana
luismalta Oct 26, 2020
322509c
[FIX] Flake8
luismalta Oct 27, 2020
c1dc7c7
[FIX] manifest module name
luismalta Oct 27, 2020
3e06690
[ADD] README l10n_br_nfse_paulistana
luismalta Oct 27, 2020
e60742a
[ADD] Value of IssRetido
gabrielcardoso21 Jan 8, 2021
9523d08
[FIX] Iss Retido
gabrielcardoso21 Feb 2, 2021
e5d4634
[FIX] Unidecode discriminacao
gabrielcardoso21 Mar 8, 2021
f1bc7c8
[FIX] Retorno
gabrielcardoso21 Mar 8, 2021
b2bfeb0
[FIX] Consulta
gabrielcardoso21 Mar 9, 2021
ad57277
[ADD] Additional data to NFS-e
gabrielcardoso21 Mar 10, 2021
17176ce
[FIX] After emission
gabrielcardoso21 Mar 11, 2021
57d0896
[FIX] Global variable name
gabrielcardoso21 Apr 16, 2021
1df90de
[ADD] Support CPF
gabrielcardoso21 May 4, 2021
14e5b73
[REM] api.multi
mileo May 26, 2021
2cd634d
[UPG] erpbrasil.assinatura==1.2.0 e erpbrasil.edoc==2.2.0
mileo May 26, 2021
72442a9
[FIX] CPF
gabrielcardoso21 May 5, 2021
1267518
[FIX] Float values
gabrielcardoso21 May 18, 2021
15d0e20
[FIX] Tests
mileo May 26, 2021
01de235
[FIX] Field name
gabrielcardoso21 May 26, 2021
5d80c56
[FIX] Assinatura Paulistana
mileo May 26, 2021
1055940
[ADD] l10n_br_delivery migration 12.0.1.0.0
renatonlima May 26, 2021
baee10d
[FIX] Paulistana Tests
mileo May 26, 2021
63d1941
[FIX] nfse environment
mileo May 26, 2021
fbcc224
[FIX] Missing file
mileo May 26, 2021
b4427f4
Merge PR #1410 into 12.0
OCA-git-bot May 27, 2021
37c0928
[FIX] Filtros mais simples na paulistana
mileo May 27, 2021
64897a9
Merge PR #926 into 12.0
OCA-git-bot May 27, 2021
5e7bcc7
[UPD] Update l10n_br_nfse.pot
oca-travis May 27, 2021
9b75e09
[UPD] Update l10n_br_nfse_ginfes.pot
oca-travis May 27, 2021
f3cc609
[UPD] Update l10n_br_nfse_issnet.pot
oca-travis May 27, 2021
6376d5d
[UPD] Update l10n_br_nfse_paulistana.pot
oca-travis May 27, 2021
7205d7f
[UPD] addons table in README.md
OCA-git-bot May 27, 2021
4aa22c5
[UPD] README.rst
OCA-git-bot May 27, 2021
d3e3905
[ADD] setup.py
OCA-git-bot May 27, 2021
710cbca
no 0.0 default for Floats and Monetary, no required for Floats
rvalyi May 27, 2021
c95661c
Merge PR #1415 into 12.0
OCA-git-bot May 27, 2021
0ad49f6
[UPD] Update l10n_br_fiscal.pot
oca-travis May 27, 2021
2c6e597
[IMP] Included CFOP in Sale Report.
mbcosta May 28, 2021
993bf94
Merge PR #1417 into 12.0
OCA-git-bot May 28, 2021
fc9fba8
[UPD] Update l10n_br_sale.pot
oca-travis May 28, 2021
538602c
l10n_br_sale 12.0.5.4.0
OCA-git-bot May 28, 2021
51fa772
[UPD] addons table in README.md
OCA-git-bot May 28, 2021
c890b6c
[REF] Standard OCA website l10n_br_account
mileo May 30, 2021
1b9f190
[REF] Standard OCA website l10n_br_account_bank_statement_import_cnab
mileo May 30, 2021
036fac6
[REF] Standard OCA website l10n_br_account_payment_order
mileo May 30, 2021
98f5e2c
[REF] Standard OCA website l10n_br_coa
mileo May 30, 2021
be63269
[REF] Standard OCA website l10n_br_coa_complete
mileo May 30, 2021
89bb4d8
[REF] Standard OCA website l10n_br_coa_generic
mileo May 30, 2021
4a27a08
[REF] Standard OCA website l10n_br_coa_simple
mileo May 30, 2021
467604e
[REF] Standard OCA website l10n_br_contract
mileo May 30, 2021
851e7b2
[REF] Standard OCA website l10n_br_crm
mileo May 30, 2021
956b51a
[REF] Standard OCA website l10n_br_delivery
mileo May 30, 2021
d98a623
[REF] Standard OCA website l10n_br_fiscal
mileo May 30, 2021
db2154d
[REF] Standard OCA website l10n_br_hr
mileo May 30, 2021
e026eb1
[REF] Standard OCA website l10n_br_hr_contract
mileo May 30, 2021
1d40767
[REF] Standard OCA website l10n_br_nfe
mileo May 30, 2021
7e34f57
[REF] Standard OCA website l10n_br_portal
mileo May 30, 2021
67de636
[REF] Standard OCA website l10n_br_purchase
mileo May 30, 2021
5365999
[REF] Standard OCA website l10n_br_purchase_stock
mileo May 30, 2021
4d069f4
[REF] Standard OCA website l10n_br_sale
mileo May 30, 2021
bd6454c
[REF] Standard OCA website l10n_br_sale_stock
mileo May 30, 2021
bdc70c9
[REF] Standard OCA website l10n_br_stock
mileo May 30, 2021
7a80c27
[REF] Standard OCA website l10n_br_stock_account
mileo May 30, 2021
db8c238
[REF] Standard OCA website l10n_br_sale_delivery
mileo May 30, 2021
49481fc
[REF] Standard OCA website l10n_br_zip
mileo May 30, 2021
88bf0f2
[REF] Standard OCA website l10n_br_nfe_spec
mileo May 31, 2021
d779d1c
[REF] Standard OCA website payment_cielo
mileo May 31, 2021
b6695f8
Merge PR #1419 into 12.0
OCA-git-bot May 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ addon | version | summary
[l10n_br_account](l10n_br_account/) | 12.0.5.1.0 | Brazilian Localization Account
[l10n_br_account_bank_statement_import_cnab](l10n_br_account_bank_statement_import_cnab/) | 12.0.1.0.0 | Importação de Extrato Bancário CNAB 240 - Segmento E
[l10n_br_account_payment_order](l10n_br_account_payment_order/) | 12.0.1.0.0 | Brazilian Payment Order
[l10n_br_base](l10n_br_base/) | 12.0.3.1.0 | Customization of base module for implementations in Brazil.
[l10n_br_base](l10n_br_base/) | 12.0.3.2.0 | Customization of base module for implementations in Brazil.
[l10n_br_coa](l10n_br_coa/) | 12.0.3.1.0 | Base Brasilian Localization for the Chart of Accounts
[l10n_br_coa_complete](l10n_br_coa_complete/) | 12.0.1.0.0 | Plano de Contas Completo para empresas Simples, Presumido, Real, SA, Consolidação
[l10n_br_coa_generic](l10n_br_coa_generic/) | 12.0.4.1.0 | Plano de Contas para empresas do Regime normal (Micro e pequenas empresas)
Expand All @@ -88,7 +88,7 @@ addon | version | summary
[l10n_br_crm](l10n_br_crm/) | 12.0.1.0.0 | Brazilian Localization CRM
[l10n_br_currency_rate_update](l10n_br_currency_rate_update/) | 12.0.1.0.0 | Update exchange rates using OCA modules for Brazil
[l10n_br_delivery](l10n_br_delivery/) | 12.0.3.0.0 | This module changes the delivery model strategy to match brazilian standards.
[l10n_br_fiscal](l10n_br_fiscal/) | 12.0.13.2.0 | Brazilian fiscal core module.
[l10n_br_fiscal](l10n_br_fiscal/) | 12.0.13.3.0 | Brazilian fiscal core module.
[l10n_br_hr](l10n_br_hr/) | 12.0.1.0.0 | Brazilian Localization HR
[l10n_br_hr_contract](l10n_br_hr_contract/) | 12.0.1.1.0 | Brazilian Localization HR Contract
[l10n_br_mis_report](l10n_br_mis_report/) | 12.0.1.2.0 | Templates de relatórios contábeis brasileiros: Balanço Patrimonial e DRE
Expand All @@ -97,13 +97,14 @@ addon | version | summary
[l10n_br_nfse](l10n_br_nfse/) | 12.0.4.1.0 | NFS-e
[l10n_br_nfse_ginfes](l10n_br_nfse_ginfes/) | 12.0.3.0.0 | NFS-e (Ginfes)
[l10n_br_nfse_issnet](l10n_br_nfse_issnet/) | 12.0.3.0.0 | NFS-e (ISSNet)
[l10n_br_nfse_paulistana](l10n_br_nfse_paulistana/) | 12.0.1.0.0 | NFS-e (Nota Paulistana)
[l10n_br_portal](l10n_br_portal/) | 12.0.1.2.0 | Campos Brasileiros no Portal
[l10n_br_purchase](l10n_br_purchase/) | 12.0.4.3.0 | Brazilian Localization Purchase
[l10n_br_purchase_stock](l10n_br_purchase_stock/) | 12.0.2.0.0 | Brazilian Localization Purchase Stock
[l10n_br_repair](l10n_br_repair/) | 12.0.5.1.0 | Brazilian Localization Repair
[l10n_br_resource](l10n_br_resource/) | 12.0.1.1.0 | This module extend core resource to create important brazilian informations. Define a Brazilian calendar and some tools to compute dates used in financial and payroll modules
[l10n_br_sale](l10n_br_sale/) | 12.0.5.3.0 | Brazilian Localization Sale
[l10n_br_sale_stock](l10n_br_sale_stock/) | 12.0.5.2.2 | Brazilian Localization Sales and Warehouse
[l10n_br_sale](l10n_br_sale/) | 12.0.5.4.0 | Brazilian Localization Sale
[l10n_br_sale_stock](l10n_br_sale_stock/) | 12.0.5.3.0 | Brazilian Localization Sales and Warehouse
[l10n_br_stock](l10n_br_stock/) | 12.0.1.0.0 | Brazilian Localization Warehouse
[l10n_br_stock_account](l10n_br_stock_account/) | 12.0.4.0.0 | Brazilian Localization WMS Accounting
[l10n_br_website_sale](l10n_br_website_sale/) | 12.0.1.2.0 | Website sale localização brasileira.
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category": "Localisation",
"license": "AGPL-3",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "http://github.com/OCA/l10n-brazil",
"website": "https://github.com/OCA/l10n-brazil",
"version": "12.0.5.1.0",
"depends": ["account_cancel", "l10n_br_coa", "l10n_br_fiscal"],
"data": [
Expand Down
12 changes: 6 additions & 6 deletions l10n_br_account/i18n/l10n_br_account.pot
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ msgid "Document Type"
msgstr ""

#. module: l10n_br_account
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:70
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:69
#, python-format
msgid "Document line without Operation !"
msgstr ""

#. module: l10n_br_account
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:40
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:39
#, python-format
msgid "Document without Operation !"
msgstr ""
Expand Down Expand Up @@ -221,8 +221,8 @@ msgid "Fiscal Operation Line"
msgstr ""

#. module: l10n_br_account
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:48
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:77
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:47
#: code:addons/l10n_br_account/wizards/account_invoice_refund.py:76
#, python-format
msgid "Fiscal Operation: There is not Return Operation for %s !"
msgstr ""
Expand Down Expand Up @@ -457,13 +457,13 @@ msgid "You can find a contact by its Name, TIN, Email or Internal Reference."
msgstr ""

#. module: l10n_br_account
#: code:addons/l10n_br_account/models/account_invoice.py:426
#: code:addons/l10n_br_account/models/account_invoice.py:413
#, python-format
msgid "You can't set this document number: {} to draft because this document is cancelled in SEFAZ"
msgstr ""

#. module: l10n_br_account
#: code:addons/l10n_br_account/models/fiscal_document.py:27
#: code:addons/l10n_br_account/models/fiscal_document.py:26
#, python-format
msgid "You cannot delete a fiscal document which is not draft state."
msgstr ""
Expand Down
19 changes: 0 additions & 19 deletions l10n_br_account/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ class AccountInvoice(models.Model):
stored=True,
)

@api.multi
def _get_amount_lines(self):
"""Get object lines instaces used to compute fields"""
return self.mapped('invoice_line_ids')

@api.multi
@api.depends('move_id.line_ids', 'move_id.state')
def _compute_financial(self):
for invoice in self:
Expand All @@ -125,15 +123,13 @@ def _shadowed_fields(self):
from the parent."""
return SHADOWED_FIELDS

@api.multi
def _prepare_shadowed_fields_dict(self, default=False):
self.ensure_one()
vals = self._convert_to_write(self.read(self._shadowed_fields())[0])
if default: # in case you want to use new rather than write later
return {'default_%s' % (k,): vals[k] for k in vals.keys()}
return vals

@api.multi
def _write_shadowed_fields(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
for invoice in self:
Expand Down Expand Up @@ -201,21 +197,18 @@ def create(self, values):
invoice._write_shadowed_fields()
return invoice

@api.multi
def write(self, values):
result = super().write(values)
self._write_shadowed_fields()
return result

@api.multi
def unlink(self):
"""Allows delete a draft or cancelled invoices"""
self.filtered(lambda i: i.state in ('draft', 'cancel')).write(
{'move_name': False}
)
return super().unlink()

@api.multi
@api.returns('self', lambda value: value.id)
def copy(self, default=None):
default = default or {}
Expand Down Expand Up @@ -294,7 +287,6 @@ def tax_line_move_line_get(self):
# new_tax_lines_dict.append(new_tax)
return tax_lines_dict

@api.multi
def finalize_invoice_move_lines(self, move_lines):
lines = super().finalize_invoice_move_lines(move_lines)
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
Expand All @@ -316,7 +308,6 @@ def finalize_invoice_move_lines(self, move_lines):
count += 1
return lines

@api.multi
def get_taxes_values(self):
# uncomment these lines
# dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
Expand Down Expand Up @@ -372,7 +363,6 @@ def _onchange_fiscal_operation_id(self):
if self.fiscal_operation_id and self.fiscal_operation_id.journal_id:
self.journal_id = self.fiscal_operation_id.journal_id

@api.multi
def open_fiscal_document(self):
if self.env.context.get('type', '') == 'out_invoice':
action = self.env.ref(
Expand All @@ -394,7 +384,6 @@ def open_fiscal_document(self):
action['res_id'] = self.id
return action

@api.multi
def action_date_assign(self):
"""Usamos esse método para definir a data de emissão do documento
fiscal e numeração do documento fiscal para ser usado nas linhas
Expand All @@ -407,15 +396,13 @@ def action_date_assign(self):
invoice.fiscal_document_id._document_date()
invoice.fiscal_document_id._document_number()

@api.multi
def action_move_create(self):
result = super().action_move_create()
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
self.mapped('fiscal_document_id').filtered(
lambda d: d != dummy_doc).action_document_confirm()
return result

@api.multi
def action_invoice_draft(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
for i in self.filtered(lambda d: d.fiscal_document_id != dummy_doc):
Expand All @@ -429,7 +416,6 @@ def action_invoice_draft(self):
i.fiscal_document_id.action_document_back2draft()
return super().action_invoice_draft()

@api.multi
def action_document_send(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
invoices = self.filtered(lambda d: d.fiscal_document_id != dummy_doc)
Expand All @@ -438,25 +424,21 @@ def action_document_send(self):
for invoice in invoices:
invoice.move_id.post(invoice=invoice)

@api.multi
def action_document_cancel(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
for i in self.filtered(lambda d: d.fiscal_document_id != dummy_doc):
return i.fiscal_document_id.action_document_cancel()

@api.multi
def action_document_correction(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
for i in self.filtered(lambda d: d.fiscal_document_id != dummy_doc):
return i.fiscal_document_id.action_document_correction()

@api.multi
def action_document_invalidate(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
for i in self.filtered(lambda d: d.fiscal_document_id != dummy_doc):
return i.fiscal_document_id.action_document_invalidate()

@api.multi
def action_document_back2draft(self):
"""Sets fiscal document to draft state and cancel and set to draft
the related invoice for both documents remain equivalent state."""
Expand All @@ -465,7 +447,6 @@ def action_document_back2draft(self):
i.action_cancel()
i.action_invoice_draft()

@api.multi
def action_invoice_cancel(self):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
for i in self.filtered(lambda d: d.fiscal_document_id != dummy_doc):
Expand Down
3 changes: 0 additions & 3 deletions l10n_br_account/models/account_invoice_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def _shadowed_fields(self):
from the parent."""
return SHADOWED_FIELDS

@api.multi
def _prepare_shadowed_fields_dict(self, default=False):
self.ensure_one()
vals = self._convert_to_write(self.read(self._shadowed_fields())[0])
Expand Down Expand Up @@ -203,7 +202,6 @@ def create(self, values):
line.fiscal_document_line_id.write(shadowed_fiscal_vals)
return line

@api.multi
def write(self, values):
dummy_line = self.env.ref('l10n_br_fiscal.fiscal_document_line_dummy')
if values.get('invoice_id'):
Expand All @@ -217,7 +215,6 @@ def write(self, values):
line.fiscal_document_line_id.write(shadowed_fiscal_vals)
return result

@api.multi
def unlink(self):
dummy_doc_line_id = self.env.ref(
'l10n_br_fiscal.fiscal_document_line_dummy').id
Expand Down
3 changes: 1 addition & 2 deletions l10n_br_account/models/account_move.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2021 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, models
from odoo import models

from odoo.addons.l10n_br_fiscal.constants.fiscal import (
SITUACAO_EDOC_AUTORIZADA,
Expand All @@ -12,7 +12,6 @@
class AccountMove(models.Model):
_inherit = 'account.move'

@api.multi
def post(self, invoice=False):
dummy_doc = self.env.ref('l10n_br_fiscal.fiscal_document_dummy')
result = super().post(invoice)
Expand Down
3 changes: 1 addition & 2 deletions l10n_br_account/models/account_tax.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2009 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, fields, models
from odoo import fields, models


class AccountTax(models.Model):
Expand All @@ -15,7 +15,6 @@ class AccountTax(models.Model):
string='Fiscal Taxes',
)

@api.multi
def compute_all(
self,
price_unit,
Expand Down
3 changes: 1 addition & 2 deletions l10n_br_account/models/account_tax_template.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2013 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, fields, models
from odoo import fields, models


class AccountTaxTemplate(models.Model):
Expand All @@ -15,7 +15,6 @@ class AccountTaxTemplate(models.Model):
string='Fiscal Taxes',
)

@api.multi
def _generate_tax(self, company):
mapping = super()._generate_tax(company)
taxes_template = self.browse(mapping.get('tax_template_to_tax').keys())
Expand Down
3 changes: 1 addition & 2 deletions l10n_br_account/models/fiscal_document.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2009 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import _, api, models, fields
from odoo import _, models, fields
from odoo.exceptions import UserError

from odoo.addons.l10n_br_fiscal.constants.fiscal import (
Expand All @@ -18,7 +18,6 @@ class FiscalDocument(models.Model):
string="Invoices",
)

@api.multi
def unlink(self):
non_draft_documents = self.filtered(
lambda d: d.state != SITUACAO_EDOC_EM_DIGITACAO)
Expand Down
5 changes: 1 addition & 4 deletions l10n_br_account/models/fiscal_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2019 - TODAY Raphaël Valyi - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, fields, models
from odoo import fields, models
from odoo.addons.account.models.account_invoice import TYPE2JOURNAL

FISCAL_TYPE_INVOICE = {
Expand Down Expand Up @@ -34,7 +34,6 @@ class Operation(models.Model):
company_dependent=True,
)

@api.multi
def _change_action_view(self, action):
fiscal_op_type = action.get('context')
if fiscal_op_type == 'out':
Expand All @@ -57,7 +56,6 @@ def _change_action_view(self, action):
new_action['domain'] = action.get('domain', {})
return new_action.read()[0]

@api.multi
def action_create_new(self):
action = super().action_create_new()
action['res_model'] = 'account.invoice'
Expand All @@ -66,7 +64,6 @@ def action_create_new(self):
action['context'] = self._change_action_view(action)['context']
return action

@api.multi
def open_action(self):
action = super().open_action()
return self._change_action_view(action)
Expand Down
4 changes: 0 additions & 4 deletions l10n_br_account/models/fiscal_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
class FiscalTax(models.Model):
_inherit = 'l10n_br_fiscal.tax'

@api.multi
def account_taxes(self, user_type='sale'):
account_taxes = self.env['account.tax']
for fiscal_tax in self:
Expand All @@ -16,7 +15,6 @@ def account_taxes(self, user_type='sale'):
lambda t: t.type_tax_use == user_type and t.active)
return account_taxes

@api.multi
def _account_taxes(self):
self.ensure_one()
account_tax_group = self.tax_group_id.account_tax_group()
Expand All @@ -25,7 +23,6 @@ def _account_taxes(self):
('active', '=', True)]
)

@api.multi
def _create_account_tax(self):
for fiscal_tax in self:
account_taxes = fiscal_tax._account_taxes()
Expand Down Expand Up @@ -54,7 +51,6 @@ def create(self, values):
fiscal_taxes._create_account_tax()
return fiscal_taxes

@api.multi
def unlink(self):
for fiscal_tax in self:
account_taxes = fiscal_tax._account_taxes()
Expand Down
3 changes: 1 addition & 2 deletions l10n_br_account/models/fiscal_tax_group.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (C) 2009 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, models
from odoo import models


class FiscalTaxGroup(models.Model):
_inherit = 'l10n_br_fiscal.tax.group'

@api.multi
def account_tax_group(self):
self.ensure_one()
return self.env['account.tax.group'].search(
Expand Down
Loading