Public release from ruodoo-project: 19.0 - 2026-07-26 21:17:35 UTC

This commit is contained in:
CI Publish Bot
2026-07-26 21:17:45 +00:00
commit 4f7b594ec8
1335 changed files with 191620 additions and 0 deletions

View File

@ -0,0 +1,25 @@
from odoo import api, fields, models, _
class ResUsers(models.Model):
_inherit = 'res.users'
last_name = fields.Char(string=_('Фамилия'), compute='_compute_update_name')
first_name = fields.Char(string=_('Имя'), compute='_compute_update_name')
second_name = fields.Char(string=_('Отчество'), compute='_compute_update_name')
@api.depends('name')
def _compute_update_name(self):
for s in self:
s.last_name = ''
s.first_name = ''
s.second_name = ''
if s.name:
s.last_name = s.name
s.first_name = ''
s.second_name = ''
if len(s.name.split(' ')) == 3:
s.last_name, s.first_name, s.second_name = s.name.split(' ')
if len(s.name.split(' ')) == 4:
s.last_name, s.first_name, second_name1, second_name2 = s.name.split(' ')
s.second_name = second_name1 + ' ' + second_name2