Merge remote-tracking branch 'upstream/3.8' into develop

This commit is contained in:
Juanjo Menent 2015-10-03 23:51:38 +02:00
commit 31230d296d
8 changed files with 34 additions and 40 deletions

View File

@ -351,7 +351,7 @@ For users:
Use accesskey on form search. Use accesskey on form search.
- New: Intervention documents are now available in ECM module. - New: Intervention documents are now available in ECM module.
- New: Add attachments on user card + in ECM module. - New: Add attachments on user card + in ECM module.
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template. - New: Can add __PROJECT_REF__ and __THIRDPARTY_NAME__ into email topic or content template.
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module). - New: [ task #1204 ] add Numering contrat module free (like leopard in product module).
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice. - New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
- New: Enable supplier price log table. - New: Enable supplier price log table.

View File

@ -41,23 +41,21 @@ If you want to build/test package locally:
# Push/declare Dolibarr sources to Launchpad # Push/declare Dolibarr sources to Launchpad
#---------------------------------- #----------------------------------
- From Launchpad project (https://launchpad.net/dolibarr), register a series: - From Launchpad project (https://launchpad.net/dolibarr), register a series:
Call it 'trunk' or 'beta' or 'stable' Call it 'trunk' or 'stable'
Use branch (dev): Use branch (dev):
~eldy/dolibarr/develop https://launchpad.net/~eldy/dolibarr/develop
~eldy/dolibarr/beta https://launchpad.net/~eldy/dolibarr/stable
~eldy/dolibarr/stable
or or
Use URL pattern (beta or stable): Use URL pattern (stable):
For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
For beta: http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_x.y.*.tar.gz
- For Dev, you can also add link serie to GIT HEAD. - For Dev, you can also add link serie to GIT HEAD.
- For beta and stable, you can init from command line - For stable, you can init from command line
cd bzr/dolibarr-[beta|stable] cd bzr/dolibarr-stable
bzr init bzr init
bzr add bzr add
bzr commit -m "Init" bzr commit -m "Init"
bzr push lp:~yourlogin/dolibarr/[beta|stable] bzr push lp:~yourlogin/dolibarr/stable
- List of series are visible here: https://launchpad.net/dolibarr/+series - List of series are visible here: https://launchpad.net/dolibarr/+series
@ -65,19 +63,19 @@ If you want to build/test package locally:
#---------------------------------- #----------------------------------
# create local repository # create local repository
cd bzr cd bzr
bzr branch lp:~yourlogin/dolibarr/[develop|beta|stable] dolibarr-[dev|beta|stable] bzr branch lp:~yourlogin/dolibarr/[develop|stable] dolibarr-[dev|stable]
cd dolibarr-[dev|beta|stable] cd dolibarr-[dev|stable]
# Update # Update
bzr update bzr update
-- Update files here. Remove all and overwrite -- -- Update files here: Remove all (except .bzr dir) and overwrite --
bzr status bzr status
bzr add * bzr add *
bzr commit -m "Description of change" bzr commit -m "Upstream version x.y"
bzr push bzr push
# Init debian dir repository into launchpad (when repository for sources does not exist) # Init debian dir repository into launchpad (when repository for sources does not exist)
#---------------------------------- #----------------------------------
- Create debian directory and upload it onto bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable] - Create debian directory and upload it onto bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
cd bzr cd bzr
mkdir debian mkdir debian
cd debian cd debian
@ -85,25 +83,25 @@ If you want to build/test package locally:
bzr init bzr init
bzr add bzr add
bzr commit -m "Init control files" bzr commit -m "Init control files"
bzr push lp:~yourlogin/+junk/debian-[dev|beta|stable] (put here any branch name or just bzr push if into a known branch) bzr push lp:~yourlogin/+junk/debian-[dev|stable] (put here any branch name or just bzr push if into a known branch)
- or download it from launchpad bazaar: - or download it from launchpad bazaar:
cd bzr cd bzr
bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable] bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
# Get debian dir repository from launchpad (when repository for sources already exists) # Get debian dir repository from launchpad (when repository for sources already exists)
#---------------------------------- #----------------------------------
cd bzr cd bzr
bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable] bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
# To update debian dir into launchpad (when repository for sources already exists) # To update debian dir into launchpad (when repository for sources already exists)
#---------------------------------- #----------------------------------
cd bzr cd bzr
bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable] bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
cd debian-[dev|beta|stable] cd debian-[dev|stable]
bzr status bzr status
-- Update files here -- -- Update files here --
bzr commit -m "Description of change" bzr commit -m "Description of change"
bzr push lp:~yourlogin/+junk/debian-[dev|beta|stable] bzr push lp:~yourlogin/+junk/debian-[dev|stable]
# Define a recipe into launchpad (a rule to build packages into a PPA) # Define a recipe into launchpad (a rule to build packages into a PPA)
@ -115,10 +113,6 @@ If you want to build/test package locally:
# bzr-builder format 0.3 deb-version {debupstream}-0~{revno} # bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
lp:dolibarr lp:dolibarr
merge packaging lp:~yourlogin/+junk/debian-dev merge packaging lp:~yourlogin/+junk/debian-dev
For beta:
# bzr-builder format 0.3 deb-version {debupstream}-1~{revno}
lp:dolibarr/beta
merge packaging lp:~yourlogin/+junk/debian-beta
For stable: For stable:
# bzr-builder format 0.3 deb-version {debupstream}-2~{revno} # bzr-builder format 0.3 deb-version {debupstream}-2~{revno}
lp:dolibarr/stable lp:dolibarr/stable
@ -126,13 +120,12 @@ If you want to build/test package locally:
- Run command - Run command
cd bzr cd bzr
bzr dailydeb dolibarr.recipe working-dir bzr dailydeb dolibarr.recipe working-dir
This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|beta|stable] This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|stable]
- Test package sources - Test package sources
sudo pbuilder build <working-dir>/<project>_<version>.dsc sudo pbuilder build <working-dir>/<project>_<version>.dsc
List of recipes created List of recipes created
https://code.launchpad.net/~eldy/+recipe/dolibarr-dev https://code.launchpad.net/~eldy/+recipe/dolibarr-dev
https://code.launchpad.net/~eldy/+recipe/dolibarr-beta
https://code.launchpad.net/~eldy/+recipe/dolibarr-stable https://code.launchpad.net/~eldy/+recipe/dolibarr-stable
@ -147,9 +140,6 @@ https://code.launchpad.net/~eldy/+recipe/dolibarr-stable
For the development snapshot version: For the development snapshot version:
deb http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main deb http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main deb-src http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main
For the beta version:
deb http://ppa.launchpad.net/yourlogin/dolibarr-beta/ubuntu precise main
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-beta/ubuntu precise main
For the stable version: For the stable version:
deb http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main deb http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main deb-src http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main

View File

@ -1802,7 +1802,7 @@ if ($action == 'create')
// Tableau des substitutions // Tableau des substitutions
$formmail->substit['__ASKREF__'] = $object->ref; $formmail->substit['__ASKREF__'] = $object->ref;
$formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__SIGNATURE__'] = $user->signature;
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
$formmail->substit['__CONTACTCIVNAME__'] = ''; $formmail->substit['__CONTACTCIVNAME__'] = '';
$formmail->substit['__PERSONALIZED__'] = ''; $formmail->substit['__PERSONALIZED__'] = '';

View File

@ -2324,7 +2324,7 @@ if ($action == 'create')
$formmail->substit['__PROPREF__'] = $object->ref; $formmail->substit['__PROPREF__'] = $object->ref;
$formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__SIGNATURE__'] = $user->signature;
$formmail->substit['__REFCLIENT__'] = $object->ref_client; $formmail->substit['__REFCLIENT__'] = $object->ref_client;
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
$formmail->substit['__PERSONALIZED__'] = ''; $formmail->substit['__PERSONALIZED__'] = '';
$formmail->substit['__CONTACTCIVNAME__'] = ''; $formmail->substit['__CONTACTCIVNAME__'] = '';

View File

@ -1432,6 +1432,8 @@ if ($action == 'create' && $user->rights->commande->creer)
$form->selectInputReason($demand_reason_id, 'demand_reason_id', '', 1); $form->selectInputReason($demand_reason_id, 'demand_reason_id', '', 1);
print '</td></tr>'; print '</td></tr>';
// TODO How record was recorded OrderMode (llx_c_input_method)
// Project // Project
if (! empty($conf->projet->enabled) && $socid > 0) if (! empty($conf->projet->enabled) && $socid > 0)
{ {
@ -1973,7 +1975,7 @@ if ($action == 'create' && $user->rights->commande->creer)
} }
print '</td></tr>'; print '</td></tr>';
// Source // Origin
print '<tr><td height="10">'; print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Source'); print $langs->trans('Source');
@ -1993,6 +1995,8 @@ if ($action == 'create' && $user->rights->commande->creer)
// print '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=22&origin=order&originid='.$object->id.'">'.$langs->trans("DictionarySource").'</a>'; // print '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=22&origin=order&originid='.$object->id.'">'.$langs->trans("DictionarySource").'</a>';
print '</td></tr>'; print '</td></tr>';
// TODO How record was recorded OrderMode (llx_c_input_method)
// Project // Project
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled))
{ {
@ -2410,7 +2414,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$formmail->substit ['__ORDERREF__'] = $object->ref; $formmail->substit ['__ORDERREF__'] = $object->ref;
$formmail->substit ['__SIGNATURE__'] = $user->signature; $formmail->substit ['__SIGNATURE__'] = $user->signature;
$formmail->substit ['__REFCLIENT__'] = $object->ref_client; $formmail->substit ['__REFCLIENT__'] = $object->ref_client;
$formmail->substit ['__THIRPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit ['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
$formmail->substit ['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit ['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
$formmail->substit ['__PERSONALIZED__'] = ''; $formmail->substit ['__PERSONALIZED__'] = '';
$formmail->substit ['__CONTACTCIVNAME__'] = ''; $formmail->substit ['__CONTACTCIVNAME__'] = '';

View File

@ -3840,7 +3840,7 @@ else if ($id > 0 || ! empty($ref))
$formmail->substit['__FACREF__'] = $object->ref; $formmail->substit['__FACREF__'] = $object->ref;
$formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__SIGNATURE__'] = $user->signature;
$formmail->substit['__REFCLIENT__'] = $object->ref_client; $formmail->substit['__REFCLIENT__'] = $object->ref_client;
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
$formmail->substit['__PROJECT_NAME__'] = (is_object($object->projet)?$object->projet->title:''); $formmail->substit['__PROJECT_NAME__'] = (is_object($object->projet)?$object->projet->title:'');
$formmail->substit['__PERSONALIZED__'] = ''; $formmail->substit['__PERSONALIZED__'] = '';

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
@ -991,8 +991,8 @@ class FactureFournisseur extends CommonInvoice
$oldref = dol_sanitizeFileName($this->ref); $oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num); $newref = dol_sanitizeFileName($num);
$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoive_supplier').$oldref; $dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoice_supplier').$oldref;
$dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoive_supplier').$newref; $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoice_supplier').$newref;
if (file_exists($dirsource)) if (file_exists($dirsource))
{ {
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
@ -1001,7 +1001,7 @@ class FactureFournisseur extends CommonInvoice
{ {
dol_syslog("Rename ok"); dol_syslog("Rename ok");
// Rename docs starting with $oldref with $newref // Rename docs starting with $oldref with $newref
$listoffiles=dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoive_supplier').$newref, 'files', 1, '^'.preg_quote($oldref,'/')); $listoffiles=dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoice_supplier').$newref, 'files', 1, '^'.preg_quote($oldref,'/'));
foreach($listoffiles as $fileentry) foreach($listoffiles as $fileentry)
{ {
$dirsource=$fileentry['name']; $dirsource=$fileentry['name'];

View File

@ -2333,7 +2333,7 @@ elseif (! empty($object->id))
// Tableau des substitutions // Tableau des substitutions
$formmail->substit['__ORDERREF__']=$object->ref; $formmail->substit['__ORDERREF__']=$object->ref;
$formmail->substit['__ORDERSUPPLIERREF__']=$object->ref_supplier; $formmail->substit['__ORDERSUPPLIERREF__']=$object->ref_supplier;
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
$formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__PERSONALIZED__']=''; $formmail->substit['__PERSONALIZED__']='';