Merge lp:~julie-w/unifield-server/US-5188 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5225
Proposed branch: lp:~julie-w/unifield-server/US-5188
Merge into: lp:unifield-server
Diff against target: 78 lines (+4/-25)
2 files modified
bin/addons/account_corrections/account_move_line.py (+4/-19)
bin/addons/msf_profile/i18n/fr_MF.po (+0/-6)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-5188
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+362779@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/account_corrections/account_move_line.py'
2--- bin/addons/account_corrections/account_move_line.py 2018-10-11 10:21:46 +0000
3+++ bin/addons/account_corrections/account_move_line.py 2019-02-06 10:02:27 +0000
4@@ -598,19 +598,14 @@
5 transfer_journal_id = third_party.id
6 return partner_id, employee_id, transfer_journal_id
7
8- def update_st_line(self, cr, uid, ids, account_id=None, context=None):
9+ def update_st_line(self, cr, uid, ids, context=None):
10 """
11- Update the account of the statement line
12+ Updates the "corrected_st_line_id" on the JI
13 """
14 if context is None:
15 context = {}
16 if isinstance(ids, (int, long)):
17 ids = [ids]
18- if not account_id:
19- raise osv.except_osv(_('Warning'), _('No account_id given. No update on account will be done.'))
20- # Prepare some values
21- absl_obj = self.pool.get('account.bank.statement.line')
22- cor_vals = {'account_id': account_id}
23 # Update lines
24 for ml in self.browse(cr, uid, ids, context=context):
25 # in order to update hard posted line (that's forbidden!), we use a tip: add from_correction in context
26@@ -620,20 +615,14 @@
27 # Case where this move line have a link to some statement lines
28 if ml.statement_id and ml.move_id.statement_line_ids:
29 for st_line in ml.move_id.statement_line_ids:
30- # US-303: only update the statement line that links to this move line
31 if st_line.cash_return_move_line_id:
32 if st_line.cash_return_move_line_id.id == ml.id:
33- absl_obj.write(cr, uid, [st_line.id], cor_vals, context=context)
34 # we informs new move line that it have correct a statement line
35 self.write(cr, uid, corrected_line_ids, {'corrected_st_line_id': st_line.id}, context=context)
36 break
37- elif not st_line.from_cash_return: #US-1044: only update the account on line if the regline is not cash return!
38+ elif not st_line.from_cash_return:
39 #US-303: If not the case, then we inform the new move line that it has corrected a statement line
40- absl_obj.write(cr, uid, [st_line.id], cor_vals, context=context)
41 self.write(cr, uid, corrected_line_ids, {'corrected_st_line_id': st_line.id}, context=context)
42- # if not, this move line should have a direct link to a register line
43- elif ml.statement_id and ml.corrected_st_line_id:
44- absl_obj.write(cr, uid, [ml.corrected_st_line_id.id], cor_vals, context=context)
45 return True
46
47 def correct_aml(self, cr, uid, ids, date=None, new_account_id=None, distrib_id=False, new_third_party=None, context=None):
48@@ -808,12 +797,8 @@
49 # check the account compatibility with the Third Party on the COR line created
50 correction_line = self.browse(cr, uid, correction_line_id, context=context)
51 wiz_obj._check_account_partner_compatibility(cr, uid, new_account, correction_line, context)
52- # UF-2231: Remove the update to the statement line
53- # Update register line if exists
54-
55- # UFTP-119: Reverted a code that has been commented out in UF-2231 without explanation, and which caused the problem of updating back the Reg line
56 if ml.statement_id:
57- self.update_st_line(cr, uid, [ml.id], account_id=new_account_id, context=context)
58+ self.update_st_line(cr, uid, [ml.id], context=context)
59 # Inform old line that it have been corrected
60 self.write(cr, uid, [ml.id], {'corrected': True, 'have_an_historic': True,}, context=context, check=False, update_check=False)
61 # Post the move
62
63=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
64--- bin/addons/msf_profile/i18n/fr_MF.po 2019-01-30 13:17:55 +0000
65+++ bin/addons/msf_profile/i18n/fr_MF.po 2019-02-06 10:02:27 +0000
66@@ -89095,12 +89095,6 @@
67 msgid "An error is occurred. Details : %s"
68 msgstr "An error is occurred. Details : %s"
69
70-#. module: account_corrections
71-#: code:addons/account_corrections/account_move_line.py:595
72-#, python-format
73-msgid "No account_id given. No update on account will be done."
74-msgstr "No account_id given. No update on account will be done."
75-
76 #. module: purchase
77 #: help:purchase.order,state:0
78 msgid "The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception."

Subscribers

People subscribed via source and target branches