Skip to content

[7122][ADD] partner_end_customer - #259

Merged
yostashiro merged 11 commits into
18.0from
7122-add-partner_final_customer
Sep 4, 2026
Merged

[7122][ADD] partner_end_customer#259
yostashiro merged 11 commits into
18.0from
7122-add-partner_final_customer

Conversation

@smorita7749

@smorita7749 smorita7749 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

QT7122

This module adds an end customer field (free text) to res.partner, and as a related, stored field to sale.order, so it can be shown as an optional (hidden by default) column and searched in the partner and sale order lists.

@smorita7749

Copy link
Copy Markdown
Contributor Author

Add ja.po

Translation notes

The following terms have no reference and are translated independently:

msgid msgstr
Final Customer 最終顧客

@smorita7749
smorita7749 force-pushed the 7122-add-partner_final_customer branch from 47c03dd to 24e6816 Compare August 13, 2026 04:52
…artner search filter

"End customer" is the more standard English business term than
"final customer". Also add the field to the res.partner search view
filter, matching the existing sale order search integration.
@smorita7749 smorita7749 changed the title [7122][ADD] partner_final_customer [7122][ADD] partner_end_customer Aug 14, 2026
…nt.move support

A related field always recomputes from its target path, so changing a
partner's end_customer retroactively altered the value already stored
on existing sale orders. Switch to a plain compute keyed on partner_id
only, so the value is set once per record and stays fixed regardless
of later master data edits.

Add the same field to account.move, and a pre_init_hook so installing
on a database with existing orders/invoices doesn't backfill them with
current partner data.
@AungKoKoLin1997

Copy link
Copy Markdown
Contributor

@smorita7749 Can't we use this module?
OCA/sale-workflow#3567

@smorita7749

Copy link
Copy Markdown
Contributor Author

@smorita7749 Can't we use this module? OCA/sale-workflow#3567

The customer would like to have end_customer as Char instead of M2O, so I created it as a custom module.

@AungKoKoLin1997

Copy link
Copy Markdown
Contributor

The customer would like to have end_customer as Char instead of M2O, so I created it as a custom module.

@smorita7749 What is the reason of using Char instead of m2o?

Comment thread partner_end_customer/views/account_move_views.xml Outdated
Comment thread partner_end_customer/views/account_move_views.xml
Comment thread partner_end_customer/views/res_partner_views.xml Outdated
Comment thread partner_end_customer/views/sale_order_views.xml
@smorita7749

Copy link
Copy Markdown
Contributor Author

The customer would like to have end_customer as Char instead of M2O, so I created it as a custom module.

@smorita7749 What is the reason of using Char instead of m2o?

The customer believes rough aggregation is preferable to strict aggregation, which requires maintaining master data.

Comment thread partner_end_customer/views/account_move_views.xml
Comment thread partner_end_customer/models/sale_order.py
Comment thread partner_end_customer/views/res_partner_views.xml
Comment thread partner_end_customer/models/account_move.py
Comment thread partner_end_customer/views/sale_order_views.xml
Comment thread partner_end_customer/__manifest__.py Outdated

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: LG

@yostashiro yostashiro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread partner_end_customer/models/res_partner.py Outdated
@smorita7749

Copy link
Copy Markdown
Contributor Author

I added the following:

  • Translation
  • Change the reference of end_customer from partner_id to partner_shipping_id.

@yostashiro
yostashiro merged commit 4bc98ea into 18.0 Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants