Commit 84106a1
committed
[FIX] website_sale: store empty fields as False
If you specify an empty VAT number in the Contacts app, it will store it
as `False` in the ORM. If a new partner is created through the shop, the
VAT number is set through HTML form submission. It will use `''` for an
empty VAT number. When evaluating the VAT number in Python code, it will
usually be converted to a boolean, so it doesn't matter if it's `False`
or `''`. But in ORM queries those are two different values and code that
checks on `False` to check for the presence of a VAT number can
misinterpret `''` as being one.
This fix replaces `''` values submitted through the address form in the
shop with `False`.
opw-3114246
closes odoo#114588
X-original-commit: db701c2
Signed-off-by: Merel Geens <mege@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>1 parent 09091dd commit 84106a1
1 file changed
+15
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
| 1043 | + | |
1048 | 1044 | | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1053 | 1058 | | |
1054 | 1059 | | |
1055 | 1060 | | |
| |||
1146 | 1151 | | |
1147 | 1152 | | |
1148 | 1153 | | |
1149 | | - | |
| 1154 | + | |
1150 | 1155 | | |
1151 | 1156 | | |
1152 | 1157 | | |
| |||
0 commit comments