Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-04-30 20:17:47 +02:00
commit e62bdd8647
3 changed files with 25 additions and 23 deletions

View File

@ -92,27 +92,25 @@ WARNING: If you used external modules, some of them may need to be upgraded due
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
- Fix: Dutch (nl_NL) translation
- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
- Generalize fix: file with a specific mask not found, again
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
- Fix: Can't reset payment due date
- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price
- Fix: Orderstoinvoice didn't act as expected when no order was checked
- Fix: Bad link to all proposals into Third party card if customer is prospect
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment
- Fix: [ bug #789 ] VAT not being calculated in POS
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price
- Fix: [ bug #810 ] Cannot update ODT template path
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes
- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary
- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres)
- Fix: [ bug #857 ] Invoice created from shipment does not have the order discount
- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email
- Fix: [ bug #855 ] Holiday approval email in French
- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email
- Fix: [ bug #857 ] Invoice created from shipment does not have the order discount
***** ChangeLog for 3.3.1 compared to 3.3 *****

View File

@ -36,6 +36,7 @@ class Project extends CommonObject
public $table_element = 'projet'; //!< Name of table without prefix where object is stored
public $table_element_line = 'projet_task';
public $fk_element = 'fk_projet';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $id;
var $ref;
@ -52,6 +53,7 @@ class Project extends CommonObject
var $statuts_short;
var $statuts;
var $oldcopy;
/**
* Constructor

View File

@ -44,12 +44,6 @@ if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $acti
$mine = GETPOST('mode')=='mine' ? 1 : 0;
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
// Security check
$socid=0;
if ($user->societe_id > 0) $socid=$user->societe_id;
$result = restrictedArea($user, 'projet', $id);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('projectcard'));
@ -61,6 +55,11 @@ if ($object->id > 0)
$object->fetch_thirdparty();
}
// Security check
$socid=0;
if ($user->societe_id > 0) $socid=$user->societe_id;
$result = restrictedArea($user, 'projet', $object->id);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
@ -137,7 +136,7 @@ if ($action == 'add' && $user->rights->projet->creer)
$object->datec=dol_now();
$object->date_start=$date_start;
$object->date_end=$date_end;
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
@ -209,7 +208,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
$object->public = GETPOST('public','alpha');
$object->date_start = empty($_POST["project"])?'':$date_start;
$object->date_end = empty($_POST["projectend"])?'':$date_end;
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
@ -560,7 +559,7 @@ else
{
print $object->showOptionals($extrafields,'edit');
}
print '</table>';
print '<div align="center"><br>';
@ -741,10 +740,13 @@ else
print '</td><td valign="top" width="50%">';
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'project',$socid);
if (!empty($object->id))
{
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'project',$socid);
}
print '</td></tr></table>';
}