Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9c76baca

Von Sven Schöling vor mehr als 7 Jahren hinzugefügt

  • ID 9c76bacaa1bfbefc80f7d595ca47ec882266dc70
  • Vorgänger b57eff48
  • Nachfolger ce904bd6

Artikel anlegen mit Rücksprung in Belege

Unterschiede anzeigen:

SL/Controller/Part.pm
16 16
use SL::DB::History;
17 17
use SL::DB::Helper::ValidateAssembly qw(validate_assembly);
18 18
use SL::CVar;
19
use SL::MoreCommon qw(save_form);
19 20
use Carp;
20 21

  
21 22
use Rose::Object::MakeMethods::Generic (
......
69 70
  $self->add;
70 71
};
71 72

  
73
sub action_add_from_record {
74
  my ($self) = @_;
75

  
76
  check_has_valid_part_type($::form->{part}{part_type});
77

  
78
  $self->parse_form;
79
  $self->add;
80
}
81

  
72 82
sub action_add {
73 83
  my ($self) = @_;
74 84

  
......
139 149
  flash_later('info', $is_new ? t8('The item has been created.') . " " . $self->part->displayable_name : t8('The item has been saved.'));
140 150

  
141 151
  if ( $::form->{callback} ) {
142
    $self->redirect_to($::form->unescape($::form->{callback}));
152
    $self->redirect_to($::form->unescape($::form->{callback}) . '&new_parts_id=' . $self->part->id);
153

  
143 154
  } else {
144 155
    # default behaviour after save: reload item, this also resets last_modification!
145 156
    $self->redirect_to(controller => 'Part', action => 'edit', 'part.id' => $self->part->id);

Auch abrufbar als: Unified diff