Files
odoo_source/addons/l10n_pe/data/res_country_data.xml
T
Fabien Pinckaers 5b72f01766 [IMP] cleanup of base_address_city & base_address_extension
Rely on country.address_view_id instead of hacking the view on the fly. The
address layout (street VS street_name street_number street_number2) depends now
on the country of the user, not on the installed localisation. (it's now
configurable per country)

Unified street format to "Chaussee de Namur 40 - Appt 12"; the
configurable ones where actually wrong by country.

Allow street split without base_address_extended; all EDIs can now be
used with or without base_address_extended.

Merged base_address_city into base_address_extension, to avoid creating bridge
modules for no reason. Uses city_id instead of city if the country of the user
defines it AND if enforce_cities is set on this country.

Improved post_init script for large databases.

Split of street removed on res.company. (not required by any l10n)

[IMP] l10n_cn_city,l10n_nl,l10n_cl,l10n_co,l10n_pe: base_address_extended improvements

l10n_cn_city defined cities but did not provide a means to edit the city_id, so enforce_cities
l10n_nl only requires street names and numbers and thus does not need to depend on base_address_extended
l10n_cl should not depend on base_address_extended as none of the features are used
l10n_pe improve the view
l10n_co remove base_address_city dependency - move to l10n_co_edi

closes odoo/odoo#81710

Related: odoo/enterprise#23108
Related: odoo/upgrade#3129
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-25 17:21:04 +00:00

47 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="pe_partner_address_form" model="ir.ui.view">
<field name="name">pe.partner.form.address</field>
<field name="model">res.partner</field>
<field name="priority" eval="900"/>
<field name="arch" type="xml">
<form>
<div class="o_address_format">
<field name="country_enforce_cities" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="street" placeholder="Street..." class="o_address_street"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="street2" placeholder="Street 2..." class="o_address_street"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="l10n_pe_district" placeholder="District..." class="o_address_street"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="city_id"
placeholder="City"
class="o_address_city"
domain="[('country_id', '=', country_id)]"
attrs="{'invisible': [('country_enforce_cities', '=', False)], 'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"
context="{'default_country_id': country_id, 'default_state_id': state_id, 'default_zipcode': zip}"/>
<field name="city"
placeholder="City"
class="o_address_city"
attrs="{'invisible': [('country_enforce_cities', '=', True), '|', ('city_id', '!=', False), ('city', 'in', ['',False])],
'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}"
context="{'default_country_id': country_id}"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
</div>
</form>
</field>
</record>
<record id="base.pe" model="res.country">
<field name="enforce_cities" eval="1" />
<field name="address_view_id" ref="pe_partner_address_form" />
<field name="address_format" eval="'%(street)s\n%(zip)s%(city)s\n%(state_name)s\n%(country_name)s'"/>
</record>
</odoo>