Merge lp://staging/~fabien-morin/unifield-server/fm-us-1198 into lp://staging/unifield-server

Proposed by jftempo
Status: Rejected
Rejected by: jftempo
Proposed branch: lp://staging/~fabien-morin/unifield-server/fm-us-1198
Merge into: lp://staging/unifield-server
Diff against target: 778 lines (+520/-45)
12 files modified
bin/addons/board/board_administration_view.xml (+4/-4)
bin/addons/finance/__init__.py (+1/-0)
bin/addons/finance/account.py (+1/-1)
bin/addons/finance/board_account.py (+112/-0)
bin/addons/finance/board_account_view.xml (+253/-17)
bin/addons/financing_contract/contract.py (+75/-0)
bin/addons/msf_budget/msf_budget_line.py (+35/-0)
bin/addons/msf_profile/user_access_configurator.py (+31/-15)
bin/addons/procurement/board_mrp_procurement_view.xml (+1/-1)
bin/addons/useability_dashboard_and_menu/__openerp__.py (+1/-1)
bin/addons/useability_dashboard_and_menu/dashboard/board_sale_view.xml (+2/-2)
bin/addons/useability_dashboard_and_menu/dashboard/board_warehouse_view.xml (+4/-4)
To merge this branch: bzr merge lp://staging/~fabien-morin/unifield-server/fm-us-1198
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+317591@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
jftempo (jfb-tempo-consulting) :
4030. By Fabien MORIN

US-1198 [FIX] revert changes on hr_payroll.py

Revision history for this message
Fabien MORIN (fabien-morin) wrote :

I reverted all this changes.

I did it because the search is called on module 'hr.payroll.msf' and the current class of
self object is also 'hr.payroll.msf'. So I don't see why it could not work.

On Monday 20 February 2017 12:37:27 you wrote:
> Diff comments:
> > === modified file 'bin/addons/msf_homere_interface/hr_payroll.py'
> > --- bin/addons/msf_homere_interface/hr_payroll.py 2016-12-21 08:28:03
> > +0000
> > +++ bin/addons/msf_homere_interface/hr_payroll.py 2017-02-17 09:00:02
> > +0000
> > @@ -169,25 +169,23 @@
> >
> > elif ana_account['category'] == 'FUNDING':
> > fp.append(ana_account['id'])
> >
> > if len(fp) > 1 or len(cc) > 1 or len(dest) > 1:
> > - return self.pool.get('hr.payroll.msf').search(cr, uid,
> > [('state', '=', 'draft'), '|', '|', ('funding_pool_id', 'in', fp),
> > ('cost_center_id','in', cc), ('destination_id','in', dest)])
> Why did you change this ? It does not work.
>
> > + return self.search(cr, uid, [('state', '=', 'draft'), '|',
> > '|', ('funding_pool_id', 'in', fp), ('cost_center_id','in', cc),
> > ('destination_id','in', dest)])>
> > return []
> >
> > def _get_trigger_state_account(self, cr, uid, ids, context=None):
> > - pay_obj = self.pool.get('hr.payroll.msf')
> > - return pay_obj.search(cr, uid, [('state', '=', 'draft'),
> > ('account_id', 'in', ids)]) + return self.search(cr, uid,
> > [('state', '=', 'draft'), ('account_id', 'in', ids)])
> Same issue here
>
> > def _get_trigger_state_dest_link(self, cr, uid, ids, context=None):
> > if isinstance(ids, (int, long)):
> > ids = [ids]
> >
> > to_update = []
> >
> > - pay_obj = self.pool.get('hr.payroll.msf')
> >
> > for dest_link in self.read(cr, uid, ids, ['account_id', 'destination_id',
'funding_pool_ids']):
> > - to_update += pay_obj.search(cr, uid, [
> > - ('state', '=', 'draft'),
> > - ('account_id', '=', dest_link['account_id'][0]),
> > - ('destination_id', '=', dest_link['destination_id'][0]),
> > - ('funding_pool_id', 'in', dest_link['funding_pool_ids'])
> > + to_update += self.search(cr, uid, [
>
> and here.
>
> > + ('state', '=', 'draft'),
> > + ('account_id', '=', dest_link['account_id'][0]),
> > + ('destination_id', '=',
> > dest_link['destination_id'][0]), + ('funding_pool_id',
> > 'in', dest_link['funding_pool_ids'])>
> > ])
> >
> > return to_update

--
Fabien MORIN
TeMPO Consulting
20, avenue de la Paix
67000 Strasbourg
France

http://www.tempo-consulting.fr
Tel : +33 3 88 56 82 16
Fax : +33 9 70 63 35 46

Revision history for this message
jftempo (jfb-tempo-consulting) wrote :

> So I don't see why it could not work.

If you don't see why, you can test it.
This method is called from a store dict in a fields.function, so self is ...

Unmerged revisions

4030. By Fabien MORIN

US-1198 [FIX] revert changes on hr_payroll.py

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