Skip to content

Commit

Permalink
[FIX] partner_invoicing_mode_cash_on_delivery: Avoid relation table c…
Browse files Browse the repository at this point in the history
…ollisions
  • Loading branch information
rousseldenis committed Jun 13, 2024
1 parent f2e4a0c commit 2e2bb89
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ class StockPicking(models.Model):
_inherit = "stock.picking"

cash_on_delivery_invoice_ids = fields.Many2many(
"account.move", string="COD Invoices", copy=False, readonly=True
comodel_name="account.move",
# Force the table relation to avoid naming collisions
relation="stock_picking_cash_on_delivery_move_id_rel",
column1="picking_id",
column2="move_id",
string="COD Invoices",
copy=False,
readonly=True,
)

def _invoice_at_shipping(self):
Expand Down

0 comments on commit 2e2bb89

Please sign in to comment.