Merge lp://staging/~julie-w/unifield-server/US-5376 into lp://staging/~jfb-tempo-consulting/unifield-server/trunk

Proposed by jftempo
Status: Needs review
Proposed branch: lp://staging/~julie-w/unifield-server/US-5376
Merge into: lp://staging/~jfb-tempo-consulting/unifield-server/trunk
Diff against target: 751 lines (+288/-90) (has conflicts)
11 files modified
bin/addons/account_corrections/wizard/journal_items_corrections.py (+31/-4)
bin/addons/account_hq_entries/account_view.xml (+23/-7)
bin/addons/account_hq_entries/hq_entries.py (+48/-11)
bin/addons/account_hq_entries/wizard/hq_entries_import.py (+45/-35)
bin/addons/account_hq_entries/wizard/hq_entries_validation.py (+22/-3)
bin/addons/account_hq_entries/wizard/hq_reallocation.py (+2/-1)
bin/addons/account_hq_entries/wizard/wizard_view.xml (+2/-1)
bin/addons/account_override/__init__.py (+14/-3)
bin/addons/account_override/account.py (+44/-9)
bin/addons/finance/cash_request_view.xml (+12/-12)
bin/addons/msf_profile/i18n/fr_MF.po (+45/-4)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp://staging/~julie-w/unifield-server/US-5376
Reviewer Review Type Date Requested Status
jftempo Pending
Review via email: mp+362446@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
jftempo (jfb-tempo-consulting) :
Revision history for this message
Julie Nuguet (julie-w) wrote :
Download full text (3.5 KiB)

Le 30/01/2019 à 12:26, jftempo a écrit :
>
>
> Diff comments:
>
>> === modified file 'bin/addons/account_corrections/wizard/journal_items_corrections.py'
>> --- bin/addons/account_corrections/wizard/journal_items_corrections.py 2018-10-11 10:21:46 +0000
>> +++ bin/addons/account_corrections/wizard/journal_items_corrections.py 2019-01-30 11:21:23 +0000
>> @@ -462,12 +462,37 @@
>> :param account: new account selected in the Correction Wizard
>> :param aml: Journal Item with the Third Party to check
>> """
>> + if context is None:
>> + context = {}
>> acc_obj = self.pool.get('account.account')
>> + employee_obj = self.pool.get('hr.employee')
>> + partner_obj = self.pool.get('res.partner')
>> + journal_obj = self.pool.get('account.journal')
>> acc_type = account.type_for_register
>> if acc_type != 'none':
>> + # get the right Third Party to check if there is a partner_txt ONLY (e.g.: correction made on HQ entry)
>> + partner_txt = aml.partner_txt
>> + partner_id = aml.partner_id and aml.partner_id.id or False
>> + employee_id = aml.employee_id and aml.employee_id.id or False
>> + partner_journal = aml.transfer_journal_id
>> + if partner_txt and not partner_id and not employee_id and not partner_journal:
>> + employee_ids = employee_obj.search(cr, uid, [('name', '=', partner_txt)], limit=1, context=context)
>
> Julie,
> Do you confirm we do not need ('active', 'in', ['t', 'f']) in the domain ?
>

Thanks for making me think about that!
This is actually not needed for this specific domain on employees
(apparently inactive employees are still retrieved). However it's a good
idea to add it in the partner domain, and not only in this method. I
have updated the branch accordingly.

>> + if employee_ids:
>> + employee_id = employee_ids[0]
>> + else:
>> + partner_ids = partner_obj.search(cr, uid, [('name', '=', partner_txt)], limit=1, context=context)
>> + if partner_ids:
>> + partner_id = partner_ids[0]
>> + else:
>> + journal_ids = journal_obj.search(cr, uid, [('code', '=', partner_txt)], limit=1, context=context)
>> + if journal_ids:
>> + partner_journal = journal_obj.browse(cr, uid, journal_ids[0], context=context)
>> + # if there is a partner_txt but no related Third Party found:
>> + # ignore the check if "ignore_non_existing_tp" is in context (e.g. when validating HQ entries)
>> + if not partner_id and not employee_id and not partner_journal and context.get('ignore_non_existing_tp', False):
>> + return True
>> # Check the compatibility with the "Type For Specific Treatment" of the account
>> if acc_type in ['transfer', 'transfer_same']:
>> - partner_journal = aml.transfer_journal_id
>> is_liquidity = partner_journal and partner_journal.type ...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: