summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-08-23 14:10:49 +0000
committerNicolas Martinelli <nim@odoo.com>2019-08-23 14:16:46 +0000
commitfb0d84b24a4f105e4f6caad207ade653ce63e07d (patch)
treeab4c4185de7484c50c48e1d699a72289d778dbe0
parent1dd73aa822aee8a0850e39a51e441380aeeabf86 (diff)
[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>
-rw-r--r--addons/portal/views/portal_templates.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml
index 193c1fdce18..4108a2006b9 100644
--- a/addons/portal/views/portal_templates.xml
+++ b/addons/portal/views/portal_templates.xml
@@ -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" />