(self)
return True
Writes repair order state to 'To be invoiced' if invoice method is
        After repair else state is set to 'Ready'.
        @return: True
Writes repair order state to 'To be invoiced' if invoice method is
        After repair else state is set to 'Ready'.
Writes repair order state to To be invoiced if invoice method is After repair else state is set to Ready .
def action_repair_end(self):
        """ Writes repair order state to 'To be invoiced' if invoice method is
        After repair else state is set to 'Ready'.
        @return: True
        """
        if self.filtered(lambda repair: repair.state != 'under_repair'):
            raise UserError(_("Repair must be under repair in order to end reparation."))
        self._check_product_tracking()
        for repair in self:
            repair.write({'repaired': True})
            vals = {'state': 'done'}
            vals['move_id'] = repair.action_repair_done().get(repair.id)
            if not repair.invoice_id and repair.invoice_method == 'after_repair':
                vals['state'] = '2binvoiced'
            repair.write(vals)
        return True
def action_repair_end ( self ) : if self . filtered ( lambda repair : repair . state != 'under_repair' ) : raise UserError ( _ ( "Repair must be under repair in order to end reparation." ) ) self . _check_product_tracking ( ) for repair in self : repair . write ( { 'repaired' : True } ) vals = { 'state' : 'done' } vals [ 'move_id' ] = repair . action_repair_done ( ) . get ( repair . id ) if not repair . invoice_id and repair . invoice_method == 'after_repair' : vals [ 'state' ] = '2binvoiced' repair . write ( vals ) return True