Merge branch 'upstream/develop'

This commit is contained in:
aspangaro 2013-11-04 22:02:25 +01:00
commit ccea7ebd50
9 changed files with 92 additions and 38 deletions

View File

@ -3,7 +3,7 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
Fix: Bad rounding on margin calculations and display.
Fix: Option drpo table into backup was broken.
Fix: Option drop table into backup was broken.
***** ChangeLog for 3.5 compared to 3.4.* *****
For users:
@ -11,7 +11,7 @@ For users:
- New: More options to select status of users into select user list.
- New: [ task #862 ] Add ODT on shipments.
- New: [ task #149 ] Add # of notes and attachments in tabs.
- New: Can edit customer ref at eny time.
- New: Can edit customer ref at any time.
- New: [ task #877 ] Reorganize menus.
- New: [ task #858 ] Holiday module: note on manual holiday assignation.
- New: [ task #892 ] Add hidden option in thirdparty customer/supplier module to hide non active
@ -21,10 +21,10 @@ For users:
- New: Add script export-bank-receipts.php
- New: Add option "filter=bank" onto script rebuild_merge_pdf.php to merge PDF that
has one payment on a specific bank account.*
- New: [ task #901 ] Add Extrafeild on Fiche Inter.
- New: [ task #901 ] Add Extrafield on Fiche Inter.
- New: Show process id in all command line scripts.
- New: Module mailman can subscribe/unsubscribe to ML according to categories or type of member.
- New: Add object_hour and object_date_rfc as substitution tag for opendocument generation.
- New: Add object_hour and object_date_rfc as substitution tag for open document generation.
- New: Add options to send an email when paypal or paybox payment is done.
- New: Clone product/service composition.
- New: [ task #926 ] Add extrafield feature on order lines.
@ -34,17 +34,17 @@ For users:
- New: Add a cron module to define scheduled jobs.
- New: Add new graphical boxes (customer and supplier invoices and orders per month).
- New: [ task #286 ] Enhance rounding function of prices to allow round of sum instead of sum of rounding.
- New: Can add an event automatically when a projet is create.
- New: Can add an event automatically when a project is create.
- New: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE.
- New: Add option excludethirdparties and onlythirdparties into merge pdf scripts.
- New: [ task #925 ] Add ODT document generation for Tasks in project module.
- New: [ task #924 ] Add numbering rule on task.
- New: [ task #165 ] Add import/export of multiprices.
- New: Add Maghreb regions and departments.
- New: A more responsive desgin for statistic box of home page.
- New: A more responsive design for statistic box of home page.
- New: [ task #1005 ] Adapting to Spanish legislation bill numbering
- New: [ task #1011 ] Now supplier order and invoice deal with payment terms and mode.
- New: [ task #1014 ] Add option to recursivly add parent category.
- New: [ task #1014 ] Add option to recursively add parent category.
- New: [ task #1016 ] Can define a specific numbering for deposits.
- New: [ task #918 ] Stock replenishment.
- New : Add pdf link into supplier invoice list and supplier order list.
@ -61,7 +61,7 @@ For users:
- New: Add hidden option MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS.
- New: Can send an email from thirdparty card.
- New: Can cancel holidays that were previously validated.
- New: Can choose contact on event (action com) creation, and filtred by thirdparty.
- New: Can choose contact on event (action com) creation, and filtered by thirdparty.
- New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID.
- New: Add page to make mass stock movement.
- New: Add field oustanding limit into thirdparty properties.
@ -74,8 +74,8 @@ For users:
- Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases).
For translators:
- Qual: Normalized sort order of all languages files with english reference files.
- New: Add language code files for South Africa, France new caledonia, Vietnam.
- Qual: Normalized sort order of all languages files with English reference files.
- New: Add language code files for South Africa, France new Caledonia, Vietnam.
- New: Translate string for email to change password.
For developers:
@ -93,14 +93,14 @@ For developers:
key to use a specific language file.
- New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables.
- Qual: All nowrap properties are now using CSS class nowrap.
- Qual: Move hardcoded code of module mailmanspip into trigger.
- New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a vlue that is list name,
- Qual: Move hard coded code of module mailmanspip into trigger.
- New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a value that is list name,
separated by a coma, of other POST parameters, Dolibarr will automatically save this parameters
into user cookies.
- New: Add hook addHomeSetup.
- New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK.
- New: A trigger can return an array of error strings instead of one error string.
- New: Add method to use a dictionnary as a combo box.
- New: Add method to use a dictionary as a combo box.
- New: Add update method for web service product.
- Fix also several bugs with old code.
@ -116,11 +116,11 @@ be replaced by a "return 0";
Goal is to fix old compatibility code that does not match hook specifications:
http://wiki.dolibarr.org/index.php/Hooks_system
2) If you implemented hook printTopRightMenu, check that output does not include '<td>' tags anymore.
2) If you implemented hook printTopRightMenu, check that output does not include '<td>' tags any more.
All content added must be tagged by a '<div>' with css class="login_block_elem"
3) Some methods object->addline used a first parameter that was object->id, some not. Of course
this was not a good pratice, since object->id is already known, there is no need to provide id as
this was not a good practice, since object->id is already known, there is no need to provide id as
parameter. All methods addline in this case were modified to remove this parameter.
4) Method ->classer_facturee() is deprecated. It must be replace with ->classifyBilled().
@ -135,18 +135,18 @@ Fix: Reordering supplier products in list by supplier or supplier ref was crashi
Fix: [ bug #1029 ] Tulip numbering mask
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card
Fix: [ bug #1033 ] SUPPLIER REF disappeared
Fix: update extrafield do not display immediatly after update
Fix: update extrafield do not display immediately after update
Fix: Fix bug with canvas thirdparty
Fix: [ bug #1037 ] Consumption> Supplier invoices related
Fix: User group name do not display in card (view or edit mode)
Fix: Link "Show all supplier invoice" on suplier card not working
Fix: Link "Show all supplier invoice" on supplier card not working
Fix: [ bug #1039 ] Pre-defined invoices conversion
Fix: If only service module is activated, it's impossible to delete service
Fix: [ bug #1043 ] Bad interventions ref numbering
Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted
Fix: Localtaxes balance not showing
Fix: Intervention box links to contracts id
Fix: Compatiblity with multicompany module
Fix: Compatibility with multicompany module
Fix: Edit propal line was losing product supplier price id
Fix: Delete linked element to supplier invoice when deleted
Fix: [ bug #1061 ] Bad info shipped products

View File

@ -87,7 +87,7 @@ if ($action == 'add')
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
$action = 'create';
}
if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox') || (GETPOST('type')=='radio')) && GETPOST('param'))
if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox')) && GETPOST('param'))
{
// Construct array for parameter (value of select list)
$parameters = GETPOST('param');
@ -124,11 +124,22 @@ if ($action == 'add')
$default_value = GETPOST('default_value');
$parameters = GETPOST('param');
$parameters_array = explode("\r\n",$parameters);
foreach($parameters_array as $param_ligne)
//In sellist we have only one line and it can have come to do SQL expression
if (GETPOST('type')=='sellist') {
foreach($parameters_array as $param_ligne)
{
$params['options'] = array($parameters=>null);
}
}
else
{
list($key,$value) = explode(',',$param_ligne);
$params['options'][$key] = $value;
}
//Esle it's separated key/value and coma list
foreach($parameters_array as $param_ligne)
{
list($key,$value) = explode(',',$param_ligne);
$params['options'][$key] = $value;
}
}
$result=$extrafields->addExtraField($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0),$default_value,$params);
if ($result > 0)
@ -215,7 +226,7 @@ if ($action == 'update')
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
$action = 'edit';
}
if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox') || (GETPOST('type')=='radio')) && GETPOST('param'))
if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox')) && GETPOST('param'))
{
// Construct array for parameter (value of select list)
$parameters = GETPOST('param');
@ -251,10 +262,21 @@ if ($action == 'update')
// Construct array for parameter (value of select list)
$parameters = GETPOST('param');
$parameters_array = explode("\r\n",$parameters);
foreach($parameters_array as $param_ligne)
//In sellist we have only one line and it can have come to do SQL expression
if (GETPOST('type')=='sellist') {
foreach($parameters_array as $param_ligne)
{
$params['options'] = array($parameters=>null);
}
}
else
{
list($key,$value) = explode(',',$param_ligne);
$params['options'][$key] = $value;
//Esle it's separated key/value and coma list
foreach($parameters_array as $param_ligne)
{
list($key,$value) = explode(',',$param_ligne);
$params['options'][$key] = $value;
}
}
$result=$extrafields->update($_POST['attrname'],$_POST['label'],$_POST['type'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0),$pos,$params);
if ($result > 0)

View File

@ -693,15 +693,23 @@ class ExtraFields
// 1 2 : label field name Nom du champ contenant le libelle
// 2 3 : key fields name (if differ of rowid)
// 3 4 : key field parent (for dependent lists)
// 4 5 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
$keyList='rowid';
if (count($InfoFieldList)>=3)
$keyList=$InfoFieldList[2].' as rowid';
if (count($InfoFieldList)>=4) {
if (count($InfoFieldList)>=3) {
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
$keyList.= ', '.$parentField;
}
if (count($InfoFieldList)>=4 && !empty($InfoFieldList[4])) {
if (strpos($InfoFieldList[4], 'extra')!==false) {
$keyList='main.'.$InfoFieldList[2].' as rowid';
}else {
$keyList=$InfoFieldList[2].' as rowid';
}
}
$fields_label = explode('|',$InfoFieldList[1]);
if(is_array($fields_label)) {
@ -717,6 +725,16 @@ class ExtraFields
$sql = 'SELECT '.$keyList;
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
if (!empty($InfoFieldList[4])) {
//We have to join on extrafield table
if (strpos($InfoFieldList[4], 'extra')!==false) {
$sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra';
$sql.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
}else {
$sql.= ' WHERE '.$InfoFieldList[4];
}
}
//$sql.= ' WHERE entity = '.$conf->entity;
//print $sql;

View File

@ -325,7 +325,9 @@ create table llx_actioncomm_resources
fk_actioncomm integer NOT NULL,
element_type varchar(50) NOT NULL,
fk_element integer NOT NULL,
fk_element_status varchar(32) NULL
answer_status varchar(50) NULL,
mandatory smallint,
transparent smallint
) ENGINE=innodb;
ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element);
ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element);

View File

@ -26,5 +26,7 @@ create table llx_actioncomm_resources
fk_actioncomm integer NOT NULL,
element_type varchar(50) NOT NULL,
fk_element integer NOT NULL,
fk_element_status varchar(32) NULL
answer_status varchar(50) NULL,
mandatory smallint,
transparent smallint
) ENGINE=innodb;

View File

@ -368,7 +368,7 @@ ExtrafieldRadio=Radio button
ExtrafieldParamHelpselect=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>In order to have the list depending on another :<br>1,value1|parent_list_code:parent_key<br>2,value2|parent_list_code:parent_key
ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpradio=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpsellist=Parameters list have come from table<br><br> for exemple : <br>c_typent:libelle:id<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column
ExtrafieldParamHelpsellist=Parameters list have come from table<br><br> for exemple : <br>c_typent:libelle:id::filter<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter <br> filter can be a simple test (eg active=1) to display only active value <br> if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)
LibraryToBuildPDF=Library used to build PDF
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (vat is not applied on local tax)<br>2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)<br>3 : local tax apply on products without vat (vat is not applied on local tax)<br>4 : local tax apply on products before vat (vat is calculated on amount + localtax)<br>5 : local tax apply on services without vat (vat is not applied on local tax)<br>6 : local tax apply on services before vat (vat is calculated on amount + localtax)

View File

@ -368,7 +368,7 @@ ExtrafieldRadio=Bouton radio
ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...<br><br>Pour que la liste soit dépendante d'une autre :<br>1,valeur1|code_liste_parent:clef_parent<br>2,valeur2|code_liste_parent:clef_parent
ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
ExtrafieldParamHelpsellist=La liste vient d'une table<br><br> par exemple : <br>c_typent:libelle:id<br><br>Pour que la liste soit dépendante d'une autre :<br>c_typent:libelle:id:code_liste_parent|colonne_parent
ExtrafieldParamHelpsellist=La liste vient d'une table<br><br> par exemple : <br>c_typent:libelle:id::filter<br><br>Pour que la liste soit dépendante d'une autre :<br>c_typent:libelle:id:code_liste_parent|colonne_parent:filter<br> filter peux être un test simple active=1 pour ne proposer que les valeur active<br> si vous voulez faire un filtre sur des attributs supplémentaires utiliser la syntax extra.champ=...(où champ est la code de l'attribut supplémentaire)
LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF
WarningUsingFPDF=Attention : votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalités (Unicode, transparence des images, langues cyrilliques, arabes ou asiatiques...), aussi vous pouvez rencontrer des problèmes durant la génération des PDF.<br>Pour résoudre cela et avoir une prise en charge complète de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">bibliothèque TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b>
LocalTaxDesc=Certains pays appliquent 2 voire 3 taux sur chaque ligne de facture. Si c'est le cas, choisissez le type du deuxième et troisième taux et sa valeur. Les types possibles sont:<br>1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)<br>3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)<br>4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)<br>5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale)

View File

@ -4,6 +4,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@ -46,6 +47,9 @@ $fieldtype = (! empty($ref) ? 'ref' : 'rowid');
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('productdocuments'));
// Get parameters
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@ -68,6 +72,10 @@ if ($id > 0 || ! empty($ref))
}
$modulepart='produit';
$parameters=array('id'=>$id);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
/*
* Action envoie fichier
*/
@ -106,6 +114,8 @@ if ($object->id)
$picto=($object->type==1?'service':'product');
dol_fiche_head($head, 'documents', $titre, 0, $picto);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
// Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);

View File

@ -1518,22 +1518,22 @@ class Societe extends CommonObject
}
if ($mode == 2)
{
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6').' '.$langs->trans("ActivityCeased");
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased");
if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity");
}
if ($mode == 3)
{
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6');
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8');
if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4');
}
if ($mode == 4)
{
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6').' '.$langs->trans("ActivityCeased");
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased");
if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity");
}
if ($mode == 5)
{
if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut6');
if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut8');
if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4');
}
}