[16.0][MIG] pos_customer_required_fields: migration to 16.0#1520
[16.0][MIG] pos_customer_required_fields: migration to 16.0#1520
Conversation
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.
| 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); | ||
| } | ||
| }); |
There was a problem hiding this comment.
it seems strange to me to do something like this while using owl. does someone knows a better way?
|
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 : IE : In the screenshot, there is the "firstname". It doesn't make sense for company. Don't you think ? Thanks ! |
|
that’s an interesting point, indeed! one of our customers uses this with only the |
|
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 ? |
follow-up of #1249.