Skip to content

Commit

Permalink
[RMV] redundancy: 'fop' already comes from SO whether set or not
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoParadeda committed Aug 16, 2024
1 parent df8f7e8 commit 8e3df7d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions l10n_br_stock_account/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ def _default_fiscal_operation(self):
else company.stock_out_fiscal_operation_id
)

# Casos onde o usuário definiu o Pedido de Compra/Venda como
# 'Sem Operação Fiscal'
if hasattr(self, "sale_id") and hasattr(
self.sale_id, "fiscal_operation_id"
):
# Necessário para evitar o erro quando o l10n_br_purchase_stock
# é instalado:
# /l10n_br_stock_account/models/stock_picking.py", line 34,
# in _default_fiscal_operation
# if not self.sale_id.fiscal_operation_id:
# AttributeError: 'sale.order' object has no attribute
# 'fiscal_operation_id'
if not self.sale_id.fiscal_operation_id:
fiscal_operation = False

return fiscal_operation

@api.model
Expand Down

0 comments on commit 8e3df7d

Please sign in to comment.