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][FIX] l10n_br_sale_stock: _get_fiscal_partner method returning integer instead of partner object #3414

Merged
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions l10n_br_sale_stock/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
def _get_fiscal_partner(self):
self.ensure_one()
partner = super()._get_fiscal_partner()
if partner != self._get_partner_to_invoice():
partner = self._get_partner_to_invoice()
partner_to_invoice = self._get_partner_to_invoice()

Check warning on line 26 in l10n_br_sale_stock/models/stock_picking.py

View check run for this annotation

Codecov / codecov/patch

l10n_br_sale_stock/models/stock_picking.py#L26

Added line #L26 was not covered by tests
if partner.id != partner_to_invoice:
antoniospneto marked this conversation as resolved.
Show resolved Hide resolved
partner = self.env["res.partner"].browse(partner_to_invoice)

Check warning on line 28 in l10n_br_sale_stock/models/stock_picking.py

View check run for this annotation

Codecov / codecov/patch

l10n_br_sale_stock/models/stock_picking.py#L28

Added line #L28 was not covered by tests
return partner
Loading