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

This commit is contained in:
Juanjo Menent 2015-10-03 23:34:37 +02:00
commit 8f28e7cf1c
22 changed files with 168 additions and 138 deletions

View File

@ -344,7 +344,7 @@ For users:
Use accesskey on form search.
- New: Intervention documents are now available 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 #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
- 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
#----------------------------------
- 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):
~eldy/dolibarr/develop
~eldy/dolibarr/beta
~eldy/dolibarr/stable
https://launchpad.net/~eldy/dolibarr/develop
https://launchpad.net/~eldy/dolibarr/stable
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 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 beta and stable, you can init from command line
cd bzr/dolibarr-[beta|stable]
- For stable, you can init from command line
cd bzr/dolibarr-stable
bzr init
bzr add
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
@ -65,19 +63,19 @@ If you want to build/test package locally:
#----------------------------------
# create local repository
cd bzr
bzr branch lp:~yourlogin/dolibarr/[develop|beta|stable] dolibarr-[dev|beta|stable]
cd dolibarr-[dev|beta|stable]
bzr branch lp:~yourlogin/dolibarr/[develop|stable] dolibarr-[dev|stable]
cd dolibarr-[dev|stable]
# Update
bzr update
-- Update files here. Remove all and overwrite --
-- Update files here: Remove all (except .bzr dir) and overwrite --
bzr status
bzr add *
bzr commit -m "Description of change"
bzr commit -m "Upstream version x.y"
bzr push
# 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
mkdir debian
cd debian
@ -85,25 +83,25 @@ If you want to build/test package locally:
bzr init
bzr add
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:
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)
#----------------------------------
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)
#----------------------------------
cd bzr
bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable]
cd debian-[dev|beta|stable]
bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
cd debian-[dev|stable]
bzr status
-- Update files here --
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)
@ -115,10 +113,6 @@ If you want to build/test package locally:
# bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
lp:dolibarr
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:
# bzr-builder format 0.3 deb-version {debupstream}-2~{revno}
lp:dolibarr/stable
@ -126,13 +120,12 @@ If you want to build/test package locally:
- Run command
cd bzr
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
sudo pbuilder build <working-dir>/<project>_<version>.dsc
List of recipes created
https://code.launchpad.net/~eldy/+recipe/dolibarr-dev
https://code.launchpad.net/~eldy/+recipe/dolibarr-beta
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:
deb 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:
deb http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

File diff suppressed because one or more lines are too long

View File

