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

[14.0][IMP] l10n_br_purchase: improving the search by fiscal document type #3580

Conversation

marcelsavegnago
Copy link
Member

No description provided.

@OCA-git-bot
Copy link
Contributor

Hi @rvalyi, @renatonlima,
some modules you are maintaining are being modified, check this out!

rvalyi
rvalyi previously approved these changes Jan 15, 2025
@rvalyi rvalyi dismissed their stale review January 15, 2025 18:53

testes quebrados

@rvalyi
Copy link
Member

rvalyi commented Jan 15, 2025

 2025-01-15 18:41:50,423 539 INFO odoo odoo.modules.loading: Module l10n_br_purchase: loading demo 
2025-01-15 18:41:50,424 539 INFO odoo odoo.modules.loading: loading l10n_br_purchase/demo/company.xml 
2025-01-15 18:41:50,430 539 INFO odoo odoo.modules.loading: loading l10n_br_purchase/demo/product.xml 
2025-01-15 18:41:50,459 539 INFO odoo odoo.modules.loading: loading l10n_br_purchase/demo/l10n_br_purchase.xml 
2025-01-15 18:41:52,040 539 INFO odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: Starting L10nBrPurchaseBaseTest.test_compatible_with_international_case ... 
2025-01-15 18:41:52,717 539 INFO odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: Starting L10nBrPurchaseBaseTest.test_fields_freight_insurance_other_costs ... 
2025-01-15 18:41:53,637 539 INFO odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: ====================================================================== 
2025-01-15 18:41:53,637 539 ERROR odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: ERROR: L10nBrPurchaseBaseTest.test_fields_freight_insurance_other_costs
Traceback (most recent call last):
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/tests/test_l10n_br_purchase.py", line 483, in test_fields_freight_insurance_other_costs
    self._invoice_purchase_order(self.po_products)
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/tests/test_l10n_br_purchase.py", line 201, in _invoice_purchase_order
    self.invoice._onchange_purchase_auto_complete()
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/models/account_move.py", line 20, in _onchange_purchase_auto_complete
    return super()._onchange_purchase_auto_complete()
  File "/opt/odoo/addons/purchase/models/account_invoice.py", line 47, in _onchange_purchase_auto_complete
    invoice_vals = self.purchase_id.with_company(self.purchase_id.company_id)._prepare_invoice()
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/models/purchase_order.py", line 113, in _prepare_invoice
    or self.fiscal_operation_id.document_type_ids[0].document_type_id.id
  File "/opt/odoo/odoo/models.py", line 5731, in __getitem__
    return self.browse((self._ids[key],))
IndexError: tuple index out of range

artworks-SvzDuFfyt3AJ9fO1-iQrV9Q-t500x500

@antoniospneto
Copy link
Contributor

 2025-01-15 18:41:50,423 539 INFO odoo odoo.modules.loading: Module l10n_br_purchase: loading demo 
2025-01-15 18:41:50,424 539 INFO odoo odoo.modules.loading: loading l10n_br_purchase/demo/company.xml 
2025-01-15 18:41:50,430 539 INFO odoo odoo.modules.loading: loading l10n_br_purchase/demo/product.xml 
2025-01-15 18:41:50,459 539 INFO odoo odoo.modules.loading: loading l10n_br_purchase/demo/l10n_br_purchase.xml 
2025-01-15 18:41:52,040 539 INFO odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: Starting L10nBrPurchaseBaseTest.test_compatible_with_international_case ... 
2025-01-15 18:41:52,717 539 INFO odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: Starting L10nBrPurchaseBaseTest.test_fields_freight_insurance_other_costs ... 
2025-01-15 18:41:53,637 539 INFO odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: ====================================================================== 
2025-01-15 18:41:53,637 539 ERROR odoo odoo.addons.l10n_br_purchase.tests.test_l10n_br_purchase: ERROR: L10nBrPurchaseBaseTest.test_fields_freight_insurance_other_costs
Traceback (most recent call last):
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/tests/test_l10n_br_purchase.py", line 483, in test_fields_freight_insurance_other_costs
    self._invoice_purchase_order(self.po_products)
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/tests/test_l10n_br_purchase.py", line 201, in _invoice_purchase_order
    self.invoice._onchange_purchase_auto_complete()
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/models/account_move.py", line 20, in _onchange_purchase_auto_complete
    return super()._onchange_purchase_auto_complete()
  File "/opt/odoo/addons/purchase/models/account_invoice.py", line 47, in _onchange_purchase_auto_complete
    invoice_vals = self.purchase_id.with_company(self.purchase_id.company_id)._prepare_invoice()
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_purchase/models/purchase_order.py", line 113, in _prepare_invoice
    or self.fiscal_operation_id.document_type_ids[0].document_type_id.id
  File "/opt/odoo/odoo/models.py", line 5731, in __getitem__
    return self.browse((self._ids[key],))
IndexError: tuple index out of range

artworks-SvzDuFfyt3AJ9fO1-iQrV9Q-t500x500

Ainda bem que tem os testes, pois parecia uma alteração tão boba haha

@marcelsavegnago marcelsavegnago force-pushed the 14.0-l10n_br_purchase-improving-search-fiscal-document-type branch from 0bc1ca6 to 3a03fa7 Compare January 15, 2025 19:44
Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

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

quase um código Lisp rs

@rvalyi
Copy link
Member

rvalyi commented Jan 16, 2025

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-3580-by-rvalyi-bump-patch, awaiting test results.

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit d2d2ece into OCA:14.0 Jan 16, 2025
7 checks passed
@marcelsavegnago marcelsavegnago deleted the 14.0-l10n_br_purchase-improving-search-fiscal-document-type branch January 16, 2025 16:36
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