Laurent Mignon (ACSONE)
5 years ago
committed by
Luis Torres
4 changed files with 0 additions and 27 deletions
-
15partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py
-
6partner_firstname/models/base_config_settings.py
-
5partner_firstname/models/res_partner.py
-
1partner_firstname/models/res_users.py
@ -1,15 +0,0 @@ |
|||
def store_ir_config_param(cr): |
|||
"""Prior to version 12.0 the default order of partner |
|||
names was last_first. In order to retain this behaviour we |
|||
store the config parameter if it is not present. |
|||
""" |
|||
cr.execute("SELECT 1 FROM ir_config_parameter " "WHERE key = 'partner_names_order'") |
|||
if not cr.fetchone(): |
|||
cr.execute( |
|||
"INSERT INTO ir_config_parameter (key, value) VALUES " |
|||
"('partner_names_order', 'last_first')" |
|||
) |
|||
|
|||
|
|||
def migrate(cr, version): |
|||
store_ir_config_param(cr) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue