`_address_fields` are used by `update_address` [1], which is in turn
called by `_fields_sync` and `_children_sync`.
This mechanism is in charge of synchronizing parent/children address fields
for contacts of type == "contact", as they don't really have an address of
their own. They simply copy the address of their parent.
Without this fix, an inconsistency is created between the value of city_id
and the value of the parent.
[1]: https://github.com/odoo/odoo/blob/20648ef21/odoo/addons/base/models/res_partner.py#L429
TT33047
closesodoo/odoo#80236
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Currently, the _fields_view_get_address() method replaces the field
'city' and all of its attributes.
That causes problems for attributes that are defined
in other previously installed modules.
This fix allows the 'required' attributes to be conserved.
closesodoo/odoo#79447
X-original-commit: 1ac8b5a40440e6c4fddc0e088064ea1a706d93ab
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
When having cities with similar name it may quickly be difficult to find the
right one. Adding zip code to name search helps finding it more easily.
IN order to match this new _name_search we update name_get accordingly and
display the zip code between parenthesis.
Task ID-2525738
closesodoo/odoo#73359
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
What are the steps to reproduce your issue ?
1. Install contacts in a db with demo data
2. Create a contact with complete address
3. Click on Add button (edit mode)
What is currently happening ?
The address get copied but not completely (no zip code, state, street)
What are you expecting to happen ?
The whole address have to be copied
How to fix the bug ?
Don't call the onchange if the record is not yet created
opw-2415891
closesodoo/odoo#64071
X-original-commit: b731afa7918d9d69132af825c414d902aa57541e
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Before this commit, when the city_id field was set and then removed,
both city and city_id were shown, you would see 2 city fields in a weird
way.
opw-2312641
closesodoo/odoo#56896
X-original-commit: b381fb0b644cf3c94e798319ceecf5d6b97df9ad
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before, when city_id was not set, both city and city_id
were shown, so when you created a new partner, you would
see 2 city fields in a weird way.
Now, we only show both fields when city is set, but not city_id
That way, in case you have some old partners before the installation
of the module, it will still work.
opw-2178992
closesodoo/odoo#43871
X-original-commit: 0a2cf833f9935c44d09ff7c46513dbc37c57bfe8
Signed-off-by: Josse Colpaert <jco@openerp.com>
Have the module 'City Addresses' installed.
Open a contact, with the city field and the zip code field filled.
Before this commit, there is a display error, the city and the zip code
are bonded. This occurs because the 'City Addresses' module override all
views with the city field. In this override the city field don't had a
CSS class.
Now, the city and the zip code are display correctly.
opw-1958175
closesodoo/odoo#32455
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Cherry pick of 0edd3ea5b4 in version 12.0
Have a Lead with the contact informations (Customer Name, Street,
Street 2, City, State, ZIP, Country) completed in the 'Followup' page.
Before this commit, when the base_adress_city module was installed, the
informations of the City, State and ZIP where lost when we try to create
a new Partner from the Lead.
Now, the informations are present in the Partner form; furthermore if
the country allows enforce cities, the information is also present in
the enforce city form.
OPW-1932018
closes#30644closesodoo/odoo#30713
Have a partner with children exceeding the limit of the kanban.
Edit,
Add a contact > save and quit
Save the partner
Before this commit, there was a traceback, because a check on parent_id was done to compute
the modifier readonly of the city fields in subviews
However, python onchange gets rid of parent_id because child_ids and parent_id are two faces of the same coin
And if that check were not done, we would end up in an infinite recursion
After this commit, there is no traceback, as we stop checking on parent_id in the case of paged subviews
(list and kanban) because we literally know there is one
OPW 1886320
closesodoo/odoo#27114
This sets the field country_enforce_cities readonly in order to skip inverse field's write on contact creation.
Was PR #24686. Courtesy of Carlos Lopez
In base/res_partner.py, _fields_view_get calls _fields_view_get_address that could calls again
_fields_view_get in case of address_view_id is specified. That leads to issue in base_address_city
because the _fields_view_get_address method will replace two times the city field and then, we get
a view with two city_id fields.
see #16870 for screenshots
In base/res_partner.py, _fields_view_get calls _fields_view_get_address that could calls again
_fields_view_get in case of address_view_id is specified. That leads to issue in base_address_city
because the _fields_view_get_address method will replace two times the city field and then, we get
a view with two city_id fields.
see https://github.com/odoo/odoo/pull/16870 for screenshots
*street fields should be editable only if we modify the main partner address
*creating a res.city through the m2o should has default country and a domain