';
+
// Other attributes
$cols = 2;
$objectconf=$object;
diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql
index 34cef4c94d4..45503449492 100644
--- a/htdocs/install/mysql/data/llx_c_action_trigger.sql
+++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql
@@ -35,6 +35,7 @@
delete from llx_c_action_trigger;
-- actions enabled by default (constant created for that) when we enable module agenda
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_MODIFY','Third party update','Executed when you update third party','societe',1);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_DELETE','Third party deleted','Executed when you delete third party','societe',1);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2);
@@ -129,8 +130,9 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','mrp',662);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','mrp',663);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50);
-insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact address record','contact',51);
-insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_MODIFY','Contact address update','Executed when a contact is updated','contact',51);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact address record','contact',52);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',53);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502);
diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql
index fabbbf2e700..5ca98be8545 100644
--- a/htdocs/install/mysql/data/llx_c_email_templates.sql
+++ b/htdocs/install/mysql/data/llx_c_email_templates.sql
@@ -35,6 +35,6 @@ INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_u
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
diff --git a/htdocs/install/mysql/data/llx_c_productbatch_qcstatus.sql b/htdocs/install/mysql/data/llx_c_productbatch_qcstatus.sql
new file mode 100644
index 00000000000..7e0bb6661f6
--- /dev/null
+++ b/htdocs/install/mysql/data/llx_c_productbatch_qcstatus.sql
@@ -0,0 +1,28 @@
+-- Copyright (C) 2021 Noé Cendrier
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+--
+
+--
+-- Do not place a comment at the end of the line, this file is parsed when
+-- from the install and all '--' are removed.
+--
+-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
+-- de l'install et tous les sigles '--' sont supprimés.
+--
+
+INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);
+INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1);
+
diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
index e69cad3564c..5dfeac1d222 100644
--- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
+++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
@@ -587,4 +587,5 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position)
-- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN montant double(24,8) NULL;
-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN montant DROP NOT NULL;
+ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index 2c3173ed4f2..51643a92a01 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -59,11 +59,11 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position)
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI');
+ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
+
-- For v14
-ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
-
create table llx_accounting_groups_account
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
@@ -157,6 +157,18 @@ CREATE TABLE llx_workstation_workstation_usergroup(
fk_workstation integer
) ENGINE=innodb;
+CREATE TABLE llx_c_producbatch_qcstatus(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ entity integer NOT NULL DEFAULT 1,
+ code varchar(16) NOT NULL,
+ label varchar(50) NOT NULL,
+ active integer DEFAULT 1 NOT NULL
+) ENGINE=innodb;
+
+ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code, entity);
+
+INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);
+INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1);
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);
@@ -187,6 +199,7 @@ ALTER TABLE llx_mrp_production ADD COLUMN origin_type varchar(10) AFTER origin_i
ALTER TABLE llx_fichinter ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;
ALTER TABLE llx_projet ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;
+ALTER TABLE llx_expensereport ADD COLUMN last_main_doc varchar(255) DEFAULT NULL AFTER model_pdf;
create table llx_payment_vat
(
@@ -220,7 +233,7 @@ ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0;
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
@@ -487,3 +500,9 @@ create table llx_knowledgemanagement_knowledgerecord_extrafields
-- add default amount by member type
ALTER TABLE llx_adherent_type ADD COLUMN amount DOUBLE(24,8) NULL DEFAULT NULL AFTER subscription;
+
+-- add action trigger
+INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('COMPANY_MODIFY','Third party update','Executed when you update third party','societe',1);
+INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('CONTACT_MODIFY','Contact address update','Executed when a contact is updated','contact',51);
+
+
diff --git a/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.key.sql b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.key.sql
new file mode 100644
index 00000000000..9ffa27bc3a5
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.key.sql
@@ -0,0 +1,19 @@
+-- ========================================================================
+-- Copyright (C) 2021 Noé Cendrier
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+-- ========================================================================
+
+ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code, entity);
diff --git a/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.sql b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.sql
new file mode 100644
index 00000000000..73daa56067a
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.sql
@@ -0,0 +1,26 @@
+-- ========================================================================
+-- Copyright (C) 2012-2017 Noé Cendrier
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+-- ========================================================================
+
+CREATE TABLE llx_c_productbatch_qcstatus
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ entity integer NOT NULL DEFAULT 1,
+ code varchar(16) NOT NULL,
+ label varchar(50) NOT NULL,
+ active integer DEFAULT 1 NOT NULL
+)ENGINE=innodb;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index c03a3739d6a..34852c2ca61 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -966,6 +966,8 @@ Permission23003=Delete Scheduled job
Permission23004=Execute Scheduled job
Permission50101=Use Point of Sale (SimplePOS)
Permission50151=Use Point of Sale (TakePOS)
+Permission50152=Edit sales lines
+Permission50153=Edit ordered sales lines
Permission50201=Read transactions
Permission50202=Import transactions
Permission50330=Read objects of Zapier
@@ -1040,11 +1042,12 @@ DictionaryMeasuringUnits=Measuring Units
DictionarySocialNetworks=Social Networks
DictionaryProspectStatus=Prospect status for companies
DictionaryProspectContactStatus=Prospect status for contacts
-DictionaryHolidayTypes=Types of leave
+DictionaryHolidayTypes=Leave - Types of leave
DictionaryOpportunityStatus=Lead status for project/lead
DictionaryExpenseTaxCat=Expense report - Transportation categories
DictionaryExpenseTaxRange=Expense report - Range by transportation category
DictionaryTransportMode=Intracomm report - Transport mode
+DictionaryBatchStatus=Product lot/serial Quality Control status
TypeOfUnit=Type of unit
SetupSaved=Setup saved
SetupNotSaved=Setup not saved
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index 47bf937a90e..aba05d67fc8 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -102,7 +102,7 @@ CashDeskGenericMaskCodes6 = {TN} tag is used to add the terminal numb
TakeposGroupSameProduct=Group same products lines
StartAParallelSale=Start a new parallel sale
SaleStartedAt=Sale started at %s
-ControlCashOpening=Control cash popup at opening POS
+ControlCashOpening=Open the "Control cash" popup when opening the POS
CloseCashFence=Close cash desk control
CashReport=Cash report
MainPrinterToUse=Main printer to use
@@ -126,5 +126,5 @@ ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled
AllowDelayedPayment=Allow delayed payment
PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts
WeighingScale=Weighing scale
-ShowPriceHT = Display the price excluding tax column
-ShowPriceHTOnReceipt = Display the price excluding tax column on receipt
+ShowPriceHT = Display the column with the price excluding tax (on screen)
+ShowPriceHTOnReceipt = Display the column with the price excluding tax (on receipt)
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index a9d31c1dbaf..9f75374f2a0 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -82,6 +82,8 @@ EventOrganizationICSLink=Link ICS for events
ConferenceOrBoothInformation=Conference Or Booth informations
Attendees = Attendees
EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference
+SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location
+SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference
#
# Status
#
@@ -94,8 +96,27 @@ EvntOrgCancelled = Cancelled
#
# Public page
#
+RegisterPage = Page for conferences or booth
+EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page.
+EvntOrgRegistrationHelpMessage = Here, you can suggest a new conference or a new booth for the project
+SuggestConference = Suggest a new conference
+SuggestBooth = Suggest a booth
+ViewAndVote = View and vote for suggested events
PublicAttendeeSubscriptionPage = Public link of registration to a conference
MissingOrBadSecureKey = The security key is invalid or missing
-EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference
-EvntOrgStartDuration = This conference starts on
-EvntOrgEndDuration = and ends on
+EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference : '%s'
+EvntOrgDuration = This conference starts on %s and ends on %s.
+ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s.
+#
+# SubscriptionOk page
+#
+SubscriptionOk = Your subscription to this conference has been validated
+#
+# Subscription validation mail
+#
+ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to a conference
+#
+# Payment page
+#
+Attendee = Participant
+PaymentConferenceAttendee = Paiement de participation à une conférence
diff --git a/htdocs/langs/en_US/hrm.lang b/htdocs/langs/en_US/hrm.lang
index 3b8f137e103..da098e10bdb 100644
--- a/htdocs/langs/en_US/hrm.lang
+++ b/htdocs/langs/en_US/hrm.lang
@@ -9,7 +9,7 @@ ConfirmDeleteEstablishment=Are you sure you wish to delete this establishment?
OpenEtablishment=Open establishment
CloseEtablishment=Close establishment
# Dictionary
-DictionaryPublicHolidays=HRM - Public holidays
+DictionaryPublicHolidays=Leave - Public holidays
DictionaryDepartment=HRM - Department list
DictionaryFunction=HRM - Job positions
# Module
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index fceeb1a15f1..f47354958eb 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -13,7 +13,7 @@ BOMsSetup=Setup of module BOM
ListOfBOMs=List of bills of material - BOM
ListOfManufacturingOrders=List of Manufacturing Orders
NewBOM=New bill of materials
-ProductBOMHelp=Product to create with this BOM. Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
+ProductBOMHelp=Product to create (or disassemble) with this BOM. Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
BOMsNumberingModules=BOM numbering templates
BOMsModelModule=BOM document templates
MOsNumberingModules=MO numbering templates
@@ -39,7 +39,7 @@ DateStartPlannedMo=Date start planned
DateEndPlannedMo=Date end planned
KeepEmptyForAsap=Empty means 'As Soon As Possible'
EstimatedDuration=Estimated duration
-EstimatedDurationDesc=Estimated duration to manufacture this product using this BOM
+EstimatedDurationDesc=Estimated duration to manufacture (or disassemble) this product using this BOM
ConfirmValidateBom=Are you sure you want to validate the BOM with the reference %s (you will be able to use it to build new Manufacturing Orders)
ConfirmCloseBom=Are you sure you want to cancel this BOM (you won't be able to use it to build new Manufacturing Orders anymore) ?
ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders)
@@ -63,6 +63,7 @@ ConsumeAndProduceAll=Consume and Produce All
Manufactured=Manufactured
TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce.
ForAQuantityOf=For a quantity to produce of %s
+ForAQuantityToConsumeOf=For a quantity to disassemble of %s
ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order?
ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements.
ProductionForRef=Production of %s
diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang
index 644da334851..f8f0239e4a7 100644
--- a/htdocs/langs/en_US/productbatch.lang
+++ b/htdocs/langs/en_US/productbatch.lang
@@ -1,4 +1,4 @@
-# ProductBATCH language file - en_US - ProductBATCH
+# ProductBATCH language file - Source file is en_US - ProductBATCH
ManageLotSerial=Use lot/serial number
ProductStatusOnBatch=Yes (lot required)
ProductStatusOnSerial=Yes (unique serial number required)
@@ -32,4 +32,8 @@ ManageLotMask=Custom mask
CustomMasks=Adds an option to define mask in the product card
LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask
SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask
-QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
\ No newline at end of file
+QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
+
+#Traceability - qc status
+OutOfOrder=Out of order
+InWorkingOrder=In working order
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 44e4aba52ed..e9b5ddf5c4e 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -1044,6 +1044,7 @@ DictionaryOpportunityStatus=Statut d'opportunités pour les affaires/projets
DictionaryExpenseTaxCat=Note de frais - catégories de déplacement
DictionaryExpenseTaxRange=Note de frais - Tri par catégorie de déplacement
DictionaryTransportMode=Déclaration d'échanges intracommunautaires - Mode de transport
+DictionaryBatchStatus=État de qualité du lot/série (produits)
TypeOfUnit=Type d'unité
SetupSaved=Configuration sauvegardée
SetupNotSaved=Configuration non enregistrée
diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang
index 89c7ab9d347..f3a03d7f978 100644
--- a/htdocs/langs/fr_FR/productbatch.lang
+++ b/htdocs/langs/fr_FR/productbatch.lang
@@ -1,4 +1,4 @@
-# ProductBATCH language file - en_US - ProductBATCH
+# ProductBATCH language file - Source file is en_US - ProductBATCH
ManageLotSerial=Utiliser les numéros de lots/série
ProductStatusOnBatch=Oui (Lot/Série requis)
ProductStatusOnSerial=Oui (numéro de série unique requis)
@@ -33,3 +33,5 @@ CustomMasks=Ajoute une option pour définir le masque dans la fiche produit
LotProductTooltip=Ajoute une option dans la fiche produit pour définir un masque de numéro de lot dédié
SNProductTooltip=Ajoute une option dans la fiche produit pour définir un masque de numéro de série dédié
QtyToAddAfterBarcodeScan=Quantité à ajouter pour chaque code à barres/lot/série scanné
+LotProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de lot
+SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série
\ No newline at end of file
diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php
index d687faebfb8..9007eab60cc 100644
--- a/htdocs/modulebuilder/template/admin/setup.php
+++ b/htdocs/modulebuilder/template/admin/setup.php
@@ -82,6 +82,7 @@ $arrayofparameters = array(
//'MYMODULE_MYPARAM5'=>array('type'=>'yesno', 'enabled'=>1),
//'MYMODULE_MYPARAM5'=>array('type'=>'thirdparty_type', 'enabled'=>1),
//'MYMODULE_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1),
+ //'MYMODULE_MYPARAM7'=>array('type'=>'product', 'enabled'=>1),
);
$error = 0;
@@ -299,6 +300,11 @@ if ($action == 'edit') {
});';
print '';
}
+ } elseif ($val['type'] == 'product') {
+ if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
+ $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
+ $form->select_produits($selected, $constname, '', 0);
+ }
} else {
print '';
}
@@ -365,8 +371,16 @@ if ($action == 'edit') {
} elseif ($conf->global->{$constname}==0) {
print $langs->trans("NorProspectNorCustomer");
}
+ } elseif ($val['type'] == 'product') {
+ $product = new Product($db);
+ $resprod = $product->fetch($conf->global->{$constname});
+ if ($resprod > 0) {
+ print $product->ref;
+ } elseif ($resprod < 0) {
+ setEventMessages(null, $object->errors, "errors");
+ }
} else {
- print $conf->global->{$constname};
+ print $conf->global->{$constname};
}
print '';
}
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index 31bb4fd36ab..1f9da9c80ae 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -506,7 +506,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} else {
$langs->load("errors");
//print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', 0);
- print ''.$langs->trans("Validate").'';
+ print ''.$langs->trans("Validate").'';
}
}
@@ -516,16 +516,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
/*
if ($permissiontoadd) {
if ($object->status == $object::STATUS_ENABLED) {
- print 'id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").''."\n";
+ print dolGetButtonAction($langs->trans('Disable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd);
} else {
- print 'id.'&action=enable&token='.newToken().'">'.$langs->trans("Enable").''."\n";
+ print dolGetButtonAction($langs->trans('Enable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd);
}
}
if ($permissiontoadd) {
if ($object->status == $object::STATUS_VALIDATED) {
- print 'id.'&action=close&token='.newToken().'">'.$langs->trans("Cancel").''."\n";
+ print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd);
} else {
- print 'id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").''."\n";
+ print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
}
}
*/
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 07a5cf4fa03..05cce2ba934 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -502,14 +502,14 @@ print '