Merge lp:~mukunde/unifield-server/US-7719 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6317
Proposed branch: lp:~mukunde/unifield-server/US-7719
Merge into: lp:unifield-server
Diff against target: 29 lines (+12/-0)
1 file modified
bin/addons/account/account.py (+12/-0)
To merge this branch: bzr merge lp:~mukunde/unifield-server/US-7719
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+426540@code.launchpad.net
To post a comment you must log in.
lp:~mukunde/unifield-server/US-7719 updated
6265. By Gaël Mukunde

US-7719 [IMP] Remove the space at beginning and at the end of the journal name / analytic account name object when saving.

6266. By Gaël Mukunde

US-7719 [IMP] Remove code analytic account.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/account/account.py'
2--- bin/addons/account/account.py 2022-07-12 16:11:39 +0000
3+++ bin/addons/account/account.py 2022-10-07 15:43:46 +0000
4@@ -861,6 +861,12 @@
5 return True
6 if context is None:
7 context = {}
8+ if 'code' in vals and vals['code']:
9+ code = vals['code'].strip()
10+ vals.update({'code': code})
11+ if 'name' in vals and vals['name']:
12+ name = vals['name'].strip()
13+ vals.update({'name': name})
14 for journal in self.browse(cr, uid, ids, context=context):
15 if 'company_id' in vals and journal.company_id.id != vals['company_id']:
16 move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)])
17@@ -908,6 +914,12 @@
18 def create(self, cr, uid, vals, context=None):
19 if not 'sequence_id' in vals or not vals['sequence_id']:
20 vals.update({'sequence_id': self.create_sequence(cr, uid, vals, context)})
21+ if 'code' in vals and vals['code']:
22+ code = vals['code'].strip()
23+ vals.update({'code': code})
24+ if 'name' in vals and vals['name']:
25+ name = vals['name'].strip()
26+ vals.update({'name': name})
27 self._remove_unnecessary_links(cr, uid, vals, context=context)
28 journal_id = super(account_journal, self).create(cr, uid, vals, context)
29 self._check_journal_constraints(cr, uid, [journal_id], context=context)

Subscribers

People subscribed via source and target branches