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

[16.0][spec_driven_model][l10n_br_nfe][l10n_br_nfe_spec][l10n_br_account_nfe] Oca port spec driven model 14.0 to 15.0 51e0f3 (fwp 3427 + 3431) #3514

Merged

Conversation

rvalyi
Copy link
Member

@rvalyi rvalyi commented Nov 30, 2024

port de #3427 e #3431

a dificuldade foi um pouco em resolver os conflitos nos métodos _build_model do spec_driven_model/models/spec_models.py que tiveram algumas adaptações parta migrar para a v15, mas deu certo, ufa.

@OCA-git-bot
Copy link
Contributor

Hi @antoniospneto, @felipemotter, @mbcosta, @renatonlima,
some modules you are maintaining are being modified, check this out!

@rvalyi rvalyi marked this pull request as draft November 30, 2024 04:40
@rvalyi rvalyi changed the title [15.0][spec_driven_model][l10n_br_nfe][l10n_br_nfe_spec][l10n_br_account_nfe] Oca port spec driven model 14.0 to 15.0 51e0f3 (fwp 3431) [16.0][spec_driven_model][l10n_br_nfe][l10n_br_nfe_spec][l10n_br_account_nfe] Oca port spec driven model 14.0 to 15.0 51e0f3 (fwp 3431) Nov 30, 2024
@rvalyi rvalyi force-pushed the oca-port-spec_driven_model-14.0-to-16.0-51e0f3 branch 6 times, most recently from d489aa0 to 1bc571d Compare January 12, 2025 15:46
@rvalyi rvalyi force-pushed the oca-port-spec_driven_model-14.0-to-16.0-51e0f3 branch 9 times, most recently from 452fc10 to 883af7e Compare January 13, 2025 13:22
@rvalyi
Copy link
Member Author

rvalyi commented Jan 13, 2025

agora so tem essa falha nos testes, qualquer ajuda esta bem vinda:

2025-01-13 13:21:26,784 22052 ERROR odoo16 odoo.addons.l10n_br_nfe.tests.test_nfce: ERROR: TestNFCe.test_view_nfce_pdf
Traceback (most recent call last):
  File "/home/rvalyi/DEV/odoo16/odoo/external-src/l10n-brazil/l10n_br_nfe/tests/test_nfce.py", line 50, in setUp
    self.prepare_test_nfe(self.document_id)
  File "/home/rvalyi/DEV/odoo16/odoo/external-src/l10n-brazil/l10n_br_nfe/tests/test_nfe_serialize.py", line 41, in prepare_test_nfe
    nfe.nfe40_detPag = [
    ^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/fields.py", line 1325, in __set__
    records.write({self.name: write_value})
  File "/home/rvalyi/DEV/odoo16/odoo/src/addons/mail/models/mail_thread.py", line 315, in write
    result = super(MailThread, self).write(values)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/models.py", line 3776, in write
    field.write(self, value)
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/fields.py", line 4267, in write
    return self.write_batch([(records, value)])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/fields.py", line 4288, in write_batch
    return self.write_real(records_commands_list, create)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/fields.py", line 4484, in write_real
    unlink(comodel.search(domain))
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/models.py", line 1519, in search
    res = self._search(domain, offset=offset, limit=limit, order=order, count=count)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/models.py", line 4682, in _search
    query = self._where_calc(domain)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/models.py", line 4447, in _where_calc
    return expression.expression(domain, self).query
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/osv/expression.py", line 447, in __init__
    self.parse()
  File "/home/rvalyi/DEV/odoo16/odoo/src/odoo/osv/expression.py", line 674, in parse
    raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf)))
ValueError: Invalid field nfe.40.detpag.id in leaf ('id', 'not in', [])

EDIT: eu resolvi, so organizando os commits aqui...

@rvalyi rvalyi force-pushed the oca-port-spec_driven_model-14.0-to-16.0-51e0f3 branch 3 times, most recently from d61eb7e to bc39fab Compare January 13, 2025 15:29
@rvalyi rvalyi changed the title [16.0][spec_driven_model][l10n_br_nfe][l10n_br_nfe_spec][l10n_br_account_nfe] Oca port spec driven model 14.0 to 15.0 51e0f3 (fwp 3431) [16.0][spec_driven_model][l10n_br_nfe][l10n_br_nfe_spec][l10n_br_account_nfe] Oca port spec driven model 14.0 to 15.0 51e0f3 (fwp 3427 + 3431) Jan 13, 2025
@rvalyi rvalyi force-pushed the oca-port-spec_driven_model-14.0-to-16.0-51e0f3 branch from bc39fab to 5abf405 Compare January 13, 2025 16:13
@rvalyi rvalyi force-pushed the oca-port-spec_driven_model-14.0-to-16.0-51e0f3 branch from 5abf405 to b1d6257 Compare January 13, 2025 16:15
@rvalyi rvalyi force-pushed the oca-port-spec_driven_model-14.0-to-16.0-51e0f3 branch from b1d6257 to a5bc4ed Compare January 13, 2025 16:34
@rvalyi rvalyi marked this pull request as ready for review January 13, 2025 16:47
Copy link
Member

@marcelsavegnago marcelsavegnago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rvalyi
Copy link
Member Author

rvalyi commented Jan 15, 2025

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-3514-by-rvalyi-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 65c5f24 into OCA:16.0 Jan 15, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 495128a. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants