Revision afd5395b
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
160 | 160 |
} |
161 | 161 |
} |
162 | 162 |
|
163 |
sub action_save_and_purchase_order { |
|
164 |
my ($self) = @_; |
|
165 |
|
|
166 |
delete $::form->{previousform}; |
|
167 |
$::form->{callback} = $self->url_for( |
|
168 |
controller => 'Order', |
|
169 |
action => 'return_from_create_part', |
|
170 |
type => 'purchase_order', |
|
171 |
); |
|
172 |
|
|
173 |
$self->_run_action('save'); |
|
174 |
} |
|
175 |
|
|
163 | 176 |
sub action_abort { |
164 | 177 |
my ($self) = @_; |
165 | 178 |
|
... | ... | |
1346 | 1359 |
], |
1347 | 1360 |
], # end of combobox "Save" |
1348 | 1361 |
|
1362 |
combobox => [ |
|
1363 |
action => [ t8('Workflow') ], |
|
1364 |
action => [ |
|
1365 |
t8('Save and Purchase Order'), |
|
1366 |
submit => [ '#ic', { action => "Part/save_and_purchase_order" } ], |
|
1367 |
checks => ['kivi.validate_form'], |
|
1368 |
disabled => !$self->part->id ? t8('The object has not been saved yet.') |
|
1369 |
: !$may_edit ? t8('You do not have the permissions to access this function.') |
|
1370 |
: !$::auth->assert('purchase_order_edit', 'may fail') ? t8('You do not have the permissions to access this function.') |
|
1371 |
: undef, |
|
1372 |
only_if => !$::form->{inline_create}, |
|
1373 |
], |
|
1374 |
], |
|
1375 |
|
|
1349 | 1376 |
action => [ |
1350 | 1377 |
t8('Abort'), |
1351 | 1378 |
submit => [ '#ic', { action => "Part/abort" } ], |
Auch abrufbar als: Unified diff
Artikel-Controller: Workflow zu Lieferantenauftrag
Ziemlich simple Implementierung, die das Callback nutzt, das auch für das
Anlegen eines Artikels aus dem Auftrags-Controller heraus genutzt wird.