@@ -4,6 +4,7 @@
|
||||
"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0
|
||||
"access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0
|
||||
"access_account_tax","account.tax","model_account_tax","account.group_account_user",1,0,0,0
|
||||
"access_account_tax_internal_user","account.tax internal user","model_account_tax","base.group_user",1,0,0,0
|
||||
"access_account_account","account.account","model_account_account","account.group_account_user",1,0,0,0
|
||||
"access_account_account_user","account.account user","model_account_account","base.group_user",1,0,0,0
|
||||
"access_account_account_partner_manager","account.account partner manager","model_account_account","base.group_partner_manager",1,0,0,0
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_meeting">
|
||||
<field name="name">Case Meeting</field>
|
||||
<field name="name">Meeting</field>
|
||||
<field name="object">crm.meeting</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
@@ -1,103 +1,105 @@
|
||||
<?php
|
||||
include("xmlrpc.inc");
|
||||
|
||||
$user = "";
|
||||
$password = "";
|
||||
$db = "";
|
||||
$serverUri = "";
|
||||
|
||||
$client = new xmlrpc_client($serverUri.'common');
|
||||
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($user, "string"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
include("xmlrpc.inc");
|
||||
|
||||
//Change to fit your configuration
|
||||
$user = "admin";
|
||||
$password = "a";
|
||||
$db = "db_1";
|
||||
$serverUri = "http://localhost:8069/xmlrpc/";
|
||||
|
||||
|
||||
$client = new xmlrpc_client($serverUri.'common');
|
||||
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($user, "string"));
|
||||
$msg->addParam(new xmlrpcval($password, "string"));
|
||||
|
||||
|
||||
$res = &$client->send($msg);
|
||||
$res = &$client->send($msg);
|
||||
|
||||
if(!$res->faultCode()){
|
||||
|
||||
$id = $res->value()->scalarval();
|
||||
if(!$res->faultCode()){
|
||||
|
||||
$id = $res->value()->scalarval();
|
||||
|
||||
$client = new xmlrpc_client($serverUri.'object');
|
||||
$client = new xmlrpc_client($serverUri.'object');
|
||||
|
||||
$key = array(new xmlrpcval(array(new xmlrpcval("id", "string"),
|
||||
new xmlrpcval(">", "string"),
|
||||
new xmlrpcval(0, "int")),"array"),);
|
||||
|
||||
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("res.country","string"));
|
||||
$msg->addParam(new xmlrpcval("search", "string"));
|
||||
$msg->addParam(new xmlrpcval($key, "array"));
|
||||
$msg->addParam(new xmlrpcval(0, "int"));
|
||||
$msg->addParam(new xmlrpcval(0, "int"));
|
||||
$msg->addParam(new xmlrpcval("id ASC", "string"));
|
||||
|
||||
$res = &$client->send($msg);
|
||||
$key = array(new xmlrpcval(array(new xmlrpcval("id", "string"),
|
||||
new xmlrpcval(">", "string"),
|
||||
new xmlrpcval(0, "int")),"array"),);
|
||||
|
||||
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($password, "string"));
|
||||
$msg->addParam(new xmlrpcval("res.country","string"));
|
||||
$msg->addParam(new xmlrpcval("search", "string"));
|
||||
$msg->addParam(new xmlrpcval($key, "array"));
|
||||
$msg->addParam(new xmlrpcval(0, "int"));
|
||||
$msg->addParam(new xmlrpcval(0, "int"));
|
||||
$msg->addParam(new xmlrpcval("id ASC", "string"));
|
||||
|
||||
$res = &$client->send($msg);
|
||||
|
||||
if(!$res->faultCode())
|
||||
{
|
||||
$val = $res->value()->scalarval();
|
||||
|
||||
$ides = array();
|
||||
|
||||
for ($i=0 ; $i<count($val); $i++)
|
||||
{
|
||||
array_push($ides, new xmlrpcval($val[$i]->scalarval(), "int"));
|
||||
}
|
||||
|
||||
$client = new xmlrpc_client($serverUri.'object');
|
||||
|
||||
$fields = array(new xmlrpcval("code", "string"), new xmlrpcval("name", "string"));
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("res.country","string"));
|
||||
$msg->addParam(new xmlrpcval("read", "string"));
|
||||
$msg->addParam(new xmlrpcval($ides, "array"));
|
||||
$msg->addParam(new xmlrpcval($fields, "array"));
|
||||
if(!$res->faultCode())
|
||||
{
|
||||
$val = $res->value()->scalarval();
|
||||
|
||||
$ides = array();
|
||||
|
||||
for ($i=0 ; $i<count($val); $i++)
|
||||
{
|
||||
array_push($ides, new xmlrpcval($val[$i]->scalarval(), "int"));
|
||||
}
|
||||
|
||||
$client = new xmlrpc_client($serverUri.'object');
|
||||
|
||||
$fields = array(new xmlrpcval("code", "string"), new xmlrpcval("name", "string"));
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($password, "string"));
|
||||
$msg->addParam(new xmlrpcval("res.country","string"));
|
||||
$msg->addParam(new xmlrpcval("read", "string"));
|
||||
$msg->addParam(new xmlrpcval($ides, "array"));
|
||||
$msg->addParam(new xmlrpcval($fields, "array"));
|
||||
|
||||
$res = &$client->send($msg);
|
||||
|
||||
if (!$res->faultCode())
|
||||
{
|
||||
$val = $res->value()->scalarval();
|
||||
|
||||
$select ='<select class="inputbox required" name="country" id="country" >
|
||||
<option value="" selected="selected"> -- Select an Option -- </option>';
|
||||
$res = &$client->send($msg);
|
||||
|
||||
if (!$res->faultCode())
|
||||
{
|
||||
$val = $res->value()->scalarval();
|
||||
|
||||
$select ='<select class="inputbox required" name="country" id="country" >
|
||||
<option value="" selected="selected"> -- Select an Option -- </option>';
|
||||
|
||||
for ($i=0; $i<count($val);$i++)
|
||||
{
|
||||
$field = $val[$i]->scalarval();
|
||||
$select .= '<option value="'.$field['code']->scalarval().'">'.$field['name']->scalarval().'</option>';
|
||||
}
|
||||
|
||||
$select .= '</select>';
|
||||
|
||||
echo $select;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Country not getting";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Country list id empty";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "connection not establish";
|
||||
}
|
||||
|
||||
for ($i=0; $i<count($val);$i++)
|
||||
{
|
||||
$field = $val[$i]->scalarval();
|
||||
$select .= '<option value="'.$field['code']->scalarval().'">'.$field['name']->scalarval().'</option>';
|
||||
}
|
||||
|
||||
$select .= '</select>';
|
||||
|
||||
echo $select;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Country not getting";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Country list id empty";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "connection not establish";
|
||||
}
|
||||
|
||||
exit;
|
||||
?>
|
||||
|
||||
+141
-187
@@ -1,201 +1,155 @@
|
||||
<?php
|
||||
|
||||
include("xmlrpc.inc");
|
||||
include("xmlrpc.inc");
|
||||
|
||||
class Contact
|
||||
{
|
||||
private $subject = '', $to = '';
|
||||
|
||||
function __construct($to, $sub)
|
||||
{
|
||||
$this->to = $to;
|
||||
$this->subject = $sub;
|
||||
}
|
||||
|
||||
function mailTo($post)
|
||||
{
|
||||
if (!empty($post))
|
||||
{
|
||||
|
||||
if (empty($this->to))
|
||||
{
|
||||
$this->to = 'sales@tinyerp.com';
|
||||
}
|
||||
|
||||
if (empty($this->subject))
|
||||
{
|
||||
$this->subject = 'Contact form information';
|
||||
}
|
||||
private $subject = '', $to = '';
|
||||
|
||||
function __construct($to, $sub)
|
||||
{
|
||||
$this->to = $to;
|
||||
$this->subject = $sub;
|
||||
}
|
||||
|
||||
|
||||
$body = '<table width="90%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td width="25%"></td>
|
||||
<td width="2%"></td>
|
||||
<td></td>
|
||||
</tr>';
|
||||
|
||||
foreach ($post as $key => $value)
|
||||
{
|
||||
$body .= "<tr>
|
||||
<td align='right'>$key</td>
|
||||
<td align='center'><b>:</b></td>
|
||||
<td align='left'>$value</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
$body .= '</table>';
|
||||
|
||||
$header = 'MEME-version : 1.0'."\r\n";
|
||||
$header .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
|
||||
$header .= 'From: '.$post['name'].' <'.$post['email'].'>'."\r\n";
|
||||
$header .= 'Reply-To: '.$post['name'].' <'.$post['email'].'>'."\r\n";
|
||||
$header .= 'Return-Path: '.$post['name'].' <'.$post['email'].'>'."\r\n";
|
||||
|
||||
if (mail($this->to, $this->subject, $body, $header))
|
||||
{
|
||||
echo "<br /><h3>Thank You, Your information has been successfully submitted.</h3><br /><p><b>We will be in touch very soon.</b></p>";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br /><h4>Sorry, Due to some problem Your information has not been submitted.</h4>";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function xmlCallTo($usr, $password, $database, $server, $post)
|
||||
{
|
||||
$user = $usr;
|
||||
$pass = $password;
|
||||
$db = $database;
|
||||
$server_url = $server; //'http://localhost:8069/xmlrpc/'
|
||||
|
||||
$client = new xmlrpc_client($server_url.'common');
|
||||
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($user, "string"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
function xmlCallTo($usr, $password, $database, $server, $post)
|
||||
{
|
||||
$user = $usr;
|
||||
$pass = $password;
|
||||
$db = $database;
|
||||
$server_url = $server; //'http://localhost:8069/xmlrpc/'
|
||||
|
||||
$client = new xmlrpc_client($server_url.'common');
|
||||
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($user, "string"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
|
||||
|
||||
$res = &$client->send($msg);
|
||||
|
||||
if(!$res->faultCode()){
|
||||
|
||||
$val = $res->value();
|
||||
$id = $val->scalarval();
|
||||
$res = &$client->send($msg);
|
||||
|
||||
if(!$res->faultCode()){
|
||||
|
||||
$val = $res->value();
|
||||
$id = $val->scalarval();
|
||||
|
||||
if (empty($id)){
|
||||
|
||||
echo "Connection error = ";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$client2 = new xmlrpc_client($server_url.'object');
|
||||
if (empty($id)){
|
||||
|
||||
echo "Connection error = ";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$client2 = new xmlrpc_client($server_url.'object');
|
||||
$key = array(new xmlrpcval(array(new xmlrpcval("code", "string"), new xmlrpcval("=", "string"), new xmlrpcval($post['country'], "string")),"array"),);
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("res.country","string"));
|
||||
$msg->addParam(new xmlrpcval("search", "string"));
|
||||
$msg->addParam(new xmlrpcval($key, "array"));
|
||||
$msg->addParam(new xmlrpcval(0, "int"));
|
||||
$msg->addParam(new xmlrpcval(1, "int"));
|
||||
|
||||
$res = &$client2->send($msg);
|
||||
|
||||
$val = $res->value()->scalarval();
|
||||
|
||||
$countryId = $val[0]->scalarval();
|
||||
|
||||
$val = array ("name" => new xmlrpcval($post['company'],"string"),
|
||||
"email_from" => new xmlrpcval($post['email'], "string"),
|
||||
"phone" => new xmlrpcval($post['phone'], "string"),
|
||||
"partner_name" => new xmlrpcval($post['name'], "string"),
|
||||
"function" => new xmlrpcval($post["jobtitle"], "string"),
|
||||
"zip" => new xmlrpcval($post['zip'], "string"),
|
||||
"stage_id" => new xmlrpcval(2, "int"),
|
||||
"city" => new xmlrpcval($post['city'], "string"),
|
||||
"country_id" => new xmlrpcval($countryId, "int"),
|
||||
"state" => new xmlrpcval("draft", "string"),
|
||||
"user_id" => new xmlrpcval(false, "boolean"),
|
||||
"description" => new xmlrpcval("No.of Employees: ".$post['employees']."\nState: ".$post['state']."\nIndustry: ".$post['industry']."\nAbout: ".$post['about'], "string")
|
||||
);
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("crm.lead", "string"));
|
||||
$msg->addParam(new xmlrpcval("create", "string"));
|
||||
$msg->addParam(new xmlrpcval($val, "struct"));
|
||||
|
||||
|
||||
$res2 = &$client2->send($msg);
|
||||
|
||||
if(!$res2->faultCode())
|
||||
{
|
||||
$readVal = $res2->value()->scalarval();
|
||||
|
||||
if (!empty($readVal))
|
||||
{
|
||||
$val = array ( "description" => new xmlrpcval("About: ".$post['about']),
|
||||
"model_id" => new xmlrpcval(276, "int"),
|
||||
"res_id" => new xmlrpcval($readVal,"int"),
|
||||
"email_from" => new xmlrpcval($post['email'], "string"),
|
||||
"email_to" => new xmlrpcval("sales@openerp.com", "string")
|
||||
);
|
||||
|
||||
$key = array(new xmlrpcval(array(new xmlrpcval("code", "string"), new xmlrpcval("=", "string"), new xmlrpcval($post['country'], "string")),"array"),);
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("res.country","string"));
|
||||
$msg->addParam(new xmlrpcval("search", "string"));
|
||||
$msg->addParam(new xmlrpcval($key, "array"));
|
||||
$msg->addParam(new xmlrpcval(0, "int"));
|
||||
$msg->addParam(new xmlrpcval(1, "int"));
|
||||
|
||||
$res = &$client2->send($msg);
|
||||
|
||||
$val = $res->value()->scalarval();
|
||||
|
||||
$countryId = $val[0]->scalarval();
|
||||
|
||||
$val = array ("name" => new xmlrpcval($post['company'],"string"),
|
||||
"title" => new xmlrpcval($post['salutation'], "string"),
|
||||
"email_from" => new xmlrpcval($post['email'], "string"),
|
||||
"phone" => new xmlrpcval($post['phone'], "string"),
|
||||
"partner_name" => new xmlrpcval($post['name'], "string"),
|
||||
"function" => new xmlrpcval($post["jobtitle"], "string"),
|
||||
"zip" => new xmlrpcval($post['zip'], "string"),
|
||||
"stage_id" => new xmlrpcval(6, "int"),
|
||||
"city" => new xmlrpcval($post['city'], "string"),
|
||||
"country_id" => new xmlrpcval($countryId, "int"),
|
||||
"state" => new xmlrpcval("draft", "string"),
|
||||
"user_id" => new xmlrpcval(false, "boolean"),
|
||||
"description" => new xmlrpcval("No.of Employees: ".$post['employees']."\nState: ".$post['state']."\nIndustry: ".$post['industry']."\nReasons: ".$post['reasons']."\nAbout: ".$post['about']."\nQuestions: ".stripslashes($post['questions'])."\nUpdate: ".$post['update'], "string")
|
||||
);
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("crm.lead", "string"));
|
||||
$msg->addParam(new xmlrpcval("create", "string"));
|
||||
$msg->addParam(new xmlrpcval($val, "struct"));
|
||||
|
||||
|
||||
$res2 = &$client2->send($msg);
|
||||
|
||||
if(!$res2->faultCode())
|
||||
{
|
||||
$readVal = $res2->value()->scalarval();
|
||||
|
||||
if (!empty($readVal))
|
||||
{
|
||||
$val = array ( "description" => new xmlrpcval("About: ".$post['about']."\nQuestions: ".$post['questions']),
|
||||
"model_id" => new xmlrpcval(276, "int"),
|
||||
"res_id" => new xmlrpcval($readVal,"int"),
|
||||
"email_from" => new xmlrpcval($post['email'], "string"),
|
||||
"email_to" => new xmlrpcval("sales@openerp.com", "string")
|
||||
);
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("crm.case.history", "string"));
|
||||
$msg->addParam(new xmlrpcval("create", "string"));
|
||||
$msg->addParam(new xmlrpcval($val, "struct"));
|
||||
|
||||
$res2 = &$client2->send($msg);
|
||||
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval($db, "string"));
|
||||
$msg->addParam(new xmlrpcval($id, "int"));
|
||||
$msg->addParam(new xmlrpcval($pass, "string"));
|
||||
$msg->addParam(new xmlrpcval("crm.case.history", "string"));
|
||||
$msg->addParam(new xmlrpcval("create", "string"));
|
||||
$msg->addParam(new xmlrpcval($val, "struct"));
|
||||
|
||||
$res2 = &$client2->send($msg);
|
||||
|
||||
//echo "<br />Successfully created lead";
|
||||
echo "<br /><h3>Thank You for your interest in openerp, we'll respond to your request shortly.</h3><br />";
|
||||
if(strstr($post["about"],"Book")) {
|
||||
echo '<script>window.location="http://www.openerp.com/index.php?option=com_content&id=54"</script>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br />Lead is not created";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br />Problem in message sending for create lead";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br />Connection not established";
|
||||
}
|
||||
}
|
||||
//echo "<br />Successfully created lead";
|
||||
echo "<br /><h3>Thank You for your interest in openerp, we'll respond to your request shortly.</h3><br />";
|
||||
if(strstr($post["about"],"Book")) {
|
||||
echo '<script>window.location="http://www.openerp.com/index.php?option=com_content&id=54"</script>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br />Lead is not created";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br />Problem in message sending for create lead";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br />Connection not established";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$arrData = array();
|
||||
$arrData = array_merge($arrData, (array)$_POST);
|
||||
|
||||
$cnt = new Contact('sales5@openerp.com', 'Country: '.$arrData['country']. ' About: ' .$arrData['about']);
|
||||
|
||||
/* This function use for sending mail on perticular mail account */
|
||||
/*$cnt->mailTo($arrData); */
|
||||
|
||||
/* This function use ceating lead in crm of opener erp database */
|
||||
$cnt->xmlCallTo('<username>', '<password>', '<db>', '<server>', $arrData);
|
||||
|
||||
exit;
|
||||
if(isset($_POST['country']) && $_POST['country'] != '') {
|
||||
$arrData = array();
|
||||
$arrData = array_merge($arrData, (array)$_POST);
|
||||
|
||||
$cnt = new Contact('sales5@openerp.com', 'Country: '.$arrData['country']. ' About: ' .$arrData['about']);
|
||||
|
||||
/* This function use for sending mail on perticular mail account */
|
||||
/*$cnt->mailTo($arrData); */
|
||||
|
||||
/* This function use ceating lead in crm of opener erp database */
|
||||
//Change to fit your configuration
|
||||
$cnt->xmlCallTo('admin', 'a', 'db_1', 'http://localhost:8069/xmlrpc/', $arrData);
|
||||
}
|
||||
else {
|
||||
echo 'please fill the form at <a href="form.php">form.php</a>';
|
||||
}
|
||||
|
||||
exit;
|
||||
?>
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Contact form</title>
|
||||
</head>
|
||||
<body>
|
||||
<h4>Contact Form</h4>
|
||||
<form method="post" action="crmlead.php">
|
||||
<label for="firstname">Firstname</label>
|
||||
<input type="text" name="name" value="" id="firstname" class="required text" title="Please, fill in your firstname" data-required="true"><br />
|
||||
<label for="company">Company</label>
|
||||
<input type="text" name="company" value="" id="company" class="required text" title="Please, fill in your company name" data-required="true"><br />
|
||||
<label for="jobtitle">Jobtitle</label>
|
||||
<input type="text" name="jobtitle" value="" id="jobtitle" class="required text" title="Please, fill in your job title" data-required="true"><br />
|
||||
<label for="email">Email</label>
|
||||
<input type="text" name="email" value="" id="email" class="required email text" title="Please, enter a valid email address" data-required="true"><br />
|
||||
<label for="phone">Phone</label>
|
||||
<input type="text" name="phone" value="" id="phone" class="required phone text" title="Please use international format (eg: +32...)" data-required="true">
|
||||
|
||||
<label for="city">City</label>
|
||||
<input type="text" name="city" value="" id="city" class="required text" title="Please, fill in your city" data-required="true"><br />
|
||||
<label for="zip">Zipcode</label>
|
||||
<td><input type="text" name="zip" value="" id="zip" class="required text" title="Please, fill in your zipcode" data-required="true"><br />
|
||||
<label for="state">State</label><input type="text" name="state" value="" id="state" class="text" title="Please, fill in your state"> <br />
|
||||
<label> Country : <?php include('countrylist.php'); ?></label> <br />
|
||||
<label for="employees">No.of employees</label>
|
||||
|
||||
<select class="required" name="employees" title="Please, select the No. of employees" data-required="true">
|
||||
<option value=""> -- select an option -- </option>
|
||||
<option value="1-5">1-5</option>
|
||||
<option value="5-10">5-10</option>
|
||||
<option value="10-20">10-20</option>
|
||||
|
||||
<option value="20-100">20-100</option>
|
||||
<option value="100-500">100-500</option>
|
||||
<option value="500+">500+</option>
|
||||
</select><br />
|
||||
|
||||
<label for="industry">Industry expertise</label>
|
||||
<select class="required select" name="industry" title="Please, select an industry" data-required="true">
|
||||
<option value=""> -- select an option -- </option>
|
||||
<option value="auction">Auction Houses</option>
|
||||
<option value="bank">Bank</option>
|
||||
<option value="distribution">Distribution</option>
|
||||
<option value="education">Education</option>
|
||||
|
||||
<option value="entertainment">Entertainment</option>
|
||||
<option value="erp_integrator">ERP Integrator</option>
|
||||
<option value="food_industries">Food industries</option>
|
||||
<option value="hotels_restaurants">Hotels & restaurants</option>
|
||||
<option value="insurance">Insurance</option>
|
||||
<option value="manufacturing">Manufacturing</option>
|
||||
<option value="non_profit">Non-Profit</option>
|
||||
<option value="public">Public</option>
|
||||
|
||||
<option value="services">Services</option>
|
||||
<option value="telecommunication">Telecommunication</option>
|
||||
<option value="others">Others</option>
|
||||
</select><br />
|
||||
<p>
|
||||
<label> About : <textarea name="about"></textarea></textarea></label>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Send"/> <input type="reset" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
id="menu_mrp_configuration"
|
||||
name="Configuration"
|
||||
parent="base.menu_mrp_root"
|
||||
groups="base.group_extended"
|
||||
groups="group_mrp_manager"
|
||||
sequence="50" />
|
||||
|
||||
<record id="mrp_property_tree_view" model="ir.ui.view">
|
||||
@@ -664,7 +664,7 @@
|
||||
|
||||
<field colspan="2" name="move_created_ids2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
|
||||
widget="one2many_list" mode="tree,form" height="275">
|
||||
<tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products" editable="bottom">
|
||||
<tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" readonly="1" string="Qty"/>
|
||||
<field name="product_uom" readonly="1" string="UOM" widget="selection"/>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
"access_mrp_bom","mrp.bom","model_mrp_bom","group_mrp_user",1,1,1,0
|
||||
"access_mrp_bom_revision","mrp.bom.revision","model_mrp_bom_revision","group_mrp_user",1,0,0,0
|
||||
"access_mrp_production","mrp.production user","model_mrp_production","mrp.group_mrp_user",1,1,1,1
|
||||
"access_mrp_production_salesman","mrp.production salesman","model_mrp_production","base.group_sale_salesman",1,1,1,0
|
||||
"access_mrp_production_product_line_salesman","mrp.production.product.line salesman","model_mrp_production_product_line","base.group_sale_salesman",1,0,1,0
|
||||
"access_mrp_production_workcenter_line_salesman","mrp.production.workcenter.line salesman","model_mrp_production_workcenter_line","base.group_sale_salesman",1,0,1,0
|
||||
"access_mrp_property_group","mrp.property.group","procurement.model_mrp_property_group","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_mrp_property","mrp.property","procurement.model_mrp_property","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_mrp_production_product_line","mrp.production.product.line","model_mrp_production_product_line","mrp.group_mrp_user",1,1,1,1
|
||||
@@ -12,7 +15,7 @@
|
||||
"access_mrp_workcenter_manager","mrp.workcenter.manager","model_mrp_workcenter","mrp.group_mrp_manager",1,0,0,0
|
||||
"access_mrp_routing_manager","mrp.routing.manager","model_mrp_routing","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_mrp_routing_workcenter_manager","mrp.routing.workcenter.manager","model_mrp_routing_workcenter","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_mrp_bom_manager","mrp.bom.manager","model_mrp_bom","mrp.group_mrp_manager",1,0,0,1
|
||||
"access_mrp_bom_manager","mrp.bom.manager","model_mrp_bom","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_mrp_bom_revision_manager","mrp.bom.revision.manager","model_mrp_bom_revision","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_stock_location_mrp_worker","stock.location mrp_worker","stock.model_stock_location","mrp.group_mrp_user",1,0,0,0
|
||||
"access_stock_move_mrp_worker","stock.move mrp_worker","stock.model_stock_move","mrp.group_mrp_user",1,1,1,0
|
||||
@@ -32,8 +35,8 @@
|
||||
"access_product_product_manager","product.product manager","model_product_product","mrp.group_mrp_manager",1,0,0,0
|
||||
"access_ir_property_manager","ir.property manager","base.model_ir_property","mrp.group_mrp_manager",1,1,1,1
|
||||
"access_account_sequence_fiscalyear","account.sequence.fiscalyear","account.model_account_sequence_fiscalyear","mrp.group_mrp_user",1,1,1,1
|
||||
"access_product_product_user","product.product user","model_product_product","mrp.group_mrp_user",1,1,1,1
|
||||
"access_product_template_user","product.template user","product.model_product_template","mrp.group_mrp_user",1,1,1,1
|
||||
"access_product_product_user","product.product user","model_product_product","mrp.group_mrp_user",1,0,0,0
|
||||
"access_product_template_user","product.template user","product.model_product_template","mrp.group_mrp_user",1,0,0,0
|
||||
"access_product_uom_user","product.uom user","product.model_product_uom","mrp.group_mrp_user",1,1,1,1
|
||||
"access_product_supplierinfo_user","product.supplierinfo user","product.model_product_supplierinfo","mrp.group_mrp_user",1,1,1,1
|
||||
"access_res_partner_address","res.partner.address","base.model_res_partner_address","mrp.group_mrp_user",1,1,1,1
|
||||
|
||||
|
@@ -14,7 +14,7 @@ class SidebarTemplateEditor(openobject.templating.TemplateEditor):
|
||||
output.index(self.ADD_ATTACHMENT_BUTTON)) + 1
|
||||
output = output[:form_opener_insertion] + \
|
||||
'''<a href="#" id="add-pad" class="button-a"
|
||||
style="right: 36px;"
|
||||
style="float: right; line-height: 13px; margin-right: 3px;"
|
||||
>${_("Pad")}</a>\n''' + \
|
||||
output[form_opener_insertion:]
|
||||
return output
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
<menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
|
||||
<menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
|
||||
<menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
|
||||
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="5" groups="base.group_extended"/>
|
||||
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5" groups="base.group_extended"/>
|
||||
<menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="menu_stock_procurement" sequence="10"/>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"access_procurement","procurement.order","model_procurement_order","base.group_user",1,0,0,0
|
||||
"access_procurement_stock_manager","procurement.order stock.manager","model_procurement_order","stock.group_stock_manager",1,1,1,1
|
||||
"access_procurement_stock_user","procurement.order stock.user","model_procurement_order","stock.group_stock_user",1,1,1,1
|
||||
"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","stock.group_stock_user",1,1,1,1
|
||||
"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","stock.group_stock_user",1,0,0,0
|
||||
"access_stock_warehouse_orderpoint_system","stock.warehouse.orderpoint system","model_stock_warehouse_orderpoint","stock.group_stock_manager",1,1,1,1
|
||||
"access_mrp_property_group","mrp.property.group","model_mrp_property_group","stock.group_stock_manager",1,1,1,1
|
||||
"access_mrp_property","mrp.property","model_mrp_property","stock.group_stock_manager",1,1,1,1
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
"access_account_tax_purchase_user_manager","account.tax","account.model_account_tax","group_purchase_manager",1,0,0,0
|
||||
"access_product_product_purchase_user","product.product.purchase.user","product.model_product_product","group_purchase_user",1,0,0,0
|
||||
"access_product_product_purchase_manager","product.product.purchase.manager","product.model_product_product","group_purchase_manager",1,0,0,0
|
||||
"access_product_template_purchase_user","product.template purchase_user","product.model_product_template","group_purchase_user",1,1,1,1
|
||||
"access_product_template_purchase_user","product.template purchase_user","product.model_product_template","group_purchase_user",1,0,0,0
|
||||
"access_product_template_purchase_manager","product.template purchase_manager","product.model_product_template","group_purchase_manager",1,0,0,0
|
||||
"access_account_invoice_purchase","account_invoice purchase","account.model_account_invoice","group_purchase_user",1,1,1,1
|
||||
"access_account_invoice_line_purchase","account_invoice.line purchase","account.model_account_invoice_line","group_purchase_user",1,1,1,1
|
||||
|
||||
|
@@ -215,10 +215,10 @@
|
||||
<para style="terp_tblheader_General_Centre">[[ o.state <> 'draft' and removeParentNode('para') ]] Quotation Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Our Salesman </para>
|
||||
<para style="terp_tblheader_General_Centre">Salesman</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Payment Terms</para>
|
||||
<para style="terp_tblheader_General_Centre">Payment Term</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ class sale_order(osv.osv):
|
||||
},
|
||||
multi='sums', help="The total amount"),
|
||||
|
||||
'invoice_quantity': fields.selection([('order', 'Ordered Quantities'), ('procurement', 'Shipped Quantities')], 'Invoice on', help="The sale order will automatically create the invoice proposition (draft invoice). Ordered and delivered quantities may not be the same. You have to choose if you want your invoice based on ordered or shipped quantities. If the product is a service, shipped quantities means hours spent on the associated tasks.", required=True),
|
||||
'invoice_quantity': fields.selection([('order', 'Ordered Quantities'), ('procurement', 'Shipped Quantities')], 'Invoice on', help="The sale order will automatically create the invoice proposition (draft invoice). Ordered and delivered quantities may not be the same. You have to choose if you want your invoice based on ordered or shipped quantities. If the product is a service, shipped quantities means hours spent on the associated tasks.", required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'payment_term': fields.many2one('account.payment.term', 'Payment Term'),
|
||||
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position'),
|
||||
'company_id': fields.related('shop_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_sale_shop","sale.shop","model_sale_shop","base.group_user",1,1,0,0
|
||||
"access_sale_shop","sale.shop","model_sale_shop","base.group_user",1,0,0,0
|
||||
"access_sale_order","sale.order","model_sale_order","base.group_sale_salesman",1,1,1,0
|
||||
"access_sale_order_line","sale.order.line","model_sale_order_line","base.group_sale_salesman",1,1,1,1
|
||||
"access_account_invoice_tax_salesman","account_invoice_tax salesman","account.model_account_invoice_tax","base.group_sale_salesman",1,1,1,0
|
||||
@@ -33,7 +33,7 @@
|
||||
"access_account_fiscalyear_manager","account.fiscalyear.manager","account.model_account_fiscalyear","base.group_sale_manager",1,0,0,0
|
||||
"access_account_fiscalyear_user","account.fiscalyear.user","account.model_account_fiscalyear","base.group_sale_salesman",1,0,0,0
|
||||
"access_res_partner_address_user","res.partner.address.user","base.model_res_partner_address","base.group_sale_salesman",1,0,0,0
|
||||
"access_account_tax_user","account.tax.user","account.model_account_tax","base.group_sale_salesman",1,1,1,0
|
||||
"access_account_tax_user","account.tax.user","account.model_account_tax","base.group_sale_salesman",1,0,0,0
|
||||
"access_product_packaging_user","product.packaging.user","product.model_product_packaging","base.group_sale_salesman",1,1,1,0
|
||||
"access_ir_attachment_sales","ir.attachment.sales","base.model_ir_attachment","base.group_sale_salesman",1,1,1,0
|
||||
"access_ir_attachment_manager","ir.attachment.manager","base.model_ir_attachment","base.group_sale_manager",1,1,1,1
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"access_stock_warehouse_manager","stock.warehouse.manager","model_stock_warehouse","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_warehouse_user","stock.warehouse.user","model_stock_warehouse","base.group_user",1,0,0,0
|
||||
"access_stock_location_manager","stock.location.manager","model_stock_location","stock.group_stock_manager",1,0,0,0
|
||||
"access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,1,1,1
|
||||
"access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,0,0,0
|
||||
"access_stock_journal_user","stock.journal.user","model_stock_journal","base.group_user",1,0,0,0
|
||||
"access_stock_journal_manager","stock.journal.manager","model_stock_journal","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_tracking_user","stock.tracking user","model_stock_tracking","stock.group_stock_user",1,1,1,1
|
||||
@@ -29,7 +29,7 @@
|
||||
"access_report_stock_move_manager","report.stock.move manager","model_report_stock_move","stock.group_stock_manager",1,1,1,1
|
||||
"access_report_stock_inventory_user","report.stock.inventory user","model_report_stock_inventory","stock.group_stock_user",1,1,1,1
|
||||
"access_report_stock_inventory_manager","report.stock.inventory manager","model_report_stock_inventory","stock.group_stock_manager",1,1,1,1
|
||||
"access_product_product_stock_user","product_product_stock_user","product.model_product_product","stock.group_stock_user",1,1,1,1
|
||||
"access_product_template_stock_user","product.template stock user","product.model_product_template","stock.group_stock_user",1,1,1,1
|
||||
"access_product_product_stock_user","product_product_stock_user","product.model_product_product","stock.group_stock_user",1,0,0,0
|
||||
"access_product_template_stock_user","product.template stock user","product.model_product_template","stock.group_stock_user",1,0,0,0
|
||||
"access_product_product_stock_manager","product_product_stock_manager","product.model_product_product","stock.group_stock_manager",1,0,0,0
|
||||
"access_product_template_stock_manager","product.template stock manager","product.model_product_template","stock.group_stock_manager",1,0,0,0
|
||||
|
||||
|
@@ -606,7 +606,7 @@ class stock_picking(osv.osv):
|
||||
"Set a location if you produce at a fixed location. This can be a partner location " \
|
||||
"if you subcontract the manufacturing operations.", select=True),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Dest. Location',help="Location where the system will stock the finished products.", select=True),
|
||||
'move_type': fields.selection([('direct', 'Direct Delivery'), ('one', 'All at once')], 'Delivery Method', required=True, help="It specifies goods to be delivered all at once or by direct delivery"),
|
||||
'move_type': fields.selection([('direct', 'Partial Delivery'), ('one', 'All at once')], 'Delivery Method', required=True, help="It specifies goods to be delivered all at once or by direct delivery"),
|
||||
'state': fields.selection([
|
||||
('draft', 'Draft'),
|
||||
('auto', 'Waiting'),
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<button name="action_cancel_inventary" states="draft" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
|
||||
<button name="action_confirm" states="draft" string="Validate Inventory" type="object" icon="gtk-apply"/>
|
||||
<button name="action_done" states="confirm" string="Confirm Inventory" type="object" icon="gtk-jump-to"/>
|
||||
<button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
|
||||
<button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/>
|
||||
<button name="action_cancel" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -40,13 +40,13 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||
pick_types = list(set(map(lambda x: x.type, model_pool.browse(cr, uid, res_ids, context=context))))
|
||||
for type in pick_types:
|
||||
if type == 'out':
|
||||
value = acct_obj.search(cr, uid, [('type', 'in',('sale','sale_refund') )])
|
||||
value = acct_obj.search(cr, uid, [('type', 'in',('sale','purchase_refund') )])
|
||||
for jr_type in acct_obj.browse(cr, uid, value, context=context):
|
||||
t1 = jr_type.id,jr_type.name
|
||||
vals.append(t1)
|
||||
|
||||
elif type == 'in':
|
||||
value = acct_obj.search(cr, uid, [('type', 'in',('purchase','purchase_refund') )])
|
||||
value = acct_obj.search(cr, uid, [('type', 'in',('purchase','sale_refund') )])
|
||||
for jr_type in acct_obj.browse(cr, uid, value, context=context):
|
||||
t1 = jr_type.id,jr_type.name
|
||||
vals.append(t1)
|
||||
|
||||
@@ -82,7 +82,7 @@ class stock_return_picking(osv.osv_memory):
|
||||
return_history[m.id] = 0
|
||||
for rec in m.move_history_ids2:
|
||||
return_history[m.id] += (rec.product_qty * rec.product_uom.factor)
|
||||
if m.product_qty * m.product_uom.factor > return_history[m.id]:
|
||||
if m.product_qty * m.product_uom.factor >= return_history[m.id]:
|
||||
valid_lines += 1
|
||||
if 'return%s'%(m.id) not in self._columns:
|
||||
self._columns['return%s'%(m.id)] = fields.float(string=m.name, required=True)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
OpenERP, Open Source Management Solution
|
||||
Copyright © 2010 OpenERP SA (<http://openerp.com>).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public Lice
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -0,0 +1,20 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import publisher_warranty
|
||||
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
'name': 'Live Chat Support',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/Others',
|
||||
'description': "Enable live chat support for whom have a maintenance contract",
|
||||
'author': 'OpenERP s.a.',
|
||||
'website': 'http://openerp.com',
|
||||
'depends': ['base'],
|
||||
'update_xml': [],
|
||||
'installable': True,
|
||||
'active': True,
|
||||
'web': True,
|
||||
'certificate': '0013762192410413',
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv
|
||||
from tools import cache
|
||||
|
||||
class publisher_warranty_contract(osv.osv):
|
||||
_inherit = 'publisher_warranty.contract'
|
||||
|
||||
@cache(skiparg=3, timeout=300)
|
||||
def is_livechat_enable(self, cr, uid):
|
||||
domain = [('state', '=', 'valid'), ('kind', '=', 'support')]
|
||||
return self.search_count(cr, uid, domain) != 0
|
||||
|
||||
@cache(skiparg=3)
|
||||
def get_default_livechat_text(self, cr, uid):
|
||||
return '<a href="http://www.openerp.com/services/subscribe-onsite" target="_blank">OpenERP Publisher\'s Warranty</a>'
|
||||
|
||||
publisher_warranty_contract()
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
##############################################################################
|
||||
# This file is part of the "web-livechatinc-odoo" OpenERP module.
|
||||
# See LICENCE file at the root of the module folder.
|
||||
##############################################################################
|
||||
import editors
|
||||
@@ -0,0 +1,94 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import openobject.templating
|
||||
|
||||
class BaseTemplateEditor(openobject.templating.TemplateEditor):
|
||||
templates = ['/openobject/controllers/templates/base.mako']
|
||||
|
||||
def edit(self, template, template_text):
|
||||
output = super(BaseTemplateEditor, self).edit(template, template_text)
|
||||
|
||||
end_head = output.index('</head>')
|
||||
|
||||
output = output[:end_head] + """
|
||||
<link rel="stylesheet" type="text/css" href="/web_livechat/static/css/lc.css"/>
|
||||
<%
|
||||
if 'livechat' not in cp.session:
|
||||
cp.session['livechat'] = rpc.session.execute('object', 'execute', 'publisher_warranty.contract', 'is_livechat_enable')
|
||||
%>
|
||||
% if cp.session['livechat']:
|
||||
<script type="text/javascript">
|
||||
|
||||
(function() {
|
||||
var lc_params = '';
|
||||
var lc_lang = 'en';
|
||||
var lc_skill = '0';
|
||||
|
||||
var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
|
||||
var lc_src = ('https:' == document.location.protocol ? 'https://' : 'http://');
|
||||
lc_src += 'chat.livechatinc.net/licence/1035052/script.cgi?lang='+lc_lang+unescape('%26')+'groups='+lc_skill;
|
||||
lc_src += ((lc_params == '') ? '' : unescape('%26')+'params='+encodeURIComponent(encodeURIComponent(lc_params))); lc.src = lc_src;
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
% endif
|
||||
""" + output[end_head:]
|
||||
|
||||
return output
|
||||
|
||||
|
||||
class HeaderTemplateEditor(openobject.templating.TemplateEditor):
|
||||
templates = ['/openerp/controllers/templates/header.mako']
|
||||
|
||||
|
||||
def edit(self, template, template_text):
|
||||
output = super(HeaderTemplateEditor, self).edit(template, template_text)
|
||||
|
||||
PATTERN = '<div id="corner">'
|
||||
corner = output.index(PATTERN) + len(PATTERN)
|
||||
|
||||
|
||||
output = output[:corner] + """
|
||||
<p id="livechat_status" class="logout">
|
||||
${ rpc.session.execute('object', 'execute', 'publisher_warranty.contract', 'get_default_livechat_text') | n}
|
||||
</p>
|
||||
% if cp.session['livechat']:
|
||||
|
||||
<script type="text/javascript">
|
||||
var __lc_buttons = __lc_buttons || [];
|
||||
__lc_buttons.push({
|
||||
elementId: 'livechat_status',
|
||||
language: 'en',
|
||||
skill: '0',
|
||||
type: 'text',
|
||||
labels: {
|
||||
online: '<img src="/web_livechat/static/images/online.png"/>Need Help?',
|
||||
offline: '<img src="/web_livechat/static/images/offline.png"/>Leave us a message'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
% endif
|
||||
""" + output[corner:]
|
||||
return output
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#livechat_status a.online {
|
||||
text-shadow: 0 0 0.2em #9a0404, 0 0 0.2em #9a0404, 0 0 0.2em #9a0404, 0 0 0.2em #9a0404;
|
||||
}
|
||||
#livechat_status img {
|
||||
vertical-align: middle;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
Reference in New Issue
Block a user