Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 984f6322

Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt

  • ID 984f6322b98c8d0cd3ceb9f659ed6621d180e617
  • Vorgänger 95e7381e
  • Nachfolger 43e74053

Mandantenkonfiguration: experimentelle Features einzeln an-/abschaltbar machen

es gibt nun "feature_experimental_order" und "feature_experimental_assortment"

angepasster cherry pick von odyn: bc94c40f2f64e7b40fbd90c49dbf41f86688c32d

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
my $db = $self->is_vendor() ? 'vendor' : 'customer';
my $action = 'add';
if ($::instance_conf->get_feature_experimental && 'oe.pl' eq $script) {
if ($::instance_conf->get_feature_experimental_order && 'oe.pl' eq $script) {
$script = 'controller.pl';
$action = 'Order/' . $action;
}
SL/Controller/DeliveryPlan.pm
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";
SL/Controller/DeliveryValueReport.pm
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";
SL/Controller/FinancialControllingReport.pm
my $type = $object->type;
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=customer&id=$id";
SL/Controller/SellPriceInformation.pm
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";
SL/Controller/ShopOrder.pm
$self->shop_order->save;
$self->shop_order->link_to_record($order);
}) || die $order->db->error;
my $order_controller = $::instance_conf->get_feature_experimental ? 'Order' :'oe.pl';
my $order_controller = $::instance_conf->get_feature_experimental_order ? 'Order' :'oe.pl';
$self->redirect_to(controller => $order_controller, action => 'edit', type => 'sales_order', vc => 'customer', id => $order->id);
}
}
SL/Controller/TopQuickSearch/OERecord.pm
}
sub redirect_to_object {
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
SL::Controller::Base->new->url_for(
controller => 'Order',
action => 'edit',
SL/DB/MetaSetup/Default.pm
feature_datev => { type => 'boolean', default => 'true', not_null => 1 },
feature_erfolgsrechnung => { type => 'boolean', default => 'false', not_null => 1 },
feature_eurechnung => { type => 'boolean', default => 'true', not_null => 1 },
feature_experimental => { type => 'boolean', default => 'true', not_null => 1 },
feature_experimental_assortment => { type => 'boolean', default => 'true', not_null => 1 },
feature_experimental_order => { type => 'boolean', default => 'true', not_null => 1 },
feature_ustva => { type => 'boolean', default => 'true', not_null => 1 },
fxgain_accno_id => { type => 'integer' },
fxloss_accno_id => { type => 'integer' },
SL/FU.pm
} elsif ($params{trans_type} eq 'sales_quotation') {
my $script = 'oe.pl';
my $action = 'edit';
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
......
} elsif ($params{trans_type} eq 'sales_order') {
my $script = 'oe.pl';
my $action = 'edit';
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
......
} elsif ($params{trans_type} eq 'request_quotation') {
my $script = 'oe.pl';
my $action = 'edit';
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
......
} elsif ($params{trans_type} eq 'purchase_order') {
my $script = 'oe.pl';
my $action = 'edit';
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
SL/InstanceConfiguration.pm
Returns the configuration for "vertreter"
=item C<get_feature_experimental>
=item C<get_feature_experimental_assortment>
Returns the configuration for experimental features
Returns the configuration for experimental feature "assortment"
=item C<get_feature_experimental_order>
Returns the configuration for experimental feature "order"
=item C<get_parts_show_image>
SL/Presenter/Order.pm
my $link_start = '';
my $link_end = '';
unless ($params{no_link}) {
my $action = $::instance_conf->get_feature_experimental
my $action = $::instance_conf->get_feature_experimental_order
? 'controller.pl?action=Order/edit'
: 'oe.pl?action=edit';
$link_start = '<a href="' . $action . '&amp;type=' . $type . '&amp;id=' . escape($order->id) . '">';
bin/mozilla/ct.pl
}
my $base_url = build_std_url("script=$ref->{module}.pl", 'action=edit', 'id=' . E($ref->{invid}), 'callback', @hidden_nondefault);
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
if ('oe' eq $ref->{module}) {
$base_url = build_std_url("script=controller.pl", 'action=Order/edit', 'id=' . E($ref->{invid}), 'callback', @hidden_nondefault);
}
bin/mozilla/do.pl
my $callback = $form->escape($href);
my $edit_url = build_std_url('action=edit', 'type', 'vc');
my $edit_order_url = ($::instance_conf->get_feature_experimental)
my $edit_order_url = ($::instance_conf->get_feature_experimental_order)
? build_std_url('script=controller.pl', 'action=Order/edit', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'))
: build_std_url('script=oe.pl', 'action=edit', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'));
bin/mozilla/ic.pl
# | ist bestellt | Von Kunden bestellt | -> edit_oe_ord_link
# | Anfrage | Angebot | -> edit_oe_quo_link
my $edit_oe_ord_link = ($::instance_conf->get_feature_experimental)
my $edit_oe_ord_link = ($::instance_conf->get_feature_experimental_order)
? build_std_url("script=controller.pl", 'action=Order/edit',
'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'), 'id=' . E($ref->{trans_id}), 'callback')
: build_std_url("script=oe.pl", 'action=edit',
'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'), 'id=' . E($ref->{trans_id}), 'callback');
my $edit_oe_quo_link = ($::instance_conf->get_feature_experimental)
my $edit_oe_quo_link = ($::instance_conf->get_feature_experimental_order)
? build_std_url("script=controller.pl", 'action=Order/edit',
'type=' . E($ref->{cv} eq 'vendor' ? 'request_quotation' : 'sales_quotation'), 'id=' . E($ref->{trans_id}), 'callback')
: build_std_url("script=oe.pl", 'action=edit',
bin/mozilla/io.pl
_order();
if ($::instance_conf->get_feature_experimental) {
if ($::instance_conf->get_feature_experimental_order) {
my $order = _make_record();
$order->globalproject_id(undef) if !$order->globalproject_id;
$order->payment_id(undef) if !$order->payment_id;
bin/mozilla/oe.pl
my $idx = 1;
my $edit_url = ($::instance_conf->get_feature_experimental)
my $edit_url = ($::instance_conf->get_feature_experimental_order)
? build_std_url('script=controller.pl', 'action=Order/edit', 'type')
: build_std_url('action=edit', 'type', 'vc');
......
my $content;
if (@{ $quotations }) {
my $edit_url = ($::instance_conf->get_feature_experimental)
my $edit_url = ($::instance_conf->get_feature_experimental_order)
? build_std_url('script=controller.pl', 'action=Order/edit')
: build_std_url('script=oe.pl', 'action=edit');
locale/de/all
'Employees' => 'Benutzer',
'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => 'Leere Lager-Auswahl wird ignoriert, selbst wenn noch ein Lagerplatz ausgewählt ist. Alle Daten können durch zurück und vorwärts korrigiert werden.',
'Empty transaction!' => 'Buchung ist leer!',
'Enable experimental features' => 'Experimentelle Features einschalten',
'Enabled Quick Searched' => 'Aktivierte Schnellsuchen',
'Enabled modules' => 'Aktivierte Module',
'End date' => 'Enddatum',
......
'Expense Account' => 'Aufwandskonto',
'Expense/Asset' => 'Aufwand/Anlagen',
'Experimental Features' => 'Experimentelle Features',
'Experimental features are:' => 'Experimentelle Features sind:',
'Export' => 'Export',
'Export Buchungsdaten' => 'Export Buchungsdaten',
'Export Number' => 'Exportnummer',
locale/en/all
'Employees' => '',
'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => '',
'Empty transaction!' => '',
'Enable experimental features' => '',
'Enabled Quick Searched' => '',
'Enabled modules' => '',
'End date' => '',
......
'Expense Account' => '',
'Expense/Asset' => '',
'Experimental Features' => '',
'Experimental features are:' => '',
'Export' => '',
'Export Buchungsdaten' => '',
'Export Number' => '',
menus/user/10-order-controller.yaml
- parent: ar
id: ar_add_quotation
access: sales_quotation_edit & (!client/feature_experimental)
access: sales_quotation_edit & (!client/feature_experimental_order)
- parent: ar
id: ar_add_sales_order
access: sales_order_edit & (!client/feature_experimental)
access: sales_order_edit & (!client/feature_experimental_order)
- parent: ap
id: ap_add_rfq
access: request_quotation_edit & (!client/feature_experimental)
access: request_quotation_edit & (!client/feature_experimental_order)
- parent: ap
id: ap_add_purchase_order
access: purchase_order_edit & (!client/feature_experimental)
access: purchase_order_edit & (!client/feature_experimental_order)
- parent: ar
id: ar_add_quotation_experimental
name: Add Quotation
icon: quotation_add
order: 250
access: sales_quotation_edit & client/feature_experimental
access: sales_quotation_edit & client/feature_experimental_order
params:
action: Order/add
type: sales_quotation
......
name: Add Sales Order
icon: sales_order_add
order: 350
access: sales_order_edit & client/feature_experimental
access: sales_order_edit & client/feature_experimental_order
params:
action: Order/add
type: sales_order
......
name: Add RFQ
icon: rfq_add
order: 150
access: request_quotation_edit & client/feature_experimental
access: request_quotation_edit & client/feature_experimental_order
params:
action: Order/add
type: request_quotation
......
name: Add Purchase Order
icon: purchase_order_add
order: 250
access: purchase_order_edit & client/feature_experimental
access: purchase_order_edit & client/feature_experimental_order
params:
action: Order/add
type: purchase_order
sql/Pg-upgrade2/defaults_add_feature_experimental2.sql
-- @tag: defaults_add_feature_experimental2
-- @description: experimentelle Features mit einzelnen Optionen
-- @depends: defaults_add_feature_experimental
ALTER TABLE defaults RENAME COLUMN feature_experimental TO feature_experimental_order;
ALTER TABLE defaults ADD COLUMN feature_experimental_assortment BOOLEAN NOT NULL DEFAULT TRUE;
UPDATE defaults SET feature_experimental_assortment = feature_experimental_order;
t/menu/parse_access_string.t
$node{access} = '(no_such_right & sales_order_edit | (no_such_right & sales_order_edit))';
ok(!$menu->parse_access_string(\%node), 'parenthesis 2');
$node{access} = 'sales_quotation_edit & client/feature_experimental';
$node{access} = 'sales_quotation_edit & client/feature_experimental_order';
ok($menu->parse_access_string(\%node), 'client');
$node{access} = '!no_such_right';
......
$node{access} = '(no_such_right & sales_order_edit | (!no_such_right | !sales_order_edit))';
ok($menu->parse_access_string(\%node), 'parenthesis with negation 2');
$node{access} = 'sales_quotation_edit & !client/feature_experimental';
$node{access} = 'sales_quotation_edit & !client/feature_experimental_order';
ok(!$menu->parse_access_string(\%node), 'client negation');
done_testing;
templates/webpages/client_config/_features.html
</tr>
<tr><td class="listheading" colspan="4">[% LxERP.t8("Experimental Features") %]</td></tr>
<tr>
<td align="right">[% LxERP.t8('Enable experimental features') %]</td>
<td>[% L.yes_no_tag('defaults.feature_experimental', SELF.defaults.feature_experimental) %]</td>
<td>[% LxERP.t8('Experimental features are:') %] [% LxERP.t8('new order controller') %], [% LxERP.t8('Assortment') %]</td>
<td align="right">[% LxERP.t8('new order controller') %]</td>
<td>[% L.yes_no_tag('defaults.feature_experimental_order', SELF.defaults.feature_experimental_order) %]</td>
</tr>
<tr>
<td align="right">[% LxERP.t8('Assortment') %]</td>
<td>[% L.yes_no_tag('defaults.feature_experimental_assortment', SELF.defaults.feature_experimental_assortment) %]</td>
</tr>
<tr><td class="listheading" colspan="4">[% LxERP.t8("Shipped Quantity Algorithm") %]</td></tr>
templates/webpages/client_config/_ranges_of_numbers.html
<tr>
<td align="right" nowrap>[% LxERP.t8('Last Sales Delivery Order Number') %]</td>
<td>[% L.input_tag("defaults.sdonumber", SELF.defaults.sdonumber, size="15") %]</td>
[%- IF INSTANCE_CONF.get_feature_experimental %]
[%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
<td align="right" nowrap>[% LxERP.t8('Last Assortment Number') %]</td>
<td>[% L.input_tag("defaults.assortmentnumber", SELF.defaults.assortmentnumber, size="15") %]</td>
[%- END -%]
templates/webpages/customer_vendor/get_delivery.html
<tr class="listrow[% loop.count % 2 %]">
<td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
<td>[% IF row.id %]<a href='[% row.script %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber) || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.oe_id %]<a href='controller.pl?action=Order/edit&type=[% IF SELF.is_customer %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
[%- ELSE -%]
<td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF SELF.is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
templates/webpages/customer_vendor_turnover/_list_open_orders.html
<tr class="listrow[% loop.count % 2 %]">
<td>[% IF row.quotation %]
[% IF FORM.db == 'customer' %][% 'Sales quotation' | $T8 %][% ELSE %][% 'RFQ' | $T8 %][% END %]</td>
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_quotation[% ELSE %]request_quotation[% END %]&id=[% HTML.escape(row.id) %]'>
[% END %][% HTML.escape(row.quonumber) || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
......
[%- END -%]
[% ELSE %]
[% IF FORM.db == 'customer' %][% 'Sales Order' | $T8 %][% ELSE %][% 'Purchase Order' | $T8 %][% END %]</td>
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.id) %]'>
[% END %][% HTML.escape(row.ordnumber) || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
templates/webpages/customer_vendor_turnover/order_statistic.html
[%- FOREACH row = orders %]
<tr class="listrow[% loop.count % 2 %]">
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.ordnumber) || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
<td>[% IF row.id %]<a href='oe.pl?action=edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&vc=[% FORM.db %]&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
templates/webpages/customer_vendor_turnover/quotation_statistic.html
[%- FOREACH row = orders %]
<tr class="listrow[% loop.count % 2 %]">
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_quotation[% ELSE %]request_quotation[% END %]&id=[% HTML.escape(row.id) %]'>
[% END %][% HTML.escape(row.quonumber) || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
templates/webpages/delivery_plan/_filter.html
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.part, value='part', label=LxERP.t8('Part')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.service, value='service', label=LxERP.t8('Service')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assembly, value='assembly', label=LxERP.t8('Assembly')) %]
[%- IF INSTANCE_CONF.get_feature_experimental %]
[%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assortment, value='assortment', label=LxERP.t8('Assortment')) %]
[% END %]
</td>
templates/webpages/delivery_value_report/_filter.html
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.part, value='part', label=LxERP.t8('Part')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.service, value='service', label=LxERP.t8('Service')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assembly, value='assembly', label=LxERP.t8('Assembly')) %]
[%- IF INSTANCE_CONF.get_feature_experimental %]
[%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assortment, value='assortment', label=LxERP.t8('Assortment')) %]
[% END %]
</td>
templates/webpages/ic/generate_report_bottom.html
<td>[%- 'Service (typeabbreviation)' | $T8 %]</td>
<td>[%- 'Service' | $T8 %]</td>
</tr>
[%- IF INSTANCE_CONF.get_feature_experimental %]
[%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
<tr class="listrow1">
<td>[%- 'Assortment (typeabbreviation)' | $T8 %]</td>
<td>[%- 'Assortment' | $T8 %]</td>
templates/webpages/ic/search.html
<input name="l_assembly" id="l_assembly" class="checkbox" type="checkbox" value="Y" checked>
<label for="l_assembly">[% 'Assembly' | $T8 %]</label>
</td>
[%- IF INSTANCE_CONF.get_feature_experimental %]
[%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
<td>
<input name="l_assortment" id="l_assortment" class="checkbox" type="checkbox" value="Y" checked>
<label for="l_assortment">[% 'Assortment' | $T8 %]</label>
templates/webpages/mass_invoice_create_print_from_do/list_sales_delivery_orders.html
<td>[% L.checkbox_tag('id[]', value=sales_delivery_order.id, "data-checkall"=1) %]</td>
<td>[% HTML.escape(sales_delivery_order.transdate_as_date) %]</td>
<td>[% L.link(SELF.url_for(controller="do.pl", action="edit", type="sales_delivery_order", id=sales_delivery_order.id), sales_delivery_order.donumber) %]</td>
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% L.link(SELF.url_for(controller="controller.pl", action="Order/edit", type="sales_order", id=sales_delivery_order.sales_order.id), sales_delivery_order.ordnumber) %]</td>
[%- ELSE -%]
<td>[% L.link(SELF.url_for(controller="oe.pl", action="edit", type="sales_order", id=sales_delivery_order.sales_order.id), sales_delivery_order.ordnumber) %]</td>
templates/webpages/requirement_spec_order/list.html
[% END %]
</td>
<td>
[%- IF INSTANCE_CONF.get_feature_experimental -%]
[%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<a href="controller.pl?action=Order/edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">
[%- ELSE -%]
<a href="oe.pl?action=edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">

Auch abrufbar als: Unified diff