Skip to content

[16.0][MIG] pos_customer_required_fields: migration to 16.0#1520

Open
huguesdk wants to merge 20 commits intoOCA:16.0from
coopiteasy:16.0-mig-pos_customer_required_fields
Open

[16.0][MIG] pos_customer_required_fields: migration to 16.0#1520
huguesdk wants to merge 20 commits intoOCA:16.0from
coopiteasy:16.0-mig-pos_customer_required_fields

Conversation

@huguesdk
Copy link
Copy Markdown
Member

@huguesdk huguesdk commented Apr 3, 2026

follow-up of #1249.

petrus-v and others added 19 commits April 3, 2026 11:45
Ensure desired fields are collect on customer Pos Order
In case there is no required field we don't want to
lock user on payment screen.

As required fields list is stored in string variable
spliting an empty string return an array of one empty
string which would return one missing field which
is locking users
Currently translated at 10.0% (1 of 10 strings)

Translation: pos-12.0/pos-12.0-pos_customer_required_fields
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_customer_required_fields/it/
Currently translated at 100.0% (10 of 10 strings)

Translation: pos-12.0/pos-12.0-pos_customer_required_fields
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_customer_required_fields/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_customer_required_fields
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_customer_required_fields/
* fix access error to ir.model.fields for normal users.
* remove useless field.
* convert PartnerDetailsEdit.js to native javascript module.
* remove usesell PartnerDetailsEdit.xml.
restore verification of the value of the fields of the selected partner
on the payment screen, that was lost during the porting to 16.0.
Comment on lines +24 to +34
const baseElement = document.querySelector(
"section.partner-details"
);
required_fields.forEach((field_name) => {
const inputField = baseElement.querySelector(
`input[name="${field_name}"]`
);
if (inputField) {
inputField.setAttribute("required", true);
}
});
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it seems strange to me to do something like this while using owl. does someone knows a better way?

@legalsylvain
Copy link
Copy Markdown
Contributor

Hi. Thanks for porting this module.

I don't understand how it can work in reality, as there is a single fields with the list of fields required.

In my opinion, we should have 2 fields :

res_partner_individual_required_fields_ids
res_partner_company_required_fields_ids

IE : In the screenshot, there is the "firstname". It doesn't make sense for company.
I guess that you could also force user to enter a VAT number for company customer (in a e-invoicing context), but it will prevent creating individual.

Don't you think ?

Thanks !

@huguesdk
Copy link
Copy Markdown
Member Author

huguesdk commented Apr 3, 2026

that’s an interesting point, indeed! one of our customers uses this with only the email field, so it works with both. @petrus-v what do you think about @legalsylvain's remark? what was your use-case when designing this module?

@petrus-v
Copy link
Copy Markdown

petrus-v commented Apr 3, 2026

The suggestion make sense legit to me, I guess we didn't needs it at that time.

@gregory-moka, @Rom10811 do you still use this module, do you have any opinion ?

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.

8 participants