[FIX] portal: VAT modification

The route `/my/account` doesn't implement any restriction for the VAT
modification. This allows users to modify the VAT number although they
shouldn't.

We make the restriction consistent with the backend:

https://github.com/odoo/odoo/blob/e0c7a368580dfeac9af8dc3cb3a10fc33bf4b521/odoo/addons/base/res/res_partner_view.xml#L247

opw-2056727

closes odoo/odoo#36031

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-08-23 14:16:46 +00:00
parent 1dd73aa822
commit fb0d84b24a
+2 -1
View File
@@ -279,7 +279,8 @@
</div>
<div t-if="has_check_vat" t-attf-class="form-group #{error.get('vat') and 'has-error' or ''} col-lg-6">
<label class="control-label label-optional" for="vat">VAT Number</label>
<input type="text" name="vat" class="form-control" t-att-value="vat or partner.vat" />
<!-- DO NOT FORWARD-PORT! ONLY FOR v11 -->
<input type="text" name="vat" class="form-control" t-att-value="vat or partner.vat" t-att-readonly="'1' if partner.parent_id else None" />
</div>
<div class="clearfix" />