[18.0][IMP] partner_second_lastname: add name order 'Lastname, Firstname SecondLastname'#2309
[18.0][IMP] partner_second_lastname: add name order 'Lastname, Firstname SecondLastname'#2309BhaveshHeliconia wants to merge 1 commit intoOCA:18.0from
Conversation
| return [(k, new_labels[k]) if k in new_labels else (k, v) for k, v in options] | ||
| result = [(k, new_labels[k]) if k in new_labels else (k, v) for k, v in options] | ||
| # Separate format where only the first lastname is followed by a comma | ||
| result.append(("last_first_comma2", "Lastname, Firstname SecondLastname")) |
There was a problem hiding this comment.
Why didn't you add it directly to the new_labels dict?
There was a problem hiding this comment.
@luisDIXMIT Here, if we add it to 'new_labels' dict, then it won't get added in 'result' as we're looping on 'options' and 'options' don't have 'last_first_comma2', so we've added it separately afterwards.
legalsylvain
left a comment
There was a problem hiding this comment.
If we add new key, we should propose changes in related OCA modules. don't you think ?
At least :
./hr/hr_employee_firstname
./hr/hr_employee_second_lastname/
./partner-contact/partner_second_lastname/
Thanks !
Yes, you're right. This should also be handled in the hr_employee_second_lastname module. I'll take a look and propose the necessary changes there as well. |
|
@legalsylvain here is the PR for hr_employee_second_lastname: OCA/hr#1554 |
This PR adds a new name formatting option:
Lastname, Firstname SecondLastname(key:last_first_comma2).Improvements:
last_first_comma2tores.config.settings.res.partnerfor the new format.IndexErrorin_get_computed_namewhenlastnameis missing.CONFIGURE.md.test_config.py,test_multiple_names.py, andtest_name.py.