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
=== modified file 'bin/addons/account_corrections/account_move_line.py'
--- bin/addons/account_corrections/account_move_line.py 2018-10-11 10:21:46 +0000
+++ bin/addons/account_corrections/account_move_line.py 2019-02-06 10:02:27 +0000
@@ -598,19 +598,14 @@
598 transfer_journal_id = third_party.id598 transfer_journal_id = third_party.id
599 return partner_id, employee_id, transfer_journal_id599 return partner_id, employee_id, transfer_journal_id
600600
601 def update_st_line(self, cr, uid, ids, account_id=None, context=None):601 def update_st_line(self, cr, uid, ids, context=None):
602 """602 """
603 Update the account of the statement line603 Updates the "corrected_st_line_id" on the JI
604 """604 """
605 if context is None:605 if context is None:
606 context = {}606 context = {}
607 if isinstance(ids, (int, long)):607 if isinstance(ids, (int, long)):
608 ids = [ids]608 ids = [ids]
609 if not account_id:
610 raise osv.except_osv(_('Warning'), _('No account_id given. No update on account will be done.'))
611 # Prepare some values
612 absl_obj = self.pool.get('account.bank.statement.line')
613 cor_vals = {'account_id': account_id}
614 # Update lines609 # Update lines
615 for ml in self.browse(cr, uid, ids, context=context):610 for ml in self.browse(cr, uid, ids, context=context):
616 # in order to update hard posted line (that's forbidden!), we use a tip: add from_correction in context611 # in order to update hard posted line (that's forbidden!), we use a tip: add from_correction in context
@@ -620,20 +615,14 @@
620 # Case where this move line have a link to some statement lines615 # Case where this move line have a link to some statement lines
621 if ml.statement_id and ml.move_id.statement_line_ids:616 if ml.statement_id and ml.move_id.statement_line_ids:
622 for st_line in ml.move_id.statement_line_ids:617 for st_line in ml.move_id.statement_line_ids:
623 # US-303: only update the statement line that links to this move line
624 if st_line.cash_return_move_line_id:618 if st_line.cash_return_move_line_id:
625 if st_line.cash_return_move_line_id.id == ml.id:619 if st_line.cash_return_move_line_id.id == ml.id:
626 absl_obj.write(cr, uid, [st_line.id], cor_vals, context=context)
627 # we informs new move line that it have correct a statement line620 # we informs new move line that it have correct a statement line
628 self.write(cr, uid, corrected_line_ids, {'corrected_st_line_id': st_line.id}, context=context)621 self.write(cr, uid, corrected_line_ids, {'corrected_st_line_id': st_line.id}, context=context)
629 break622 break
630 elif not st_line.from_cash_return: #US-1044: only update the account on line if the regline is not cash return!623 elif not st_line.from_cash_return:
631 #US-303: If not the case, then we inform the new move line that it has corrected a statement line624 #US-303: If not the case, then we inform the new move line that it has corrected a statement line
632 absl_obj.write(cr, uid, [st_line.id], cor_vals, context=context)
633 self.write(cr, uid, corrected_line_ids, {'corrected_st_line_id': st_line.id}, context=context)625 self.write(cr, uid, corrected_line_ids, {'corrected_st_line_id': st_line.id}, context=context)
634 # if not, this move line should have a direct link to a register line
635 elif ml.statement_id and ml.corrected_st_line_id:
636 absl_obj.write(cr, uid, [ml.corrected_st_line_id.id], cor_vals, context=context)
637 return True626 return True
638627
639 def correct_aml(self, cr, uid, ids, date=None, new_account_id=None, distrib_id=False, new_third_party=None, context=None):628 def correct_aml(self, cr, uid, ids, date=None, new_account_id=None, distrib_id=False, new_third_party=None, context=None):
@@ -808,12 +797,8 @@
808 # check the account compatibility with the Third Party on the COR line created797 # check the account compatibility with the Third Party on the COR line created
809 correction_line = self.browse(cr, uid, correction_line_id, context=context)798 correction_line = self.browse(cr, uid, correction_line_id, context=context)
810 wiz_obj._check_account_partner_compatibility(cr, uid, new_account, correction_line, context)799 wiz_obj._check_account_partner_compatibility(cr, uid, new_account, correction_line, context)
811 # UF-2231: Remove the update to the statement line
812 # Update register line if exists
813
814 # 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
815 if ml.statement_id:800 if ml.statement_id:
816 self.update_st_line(cr, uid, [ml.id], account_id=new_account_id, context=context)801 self.update_st_line(cr, uid, [ml.id], context=context)
817 # Inform old line that it have been corrected802 # Inform old line that it have been corrected
818 self.write(cr, uid, [ml.id], {'corrected': True, 'have_an_historic': True,}, context=context, check=False, update_check=False)803 self.write(cr, uid, [ml.id], {'corrected': True, 'have_an_historic': True,}, context=context, check=False, update_check=False)
819 # Post the move804 # Post the move
820805
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2019-01-30 13:17:55 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2019-02-06 10:02:27 +0000
@@ -89095,12 +89095,6 @@
89095msgid "An error is occurred. Details : %s"89095msgid "An error is occurred. Details : %s"
89096msgstr "An error is occurred. Details : %s"89096msgstr "An error is occurred. Details : %s"
8909789097
89098#. module: account_corrections
89099#: code:addons/account_corrections/account_move_line.py:595
89100#, python-format
89101msgid "No account_id given. No update on account will be done."
89102msgstr "No account_id given. No update on account will be done."
89103
89104#. module: purchase89098#. module: purchase
89105#: help:purchase.order,state:089099#: help:purchase.order,state:0
89106msgid "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."89100msgid "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