~unifield-team/unifield-wm/us-671-homere

« back to all changes in this revision

Viewing changes to financing_contract/format_line.py

  • Committer: jf
  • Date: 2015-05-28 08:50:00 UTC
  • mfrom: (2486.5.11 113w)
  • Revision ID: jfb@tempo-consulting.fr-20150528085000-71cee3wdgnpa1ww0
US-113 [FIX] Financing contracts Sync
BKLG-80 [FIX] Update partner_txt on JI, JE, AJI if employee or partner name is changed
US-139 [FIX] Sync down CC name
US-289 [FIX] Update AD on JI if employee is updated on register line
US-126 [FIX] On sync: do not write field active on partner
lp:~unifield-team/unifield-wm/us-113-merged-trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
417
417
        'allocated_real': fields.function(_get_actual_amount, method=True, store=False, string="Funded - Actuals", type="float", readonly=True),
418
418
        'project_real': fields.function(_get_actual_amount, method=True, store=False, string="Total project - Actuals", type="float", readonly=True),
419
419
        'quadruplet_update': fields.text('Internal Use Only'),
 
420
        'instance_id': fields.many2one('msf.instance','Proprietary Instance'),
420
421
    }
421
422
 
422
423
    _defaults = {
467
468
        if isinstance(ids, (int, long)):
468
469
            ids = [ids]
469
470
 
 
471
        # US-180: Check if it comes from the sync update
 
472
        if context.get('sync_update_execution') and vals.get('format_id', False):
 
473
            # US-180: and if the financing contract of the contract format does not exist, then just ignore this update
 
474
            exist = self.pool.get('financing.contract.contract').search(cr, uid, [('format_id', '=', vals['format_id'])])
 
475
            if not exist: # No contract found for this format line
 
476
                return True
 
477
 
470
478
        # calculate the quadruplet combination
471
479
        self.calculate_quaduplet(vals, context)
472
480
        return super(financing_contract_format_line, self).write(cr, uid, ids, vals, context=context)