-
- Downloads
[FIX] base_address_city: Inherit city_id from parent contact
If you create an individual contact that has a company contact as the parent, it will inherit certain fields from that parent, which are defined by `_address_fields` in `res.partner`. `base_address_city` allows enforcing picking a city from a pre-defined list, which gets stored in `city_id` instead of the standard free-text `city` field on `res.partner`. If you change `city_id`, an `onchange` will update `city`. `city_id` was not being inherited from the parent, which means the contact ends up in an inconsistent state: `city` will be set, but `city_id` will not. In the Colombian accounting localization, which uses the enforced city feature, a municipality code which is part of the record behind `city_id` is mandatory in certain electronic invoice XML fields that get sent to Carvajal. This value will incorrectly be 0 if `city_id` is not set on the contact due to the above issue, causing the invoice to be rejected. This fix lets a contact inherit the `city_id` from its parent if `base_address_city` is installed. opw-2638687 closes odoo/odoo#81239 X-original-commit: e4345c81 Signed-off-by:Quentin De Paoli <qdp@odoo.com> Signed-off-by:
Raf Geens <raf@odoo.com>
Please register or sign in to comment