~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_profile/msf_profile.py

  • Committer: Vincent GREINER
  • Date: 2016-01-05 14:23:35 UTC
  • mto: (2740.10.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 2737.
  • Revision ID: vg@tempo-consulting.fr-20160105142335-cevj19ooqml37swl
US-822 [ADD] account fiscal year state model (behavior-like period state)

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
            if vals:
169
169
                po_obj.write(cr, uid, [po['id']], vals)
170
170
 
 
171
    def us_822_patch(self, cr, uid, *a, **b):
 
172
        # update fiscal year state (new model behaviour-like period state)
 
173
        fy_ids = self.pool.get('account.fiscalyear').search(cr, uid, [])
 
174
        if fy_ids:
 
175
            self.pool.get('account.fiscalyear.state').update_state(cr, uid,
 
176
                fy_ids)
 
177
 
 
178
        return True
 
179
 
171
180
    def disable_crondoall(self, cr, uid, *a, **b):
172
181
        cron_obj = self.pool.get('ir.cron')
173
182
        cron_ids = cron_obj.search(cr, uid, [('doall', '=', True), ('active', 'in', ['t', 'f'])])