use Carp;
use Rose::Object::MakeMethods::Generic (
- scalar => [ qw(db_args flat_filter) ],
'scalar --get_set_init' => [ qw(models all_edit_right vc use_linked_items all_employees all_businesses all_departments) ],
);
}
sub init_all_edit_right {
- $::auth->assert('sales_all_edit', 1)
+ return $_[0]->vc eq 'customer' ? $::auth->assert('sales_all_edit', 1) : $::auth->assert('purchase_all_edit', 1);
}
sub init_vc {
return $::form->{vc} if ($::form->{vc} eq 'customer' || $::form->{vc} eq 'vendor') || croak "self (DeliveryPlan) has no vc defined";
my $vc = $object->is_sales ? 'customer' : 'vendor';
my $id = $object->id;
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
return "controller.pl?action=Order/$action&type=$type&id=$id";
} else {
return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";