File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
spp_custom_fields_ui/static/src/js Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -9,20 +9,10 @@ patch(FormController.prototype, {
99 * custom fields (ir.model.fields records with target_type).
1010 */
1111 async saveButtonClicked ( params = { } ) {
12- // Check if we're editing through the custom fields UI specifically:
13- // 1. Model is ir.model.fields
14- // 2. Has target_type (grp or indv)
15- // 3. Model is res.partner (the target of custom fields)
16- // 4. State is manual (not base fields)
17- // 5. Context has default_model = 'res.partner' (from the custom fields UI actions)
18- const isCustomFieldUI =
19- this . props . resModel === "ir.model.fields" &&
20- this . model . root . data . target_type &&
21- this . model . root . data . model === "res.partner" &&
22- this . model . root . data . state === "manual" &&
23- this . props . context ?. default_model === "res.partner" ;
12+ // Check if we're editing ir.model.fields with target_type (custom fields UI)
13+ const isCustomField = this . props . resModel === "ir.model.fields" && this . model . root . data . target_type ;
2414
25- if ( ! isCustomFieldUI ) {
15+ if ( ! isCustomField ) {
2616 return super . saveButtonClicked ( params ) ;
2717 }
2818
You can’t perform that action at this time.
0 commit comments