@ -39,6 +39,8 @@ $showpass=GETPOST('showpass');
*/
$label=$db::LABEL;
$type=$db->type;
$help_url='EN:Restores|FR:Restaurations|ES:Restauraciones';
llxHeader('','',$help_url);
@ -91,7 +93,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
<fieldset id="exportoptions">
<legend><?php echo $langs->trans("ImportMethod"); ?></legend>
<?php
if ($label == 'MySQL')
if (in_array($type, array('mysql', 'mysqli')))
{
?>
<div class="formelementrow">
@ -100,7 +102,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
</div>
<?php
}
else if ($label == 'PostgreSQL')
else if (in_array($type, array('pgsql')))
{
?>
<div class="formelementrow">
@ -123,7 +125,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
<div id="div_container_sub_exportoptions">
<?php
if ($label == 'MySQL')
if (in_array($type, array('mysql', 'mysqli')))
{
?>
<fieldset id="mysql_options">
@ -157,7 +159,7 @@ if ($label == 'MySQL')
</fieldset>
<?php
}
else if ($label == 'PostgreSQL')
else if (in_array($type, array('pgsql')))
{
?>
<fieldset id="postgresql_options">

View File

@ -1800,7 +1800,7 @@ if ($action == 'create')
// Tableau des substitutions
$formmail->substit['__ASKREF__'] = $object->ref;
$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['__CONTACTCIVNAME__'] = '';
$formmail->substit['__PERSONALIZED__'] = '';

View File

@ -2367,7 +2367,7 @@ if ($action == 'create')
$formmail->substit['__PROPREF__'] = $object->ref;
$formmail->substit['__SIGNATURE__'] = $user->signature;
$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['__PERSONALIZED__'] = '';
$formmail->substit['__CONTACTCIVNAME__'] = '';

View File

@ -1427,6 +1427,8 @@ if ($action == 'create' && $user->rights->commande->creer)
$form->selectInputReason($demand_reason_id, 'demand_reason_id', '', 1);
print '</td></tr>';
// TODO How record was recorded OrderMode (llx_c_input_method)
// Project
if (! empty($conf->projet->enabled) && $socid > 0)
{
@ -1968,7 +1970,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}
print '</td></tr>';
// Source
// Origin
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Source');
@ -1988,6 +1990,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 '</td></tr>';
// TODO How record was recorded OrderMode (llx_c_input_method)
// Project
if (! empty($conf->projet->enabled))
{
@ -2405,7 +2409,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$formmail->substit ['__ORDERREF__'] = $object->ref;
$formmail->substit ['__SIGNATURE__'] = $user->signature;
$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 ['__PERSONALIZED__'] = '';
$formmail->substit ['__CONTACTCIVNAME__'] = '';

View File

@ -3857,7 +3857,7 @@ else if ($id > 0 || ! empty($ref))
$formmail->substit['__FACREF__'] = $object->ref;
$formmail->substit['__SIGNATURE__'] = $user->signature;
$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_NAME__'] = (is_object($object->projet)?$object->projet->title:'');
$formmail->substit['__PERSONALIZED__'] = '';

View File

@ -298,6 +298,7 @@ if (empty($reshook))
$object->zip = GETPOST("zipcode");
$object->town = GETPOST("town");
$object->state_id = GETPOST("state_id",'int');
$object->fk_departement = GETPOST("state_id",'int'); // For backward compatibility
$object->country_id = GETPOST("country_id",'int');
$object->email = GETPOST("email",'alpha');

View File

@ -537,7 +537,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
else
{
$var = false;
print '<tr '.$bc[$var].'><td colspan="4">'.$langs->trans("None").'</td></tr>';
print '<tr '.$bc[$var].'><td colspan="5">'.$langs->trans("None").'</td></tr>';
}
$db->free($result);
}

View File

@ -2330,7 +2330,7 @@ elseif (! empty($object->id))
// Tableau des substitutions
$formmail->substit['__ORDERREF__']=$object->ref;
$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['__SIGNATURE__']=$user->signature;
$formmail->substit['__PERSONALIZED__']='';

View File

@ -406,7 +406,7 @@ UniqueThirdParties=Total of unique third parties
InActivity=Open
ActivityCeased=Closed
ActivityStateFilter=Activity status
ProductsIntoElements=List of products into %s
ProductsIntoElements=List of products/services into %s
CurrentOutstandingBill=Current outstanding bill
OutstandingBill=Max. for outstanding bill
OutstandingBillReached=Reached max. for outstanding bill

View File

@ -1375,7 +1375,6 @@ class Societe extends CommonObject
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople";
$sql.= " WHERE fk_soc = " . $id;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
if (! $this->db->query($sql))
{
$error++;
@ -1388,7 +1387,6 @@ class Societe extends CommonObject
{
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
$sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
if (! $this->db->query($sql))
{
$error++;
@ -1402,7 +1400,18 @@ class Societe extends CommonObject
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib";
$sql.= " WHERE fk_soc = " . $id;
dol_syslog(get_class($this)."::Delete", LOG_DEBUG);
if (! $this->db->query($sql))
{
$error++;
$this->error = $this->db->lasterror();
}
}
// Remove societe_remise_except
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except";
$sql.= " WHERE fk_soc = " . $id;
if (! $this->db->query($sql))
{
$error++;
@ -1415,7 +1424,6 @@ class Societe extends CommonObject
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux";
$sql.= " WHERE fk_soc = " . $id;
dol_syslog(get_class($this)."::Delete", LOG_DEBUG);
if (! $this->db->query($sql))
{
$error++;

View File

@ -78,6 +78,7 @@ $langs->load("orders");
$langs->load("suppliers");
$langs->load("propal");
$langs->load("interventions");
$langs->load("contracts");
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('consumptionthirdparty'));
@ -149,7 +150,8 @@ if ($object->client)
if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal']=$langs->transnoentitiesnoconv('Proposals');
if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order']=$langs->transnoentitiesnoconv('Orders');
if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->transnoentitiesnoconv('Invoices');
if ($conf->ficheinter>enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter']=$langs->transnoentitiesnoconv('Interventions');
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter']=$langs->transnoentitiesnoconv('Interventions');
if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract']=$langs->transnoentitiesnoconv('Contracts');
}
if ($object->fournisseur)
@ -265,10 +267,24 @@ if ($type_element == 'supplier_order')
$doc_number='c.ref';
$thirdTypeSelect='supplier';
}
if ($type_element == 'contract')
{ // Supplier : Show products from orders.
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$documentstatic=new Contrat($db);
$documentstaticline=new ContratLigne($db);
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, ';
$tables_from = MAIN_DB_PREFIX."contrat as c,".MAIN_DB_PREFIX."contratdet as d";
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
$where.= " AND d.fk_contrat = c.rowid";
$dateprint = 'c.date_valid';
$doc_number='c.ref';
$thirdTypeSelect='customer';
}
$sql = $sql_select;
$sql.= ' d.description as description,';
if ($type_element != 'fichinter') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty,';
if ($type_element != 'fichinter' && $type_element != 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty,';
if ($type_element == 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty,';
if ($type_element != 'fichinter') $sql.= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type,';
$sql.= " s.rowid as socid ";
if ($type_element != 'fichinter') $sql.= ", p.ref as prod_ref, p.label as product_label";
@ -351,6 +367,8 @@ if ($sql_select)
$documentstatic->statut=$objp->status;
$documentstatic->status=$objp->status;
$documentstatic->paye=$objp->paid;
if (is_object($documentstaticline)) $documentstaticline->statut=$objp->status;
$var=!$var;
print "<tr ".$bc[$var].">";
@ -361,7 +379,14 @@ if ($sql_select)
// Status
print '<td align="center">';
print $documentstatic->getLibStatut(2);
if ($type_element == 'contract')
{
print $documentstaticline->getLibStatut(2);
}
else
{
print $documentstatic->getLibStatut(2);
}
print '</td>';
print '<td>';

View File

@ -49,7 +49,7 @@ $langs->load("commercial");
$langs->load("bills");
$langs->load("banks");
$langs->load("users");
if (! empty($conf->categories->enabled)) $langs->load("categories");
if (! empty($conf->categorie->enabled)) $langs->load("categories");
if (! empty($conf->incoterm->enabled)) $langs->load("incoterm");
if (! empty($conf->notification->enabled)) $langs->load("mails");