Skip to content
Snippets Groups Projects

Add partner bank account restriction

Merged konykon requested to merge not-unique-iban into dev
1 unresolved thread

Merge request reports

Pipeline #64954 passed

Pipeline passed for e5f0df3a on not-unique-iban

Approved by
Ready to merge by members who can write to the target branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 from odoo import models
2
3
4 class ResPartnerBank(models.Model):
5 _inherit = "res.partner.bank"
6
7 _sql_constraints = [
8 (
9 "unique_number",
10 "unique(sanitized_acc_number, company_id, partner_id)",
  • I understand we inherit this constraint to add partner_id but does it make sense in all the cases?

    Multiple partners can have the same account if there's more than one "titular" of the account, or for the account of companies, multiple partners can have the same account (the same company one).

  • Please register or sign in to reply
  • removed ToBeReviewed label

  • konykon added 201 commits

    added 201 commits

    Compare with previous version

  • konykon changed milestone to %06-11-2023 Sprint

    changed milestone to %06-11-2023 Sprint

  • konykon mentioned in commit ae9355f1

    mentioned in commit ae9355f1

  • merged

  • konykon mentioned in merge request !253 (merged)

    mentioned in merge request !253 (merged)

  • Please register or sign in to reply
    Loading