Skip to content

account_payment_partner: partner_bank_id should not be set to False if payment_mode is not set #1290

@PNurm

Description

@PNurm

Module

account_payment_partner

Describe the bug

This module as of 16.0 overrides the default behavior, and previous behavior of this module in 14.0.

  • Invoices without payment_mode_id are created without a partner_bank_id

  • When creating a sales invoice through sales order without a payment_mode_id, it will create invoice without partner_bank_id. This module overrides _compute_partner_bank_id and changes the behavior so if payment_mode_id is not set, it will not assign partner_bank_id.

  • From users point of view and from configuration standpoint, users should not be forced to configure a otherwise useless payment_mode_id and set that by hand on sales order. For a lot of our customers, payment_mode_id is never used for sales, and mostly used for bills and payment orders. For sales it is unnecessary step to fill out just to get bank account to compute properly.

To Reproduce

Affected versions:
16.0

Steps to reproduce the behavior:

  1. Create sales order without setting payment_mode_id
  2. Create invoice from sales order, it will not have bank account, therefore printing invoice will not have necessary payment related information.

Expected behavior

  • partner_bank_id should still be computed regardless if payment_mode_id is undefined.

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugno staleUse this label to prevent the automated stale action from closing this PR/Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions