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

Proposed by jftempo
Status: Merged
Merged at revision: 4968
Proposed branch: lp:~julie-w/unifield-server/US-4634
Merge into: lp:unifield-server
Diff against target: 111 lines (+32/-7)
6 files modified
bin/addons/account_corrections/wizard/journal_items_corrections.py (+4/-1)
bin/addons/account_override/account.py (+3/-2)
bin/addons/msf_profile/i18n/fr_MF.po (+5/-0)
bin/addons/register_accounting/account_bank_statement.py (+5/-1)
bin/addons/register_accounting/account_move_line.py (+5/-1)
bin/addons/register_accounting/wizard/wizard_register_import.py (+10/-2)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-4634
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+349132@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/wizard/journal_items_corrections.py'
--- bin/addons/account_corrections/wizard/journal_items_corrections.py 2018-02-21 16:51:38 +0000
+++ bin/addons/account_corrections/wizard/journal_items_corrections.py 2018-07-09 08:36:01 +0000
@@ -350,9 +350,12 @@
350 elif acc_type == 'advance' and not aml.employee_id:350 elif acc_type == 'advance' and not aml.employee_id:
351 raise osv.except_osv(_('Warning'), _('The account "%s - %s" is only compatible '351 raise osv.except_osv(_('Warning'), _('The account "%s - %s" is only compatible '
352 'with an Employee Third Party.') % (account.code, account.name))352 'with an Employee Third Party.') % (account.code, account.name))
353 elif acc_type in ['down_payment', 'payroll'] and not aml.partner_id:353 elif acc_type == 'down_payment' and not aml.partner_id:
354 raise osv.except_osv(_('Warning'), _('The account "%s - %s" is only compatible '354 raise osv.except_osv(_('Warning'), _('The account "%s - %s" is only compatible '
355 'with a Partner Third Party.') % (account.code, account.name))355 'with a Partner Third Party.') % (account.code, account.name))
356 elif acc_type == 'payroll' and not aml.partner_id and not aml.employee_id:
357 raise osv.except_osv(_('Warning'), _('The account "%s - %s" is only compatible '
358 'with a Partner or an Employee Third Party.') % (account.code, account.name))
356 else:359 else:
357 # Check the compatibility with the Allowed Partner Types360 # Check the compatibility with the Allowed Partner Types
358 # (according to US-1307 this check is done only when the account has no "Type For Specific Treatment")361 # (according to US-1307 this check is done only when the account has no "Type For Specific Treatment")
359362
=== modified file 'bin/addons/account_override/account.py'
--- bin/addons/account_override/account.py 2018-04-03 10:18:51 +0000
+++ bin/addons/account_override/account.py 2018-07-09 08:36:01 +0000
@@ -643,8 +643,9 @@
643 acc_type = acc_id.type_for_register643 acc_type = acc_id.type_for_register
644 transfer_not_ok = acc_type in ['transfer', 'transfer_same'] and (not journal_id or partner_id or employee_id)644 transfer_not_ok = acc_type in ['transfer', 'transfer_same'] and (not journal_id or partner_id or employee_id)
645 advance_not_ok = acc_type == 'advance' and (not employee_id or journal_id or partner_id)645 advance_not_ok = acc_type == 'advance' and (not employee_id or journal_id or partner_id)
646 dp_payroll_not_ok = acc_type in ['down_payment', 'payroll'] and (not partner_id or journal_id or employee_id)646 dp_not_ok = acc_type == 'down_payment' and (not partner_id or journal_id or employee_id)
647 if transfer_not_ok or advance_not_ok or dp_payroll_not_ok:647 payroll_not_ok = acc_type == 'payroll' and ((not partner_id and not employee_id) or journal_id)
648 if transfer_not_ok or advance_not_ok or dp_not_ok or payroll_not_ok:
648 not_compatible_ids.append(acc_id.id)649 not_compatible_ids.append(acc_id.id)
649 if not_compatible_ids:650 if not_compatible_ids:
650 self._display_account_partner_compatibility_error(cr, uid, not_compatible_ids, context, type_for_specific_treatment=True)651 self._display_account_partner_compatibility_error(cr, uid, not_compatible_ids, context, type_for_specific_treatment=True)
651652
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2018-06-15 12:30:42 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-07-09 08:36:01 +0000
@@ -101265,3 +101265,8 @@
101265msgid "Not Invoice"101265msgid "Not Invoice"
101266msgstr "Pas de Facture"101266msgstr "Pas de Facture"
101267101267
101268#. module: account_corrections
101269#: code:addons/account_corrections/wizard/journal_items_corrections.py:357
101270#, python-format
101271msgid "The account \"%s - %s\" is only compatible with a Partner or an Employee Third Party."
101272msgstr "Le compte \"%s - %s\" n'est compatible qu'avec un Tiers de type Partenaire ou Employé."
101268101273
=== modified file 'bin/addons/register_accounting/account_bank_statement.py'
--- bin/addons/register_accounting/account_bank_statement.py 2018-06-11 13:34:07 +0000
+++ bin/addons/register_accounting/account_bank_statement.py 2018-07-09 08:36:01 +0000
@@ -2983,10 +2983,14 @@
2983 third_type = [('hr.employee', 'Employee')]2983 third_type = [('hr.employee', 'Employee')]
2984 third_required = True2984 third_required = True
2985 third_selection = 'hr.employee,0'2985 third_selection = 'hr.employee,0'
2986 elif a['type_for_register'] in ['down_payment', 'payroll']:2986 elif a['type_for_register'] == 'down_payment':
2987 third_type = [('res.partner', 'Partner')]2987 third_type = [('res.partner', 'Partner')]
2988 third_required = True2988 third_required = True
2989 third_selection = 'res.partner,0'2989 third_selection = 'res.partner,0'
2990 elif a['type_for_register'] == 'payroll':
2991 third_type = [('res.partner', 'Partner'), ('hr.employee', 'Employee')]
2992 third_required = True
2993 third_selection = 'res.partner,0'
2990 return {'value': {'partner_type_mandatory': third_required, 'partner_type': {'options': third_type, 'selection': third_selection}}}2994 return {'value': {'partner_type_mandatory': third_required, 'partner_type': {'options': third_type, 'selection': third_selection}}}
29912995
2992 def onchange_partner_type(self, cr, uid, ids, partner_type=None, amount_in=None, amount_out=None, context=None):2996 def onchange_partner_type(self, cr, uid, ids, partner_type=None, amount_in=None, amount_out=None, context=None):
29932997
=== modified file 'bin/addons/register_accounting/account_move_line.py'
--- bin/addons/register_accounting/account_move_line.py 2017-12-05 17:00:38 +0000
+++ bin/addons/register_accounting/account_move_line.py 2018-07-09 08:36:01 +0000
@@ -359,10 +359,14 @@
359 third_type = [('hr.employee', 'Employee')]359 third_type = [('hr.employee', 'Employee')]
360 third_required = True360 third_required = True
361 third_selection = 'hr.employee,0'361 third_selection = 'hr.employee,0'
362 elif acc_type in ['down_payment', 'payroll']:362 elif acc_type == 'down_payment':
363 third_type = [('res.partner', 'Partner')]363 third_type = [('res.partner', 'Partner')]
364 third_required = True364 third_required = True
365 third_selection = 'res.partner,0'365 third_selection = 'res.partner,0'
366 elif acc_type == 'payroll':
367 third_type = [('res.partner', 'Partner'), ('hr.employee', 'Employee')]
368 third_required = True
369 third_selection = 'res.partner,0'
366 val.update({'partner_type_mandatory': third_required, 'partner_type': {'options': third_type, 'selection': third_selection}})370 val.update({'partner_type_mandatory': third_required, 'partner_type': {'options': third_type, 'selection': third_selection}})
367 return {'value': val}371 return {'value': val}
368372
369373
=== modified file 'bin/addons/register_accounting/wizard/wizard_register_import.py'
--- bin/addons/register_accounting/wizard/wizard_register_import.py 2018-03-08 17:25:31 +0000
+++ bin/addons/register_accounting/wizard/wizard_register_import.py 2018-07-09 08:36:01 +0000
@@ -484,10 +484,18 @@
484 if tp_journal.currency.id != register_currency:484 if tp_journal.currency.id != register_currency:
485 errors.append(_('Line %s. A Transfer Same Journal must have the same currency as the register.') % (current_line_num,))485 errors.append(_('Line %s. A Transfer Same Journal must have the same currency as the register.') % (current_line_num,))
486 continue486 continue
487 # Type DP or payroll ==> PARTNER required487 # Type DP ==> PARTNER required
488 elif type_for_register in ['down_payment', 'payroll']:488 elif type_for_register == 'down_payment':
489 tp_ids = partner_obj.search(cr, uid, [('name', '=', line[cols['third_party']])], context=context)489 tp_ids = partner_obj.search(cr, uid, [('name', '=', line[cols['third_party']])], context=context)
490 partner_type = 'partner'490 partner_type = 'partner'
491 # Type payroll ==> PARTNER or EMPLOYEE required
492 elif type_for_register == 'payroll':
493 tp_ids = partner_obj.search(cr, uid, [('name', '=', line[cols['third_party']])], context=context)
494 if tp_ids:
495 partner_type = 'partner'
496 else:
497 tp_ids = employee_obj.search(cr, uid, [('name', '=', line[cols['third_party']])], context=context)
498 partner_type = 'employee'
491 # Any type for Spec. Treatment listed above ==> EMPTY partner NOT allowed499 # Any type for Spec. Treatment listed above ==> EMPTY partner NOT allowed
492 if not tp_ids:500 if not tp_ids:
493 errors.append(501 errors.append(

Subscribers

People subscribed via source and target branches