New: Can create manually order from proposal

This commit is contained in:
Laurent Destailleur 2011-03-02 10:38:32 +00:00
parent fdcf07035f
commit 22b24049e9
3 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,7 @@ For users:
- New: task #10577: Use a numbering module for shipment and contract
- New: Add a first workflow module to create automatic action on some
events (create order on proposal closing).
- New: Can create manually order from proposal.
- Fix: Better Postgresql compatibility.
For developers:

View File

@ -1494,7 +1494,7 @@ if ($id > 0 || ! empty($ref))
{
if ($user->rights->commande->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateOrder").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddOrder").'</a>';
}
}
@ -1503,7 +1503,7 @@ if ($id > 0 || ! empty($ref))
{
if ($user->rights->facture->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("BuildBill").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddBill").'</a>';
}
$arraypropal=$object->getInvoiceArrayList();

View File

@ -1368,14 +1368,14 @@ class CommonObject
{
$element = $subelement = $objecttype;
$tplpath = $element;
if (preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs))
{
$element = $regs[1];
$subelement = $regs[2];
$tplpath = $element.'/'.$subelement;
}
$classpath = $element.'/class';
if ($element == 'facture') { $tplpath = 'compta/'.$element; $classpath = $tplpath.'/class'; } // To work with non standard path
if ($element == 'propal') { $tplpath = 'comm/'.$element; $classpath = $tplpath.'/class'; } // To work with non standard path