~unifield-team/unifield-wm/us-777

« back to all changes in this revision

Viewing changes to account_override/invoice.py

  • Committer: Vincent GREINER
  • Date: 2016-02-18 16:20:19 UTC
  • Revision ID: vg@tempo-consulting.fr-20160218162019-r481rnz6b4on1bst
US-777/2 [IMP] adv op advance wizard: when creating a new invoice form the invoices picker (m2m) return to the wizard at invoice validation process

Show diffs side-by-side

added added

removed removed

Lines of Context:
668
668
        No longer fills the date automatically, but requires it to be set
669
669
        """
670
670
        # Some verifications
671
 
        if not context:
 
671
        if context is None:
672
672
            context = {}
673
673
        self._check_invoice_merged_lines(cr, uid, ids, context=context)
674
674
 
700
700
                    }
701
701
 
702
702
            wf_service.trg_validate(uid, 'account.invoice', inv.id, 'invoice_open', cr)
 
703
 
 
704
        fw = context.get('from_wizard', False)
 
705
        if fw:
 
706
            # since US-777: go back to wizard in progress
 
707
            return {
 
708
                'type': 'ir.actions.act_window',
 
709
                'res_model': fw['model'],
 
710
                'view_type': 'form',
 
711
                'view_mode': 'form',
 
712
                'res_id': fw['res_id'],
 
713
                'context': context,
 
714
                'target': 'new',
 
715
            }
703
716
        return True
704
717
 
705
718
    def action_reconcile_imported_invoice(self, cr, uid, ids, context=None):