Skip to content

Commit

Permalink
[FIX] sale_product_configurator: allow type False for customValue
Browse files Browse the repository at this point in the history
Steps to reproduce(locally):
1) Create SO with the product that has a custom value attribute
2) Leave the custom field empty
3) Save SO and open product configurator again
4) Observe TypeError traceback

Reason: customValue is supposed to be string but if value is not set,
it remains False which cause a type error.

After this commit: allow customValue be false

X-original-commit: 4ce49fd
Part-of: odoo#150653
  • Loading branch information
vchu-odoo committed Jan 26, 2024
1 parent 2359857 commit 212b466
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class ProductTemplateAttributeLine extends Component {
type: String,
validate: type => ["always", "dynamic", "no_variant"].includes(type),
},
customValue: { type: String, optional: true },
customValue: {type: [{value: false}, String], optional: true},
};

//--------------------------------------------------------------------------
Expand Down

0 comments on commit 212b466

Please sign in to comment.