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 |
Related bugs: |
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.
Le 30/01/2019 à 12:26, jftempo a écrit : account_ corrections/ wizard/ journal_ items_correctio ns.py' account_ corrections/ wizard/ journal_ items_correctio ns.py 2018-10-11 10:21:46 +0000 account_ corrections/ wizard/ journal_ items_correctio ns.py 2019-01-30 11:21:23 +0000 get('account. account' ) get('hr. employee' ) get('res. partner' ) get('account. journal' ) type_for_ register journal_ id obj.search( cr, uid, [('name', '=', partner_txt)], limit=1, context=context)
>
>
> Diff comments:
>
>> === modified file 'bin/addons/
>> --- bin/addons/
>> +++ bin/addons/
>> @@ -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.
>> + employee_obj = self.pool.
>> + partner_obj = self.pool.
>> + journal_obj = self.pool.
>> acc_type = account.
>> 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_
>> + if partner_txt and not partner_id and not employee_id and not partner_journal:
>> + employee_ids = employee_
>
> 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: obj.search( cr, uid, [('name', '=', partner_txt)], limit=1, context=context) obj.search( cr, uid, [('code', '=', partner_txt)], limit=1, context=context) obj.browse( cr, uid, journal_ids[0], context=context) non_existing_ tp" is in context (e.g. when validating HQ entries) get('ignore_ non_existing_ tp', False): journal_ id journal. type ...
>> + employee_id = employee_ids[0]
>> + else:
>> + partner_ids = partner_
>> + if partner_ids:
>> + partner_id = partner_ids[0]
>> + else:
>> + journal_ids = journal_
>> + if journal_ids:
>> + partner_journal = journal_
>> + # if there is a partner_txt but no related Third Party found:
>> + # ignore the check if "ignore_
>> + if not partner_id and not employee_id and not partner_journal and context.
>> + 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_
>> is_liquidity = partner_journal and partner_