diff --git a/addons/account/account.py b/addons/account/account.py
index b01da6b1425..d145f0308b0 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -836,6 +836,8 @@ class account_journal(osv.osv):
@return: Returns a list of tupples containing id, name
"""
+ if not ids:
+ return []
if isinstance(ids, (int, long)):
ids = [ids]
result = self.browse(cr, user, ids, context=context)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index bbcb25fefa9..aff38d71cfe 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -1103,10 +1103,10 @@ class account_invoice(osv.osv):
if not ids:
return []
types = {
- 'out_invoice': 'CI: ',
- 'in_invoice': 'SI: ',
- 'out_refund': 'OR: ',
- 'in_refund': 'SR: ',
+ 'out_invoice': 'Invoice ',
+ 'in_invoice': 'Sup. Invoice ',
+ 'out_refund': 'Refund ',
+ 'in_refund': 'Supplier Refund ',
}
return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 480d5ec76a6..a2fbf11963b 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 18ab1a779a3..69b1bef08e6 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -215,8 +215,10 @@ class account_move_line(osv.osv):
def _default_get(self, cr, uid, fields, context=None):
if context is None:
context = {}
- if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
+ if not context.get('journal_id', False):
context['journal_id'] = context.get('search_default_journal_id')
+ if not context.get('period_id', False):
+ context['period_id'] = context.get('search_default_period_id')
account_obj = self.pool.get('account.account')
period_obj = self.pool.get('account.period')
journal_obj = self.pool.get('account.journal')
@@ -226,6 +228,9 @@ class account_move_line(osv.osv):
partner_obj = self.pool.get('res.partner')
currency_obj = self.pool.get('res.currency')
context = self.convert_to_period(cr, uid, context)
+ #pass the right context when search_defaul_journal_id
+ if context.get('search_default_journal_id',False):
+ context['journal_id'] = context.get('search_default_journal_id')
# Compute simple values
data = super(account_move_line, self).default_get(cr, uid, fields, context=context)
# Starts: Manual entry from account.move form
@@ -926,6 +931,8 @@ class account_move_line(osv.osv):
return res
if (not context.get('journal_id', False)) or (not context.get('period_id', False)):
return False
+ if context.get('search_default_journal_id', False):
+ context['journal_id'] = context.get('search_default_journal_id')
cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], ))
j = cr.fetchone()[0] or ''
cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], ))
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 20aa198c63f..874adb417d3 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -102,6 +102,7 @@
diff --git a/addons/document_page/static/src/js/document_page.js b/addons/document_page/static/src/js/document_page.js
deleted file mode 100644
index 836803bf700..00000000000
--- a/addons/document_page/static/src/js/document_page.js
+++ /dev/null
@@ -1,18 +0,0 @@
-openerp.document_page = function (openerp) {
- openerp.web.form.widgets.add('text_wiki', 'openerp.web.form.FieldTextWiki');
-
- openerp.web.form.FieldTextWiki = openerp.web.form.FieldText.extend({
- render_value: function() {
- var show_value = openerp.web.format_value(this.get('value'), this, '');
- if (!this.get("effective_readonly")) {
- this.$textarea.val(show_value);
- if (show_value && this.view.options.resize_textareas) {
- this.do_resize(this.view.options.resize_textareas);
- }
- } else {
- var wiki_value = wiky.process(show_value || '');
- this.$el.html(wiki_value);
- }
- },
- });
-};
diff --git a/addons/document_page/static/src/lib/wiky/Readme.md b/addons/document_page/static/src/lib/wiky/Readme.md
deleted file mode 100755
index 5d9bfe175a6..00000000000
--- a/addons/document_page/static/src/lib/wiky/Readme.md
+++ /dev/null
@@ -1,41 +0,0 @@
-Wiky.js - a javascript library to convert Wiki Markup language to HTML.
-=======================
-
-(It is buggy, please use with care)
-
-Wiky.js is a javascript library that converts Wiki Markup language to HTML.
-
-
-How to use it
--------------------
-Include wiki.js into your HTML file. Wiky.js has only one function, which is wiky.process(wikitext).
-
-Please see index.html for an example.
-
-*wiky.js does not depend on jQuery, which is included for testing purpose.
-
-
-
-Supported Syntax
--------------------
-* == Heading ==
-* === Subheading ===
-* [http://www.url.com Name of URLs]
-* [[File:http://www.url.com/image.png Alternative Text]]
-* -------------------- (Horizontal line)
-* : (Indentation)
-* # Ordered bullet point
-* * Unordered bullet point
-
-
-
-License
-------------------
-Creative Commons 3.0
-
-
-
-Contributors
--------------------
-Tanin Na Nakorn
-Tanun Niyomjit (Designer)
\ No newline at end of file
diff --git a/addons/document_page/static/src/lib/wiky/index.html b/addons/document_page/static/src/lib/wiky/index.html
deleted file mode 100755
index 97992354fd6..00000000000
--- a/addons/document_page/static/src/lib/wiky/index.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
- Untitled Document
-
-
-
- === Heading ===
-Some content
-I would like to add another line
-
-== Subheading ==
-Some more content
-Some more lines1
-:A line with indent
-:: A 2-indented line
-:: more
-:back to 1-indented line
-
-This is Taeyeon.
-[[File:http://www.oknation.net/blog/home/blog_data/12/2012/images/ty4.jpg Taeyeon]]
-Taeyeon is so cute.
-
-This is a link:[http://www.google.com Google].
-This is a bold link:'''[http://www.google.com Google]'''.
-This is a bold-italic link:'''''[http://www.google.com Google]'''''.
-This is '''bold''', '''''bold-italic''''', and ''italic''
-
-[[Video:http://www.youtube.com/embed/ovVfLancwys]]
-# First
-# secon
-## Second-First
-*** First Point
-*** Second Point
-#### z
-#### y
-#### x
-*** Third Point
-## Second-Second [ftp://www.facebook.com FacebookFTP]
-## Second-Third [http://www.google.com Google Here]
-# third
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/document_page/static/src/lib/wiky/input_complete b/addons/document_page/static/src/lib/wiky/input_complete
deleted file mode 100755
index c7e860cccf9..00000000000
--- a/addons/document_page/static/src/lib/wiky/input_complete
+++ /dev/null
@@ -1,35 +0,0 @@
-=== Heading ===
-Some content
-I would like to add another line
-
-== Subheading ==
-Some more content
-Some more lines1
-:A line with indent
-:: A 2-indented line
-:: more
-:back to 1-indented line
-
-This is Taeyeon.
-[[File:http://www.oknation.net/blog/home/blog_data/12/2012/images/ty4.jpg Taeyeon]]
-Taeyeon is so cute.
-
-This is a link:[http://www.google.com Google].
-This is a bold link:'''[http://www.google.com Google]'''.
-This is a bold-italic link:'''''[http://www.google.com Google]'''''.
-This is '''bold''', '''''bold-italic''''', and ''italic''
-
-
-# First
-# second
-## Second-First
-*** First Point
-*** Second Point
-#### z
-#### y
-#### x
-*** Third Point
-## Second-Second [ftp://www.facebook.com FacebookFTP]
-## Second-Third [http://www.google.com Google Here]
-# third
-
diff --git a/addons/document_page/static/src/lib/wiky/wiky.css b/addons/document_page/static/src/lib/wiky/wiky.css
deleted file mode 100755
index 0adc7896df0..00000000000
--- a/addons/document_page/static/src/lib/wiky/wiky.css
+++ /dev/null
@@ -1,79 +0,0 @@
-@charset "UTF-8";
-.wiky_preview_area {
- font-family: "Helvetica Neue", Arial, Helvetica, 'Liberation Sans', FreeSans, sans-serif;
- font-size: 13px;
- line-height: 1.5em;
- color: #666;
- font-weight:350;
- width:600px;
- display:block;
-}
-.wiky_preview_area h2{
- font-size:24px;
- color:#333;
- font-weight:400;
-
- text-shadow:0 1px 0 rgba(000, 000, 000, .4);
-}
-.wiky_preview_area h3{
- font-size:18px;
- color:#555;
- font-weight:400;
-
- text-shadow:0 1px 0 rgba(000, 000, 000, .4);
-}
-.wiky_preview_area img{
- background-repeat: repeat;
- width: 400px;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- -webkit-box-shadow:0 1px 3px rgba(0, 0, 0, .8);
- -moz-box-shadow:0 1px 3px rgba(0, 0, 0, .8);
- box-shadow:0 1px 3px rgba(0, 0, 0, .8);
-}
-.wiky_preview_area a{
- padding:5px;
- font-weight:400;
-
- background: #999; /* for non-css3 browsers */
-
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */
- background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
- background: -moz-linear-gradient(top, #ccc, #000); /* for firefox 3.6+ */
-
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-
- -webkit-box-shadow:none;
- -moz-box-shadow:none;
- box-shadow:none;
-
- text-shadow:0 1px 0 rgba(255, 255, 255, 1);
-}
-
-.wiky_preview_area a:hover{
- color:#333;
- padding:5px;
- font-weight:400;
- text-decoration:none;
-
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-
- -webkit-box-shadow:0 1px 3px rgba(0, 0, 0, .3);
- -moz-box-shadow:0 1px 3px rgba(0, 0, 0, .3);
- box-shadow:0 1px 3px rgba(0, 0, 0, .3);
-
- text-shadow:0 1px 0 rgba(255, 255, 255, 1);
-}
-
-
-.wiky_preview_area > ol,
-.wiky_preview_area > ul,
-.wiky_preview_area > ul > li,
-.wiky_preview_area > ol > li {
- list-style: disc inside none;
-}
\ No newline at end of file
diff --git a/addons/document_page/static/src/lib/wiky/wiky.js b/addons/document_page/static/src/lib/wiky/wiky.js
deleted file mode 100755
index 5bc9c6f167d..00000000000
--- a/addons/document_page/static/src/lib/wiky/wiky.js
+++ /dev/null
@@ -1,303 +0,0 @@
-/**
- * Wiky.js - Javascript library to converts Wiki MarkUp language to HTML.
- * You can do whatever with it. Please give me some credits (Apache License)
- * - Tanin Na Nakorn
- */
-
-var wiky = {};
-
-
-wiky.process = function(wikitext) {
- var lines = wikitext.split(/\r?\n/);
- var start;
- var html = "";
-
- for (var i=0;i"+line.substring(3,line.length-3)+"";
- }
- else if (line.match(/^==/)!=null && line.match(/==$/)!=null)
- {
- html += ""+line.substring(2,line.length-2)+" ";
- }
- else if (line.match(/^:+/)!=null)
- {
- // find start line and ending line
- start = i;
- while (i < lines.length && lines[i].match(/^:+/)!=null) i++;
- i--;
-
- html += wiky.process_indent(lines,start,i);
- }
- else if (line.match(/^----+(\s*)$/)!=null)
- {
- html += " ";
- }
- else if (line.match(/^(\*+) /)!=null)
- {
- // find start line and ending line
- start = i;
- while (i < lines.length && lines[i].match(/^(\*+|##+):? /)!=null) i++;
- i--;
-
- html += wiky.process_bullet_point(lines,start,i);
- }
- else if (line.match(/^(#+) /)!=null)
- {
- // find start line and ending line
- start = i;
- while (i < lines.length && lines[i].match(/^(#+|\*\*+):? /)!=null) i++;
- i--;
-
- html += wiky.process_bullet_point(lines,start,i);
- }
- else
- {
- html += wiky.process_normal(line);
- }
-
- html += " \n";
- }
-
- return html;
-};
-
-wiky.process_indent = function(lines,start,end) {
- var html = "";
-
- for(var i=start;i<=end;i++) {
-
- html += "";
-
- var this_count = lines[i].match(/^(:+)/)[1].length;
-
- html += wiky.process_normal(lines[i].substring(this_count));
-
- var nested_end = i;
- for (var j=i+1;j<=end;j++) {
- var nested_count = lines[j].match(/^(:+)/)[1].length;
- if (nested_count <= this_count) break;
- else nested_end = j;
- }
-
- if (nested_end > i) {
- html += wiky.process_indent(lines,i+1,nested_end);
- i = nested_end;
- }
-
- html += " ";
- }
-
- html += " ";
- return html;
-};
-
-wiky.process_bullet_point = function(lines,start,end) {
- var html = (lines[start].charAt(0)=='*')?"":"";
-
- for(var i=start;i<=end;i++) {
-
- html += "";
-
- var this_count = lines[i].match(/^(\*+|#+) /)[1].length;
-
- html += wiky.process_normal(lines[i].substring(this_count+1));
-
- // continue previous with #:
- {
- var nested_end = i;
- for (var j = i + 1; j <= end; j++) {
- var nested_count = lines[j].match(/^(\*+|#+):? /)[1].length;
-
- if (nested_count < this_count)
- break;
- else {
- if (lines[j].charAt(nested_count) == ':') {
- html += " " + wiky.process_normal(lines[j].substring(nested_count + 2));
- nested_end = j;
- } else {
- break;
- }
- }
-
- }
-
- i = nested_end;
- }
-
- // nested bullet point
- {
- var nested_end = i;
- for (var j = i + 1; j <= end; j++) {
- var nested_count = lines[j].match(/^(\*+|#+):? /)[1].length;
- if (nested_count <= this_count)
- break;
- else
- nested_end = j;
- }
-
- if (nested_end > i) {
- html += wiky.process_bullet_point(lines, i + 1, nested_end);
- i = nested_end;
- }
- }
-
- // continue previous with #:
- {
- var nested_end = i;
- for (var j = i + 1; j <= end; j++) {
- var nested_count = lines[j].match(/^(\*+|#+):? /)[1].length;
-
- if (nested_count < this_count)
- break;
- else {
- if (lines[j].charAt(nested_count) == ':') {
- html += wiky.process_normal(lines[j].substring(nested_count + 2));
- nested_end = j;
- } else {
- break;
- }
- }
-
- }
-
- i = nested_end;
- }
-
- html += " ";
- }
-
- html += (lines[start].charAt(0)=='*')?" ":"";
- return html;
-};
-
-wiky.process_url = function(txt) {
-
- var index = txt.indexOf(" ");
-
- if (index == -1)
- {
- return " ";
- }
- else
- {
- var url = txt.substring(0,index);
- var label = txt.substring(index+1);
- return ""+label+" ";
- }
-};
-
-wiky.process_image = function(txt) {
- var index = txt.indexOf(" ");
- var url = txt;
- var label = "";
-
- if (index > -1)
- {
- url = txt.substring(0,index);
- label = txt.substring(index+1);
- }
-
-
- return " ";
-};
-
-wiky.process_video = function(url) {
-
- if (url.match(/^(https?:\/\/)?(www.)?youtube.com\//) == null)
- {
- return ""+url+" is an invalid YouTube URL ";
- }
- var result;
- if ((result = url.match(/^(https?:\/\/)?(www.)?youtube.com\/watch\?(.*)v=([^&]+)/)) != null)
- {
- url = "http://www.youtube.com/embed/"+result[4];
- }
-
-
- return '';
-};
-
-wiky.process_normal = function(wikitext) {
-
- // Image
- {
- var index = wikitext.indexOf("[[File:");
- var end_index = wikitext.indexOf("]]", index + 7);
- while (index > -1 && end_index > -1) {
-
- wikitext = wikitext.substring(0,index)
- + wiky.process_image(wikitext.substring(index+7,end_index))
- + wikitext.substring(end_index+2);
-
- index = wikitext.indexOf("[[File:");
- end_index = wikitext.indexOf("]]", index + 7);
- }
- }
-
- // Video
- {
- var index = wikitext.indexOf("[[Video:");
- var end_index = wikitext.indexOf("]]", index + 8);
- while (index > -1 && end_index > -1) {
-
- wikitext = wikitext.substring(0,index)
- + wiky.process_video(wikitext.substring(index+8,end_index))
- + wikitext.substring(end_index+2);
-
- index = wikitext.indexOf("[[Video:");
- end_index = wikitext.indexOf("]]", index + 8);
- }
- }
-
-
- // URL
- var protocols = ["http","ftp","news"];
-
- for (var i=0;i -1 && end_index > -1) {
-
- wikitext = wikitext.substring(0,index)
- + wiky.process_url(wikitext.substring(index+1,end_index))
- + wikitext.substring(end_index+1);
-
- index = wikitext.indexOf("["+protocols[i]+"://",end_index+1);
- end_index = wikitext.indexOf("]", index + 1);
-
- }
- }
-
- var count_b = 0;
- var index = wikitext.indexOf("'''");
- while(index > -1) {
-
- if ((count_b%2)==0) wikitext = wikitext.replace(/'''/,"");
- else wikitext = wikitext.replace(/'''/," ");
-
- count_b++;
-
- index = wikitext.indexOf("'''",index);
- }
-
- var count_i = 0;
- var index = wikitext.indexOf("''");
- while(index > -1) {
-
- if ((count_i%2)==0) wikitext = wikitext.replace(/''/,"");
- else wikitext = wikitext.replace(/''/," ");
-
- count_i++;
-
- index = wikitext.indexOf("''",index);
- }
-
- wikitext = wikitext.replace(/<\/b><\/i>/g,"");
-
- return wikitext;
-};
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 90f967fb4b4..aac1f41574f 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -261,7 +261,6 @@ class hr_employee(osv.osv):
_defaults = {
'active': 1,
'image': _get_default_image,
- 'marital': 'single',
'color': 0,
}
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 00ed2afbef2..5d4c2ae9d45 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -180,7 +180,7 @@
Employees
hr.employee
form
- tree,form
+ form,tree
diff --git a/addons/hr/res_config_view.xml b/addons/hr/res_config_view.xml
index c42857e5f6b..7507665c96d 100644
--- a/addons/hr/res_config_view.xml
+++ b/addons/hr/res_config_view.xml
@@ -17,7 +17,7 @@
Payroll
ir.module.module
kanban,tree,form
-
+
diff --git a/addons/hr/static/src/css/hr.css b/addons/hr/static/src/css/hr.css
index eb0728c6f1c..00ef92c0fd8 100644
--- a/addons/hr/static/src/css/hr.css
+++ b/addons/hr/static/src/css/hr.css
@@ -1,5 +1,5 @@
.oe_employee_vignette {
- padding: 8px 0;
+ padding: 8px 8px;
min-height: 100px;
}
diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml
index 92ae2524921..6566f303d36 100644
--- a/addons/hr_contract/hr_contract_view.xml
+++ b/addons/hr_contract/hr_contract_view.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml
index 607cd017a85..01915de76a0 100644
--- a/addons/hr_evaluation/hr_evaluation_data.xml
+++ b/addons/hr_evaluation/hr_evaluation_data.xml
@@ -392,12 +392,6 @@ Once the form had been filled, the employee send it to his supervisor.
char
-
- Title
-
- char
-
-
1
1
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index 8744567c597..29d68d7a12c 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -239,7 +239,7 @@
Appraisal
hr_evaluation.evaluation
form
- tree,form,graph
+ tree,form
{"search_default_next_month":1}
diff --git a/addons/hr_evaluation/security/ir.model.access.csv b/addons/hr_evaluation/security/ir.model.access.csv
index f9b8897eb01..a304ee84c10 100644
--- a/addons/hr_evaluation/security/ir.model.access.csv
+++ b/addons/hr_evaluation/security/ir.model.access.csv
@@ -39,4 +39,4 @@ access_survey_response_hr_employee,survey.response.employee,survey.model_survey_
access_survey_question_column_heading_hr_employee,survey.question.column.heading.employee,survey.model_survey_question_column_heading,base.group_user,1,0,0,0
access_survey_response_line_hr_employee,survey.response.line.employee,survey.model_survey_response_line,base.group_user,1,1,1,0
access_survey_response_answer_hr_employee,survey.response.answer.hr.employee,survey.model_survey_response_answer,base.group_user,1,1,1,0
-
+access_survey_tbl_column_heading_hr_employee,survey.tbl.column.heading,survey.model_survey_tbl_column_heading,base.group_user,1,1,1,0
diff --git a/addons/hr_evaluation/test/test_hr_evaluation.yml b/addons/hr_evaluation/test/test_hr_evaluation.yml
index 2bdc3513962..a66731531fa 100644
--- a/addons/hr_evaluation/test/test_hr_evaluation.yml
+++ b/addons/hr_evaluation/test/test_hr_evaluation.yml
@@ -54,7 +54,6 @@
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_20")) + "_multi" :'3',
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_25")) + "_multi" :'2011-12-02 16:42:00',
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_43")) + "_multi" :'HR',
- str(ref("survey_question_2")) +"_" +str(ref("survey_answer_98")) + "_multi" :'tpa review'
}, context = ctx)
-
I close this Evaluation survey by giving answer of questions.
diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml
index 5389f88b885..8049255afbf 100644
--- a/addons/hr_expense/hr_expense_view.xml
+++ b/addons/hr_expense/hr_expense_view.xml
@@ -130,7 +130,7 @@
-
+
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 5a2e0603b88..347e2b17ca5 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -92,7 +92,7 @@
@@ -137,7 +137,7 @@
@@ -483,6 +483,7 @@
hr.employee.leave.tree
hr.employee
+
@@ -522,7 +523,7 @@
-
+
diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py
index c82c6db446b..6a2e40b9571 100644
--- a/addons/hr_payroll/hr_payroll.py
+++ b/addons/hr_payroll/hr_payroll.py
@@ -669,26 +669,26 @@ class hr_payslip(osv.osv):
if not context.get('contract', False):
#fill with the first contract of the employee
contract_ids = self.get_contract(cr, uid, employee_id, date_from, date_to, context=context)
- res['value'].update({
- 'struct_id': contract_ids and contract_obj.read(cr, uid, contract_ids[0], ['struct_id'], context=context)['struct_id'][0] or False,
- 'contract_id': contract_ids and contract_ids[0] or False,
- })
else:
if contract_id:
#set the list of contract for which the input have to be filled
contract_ids = [contract_id]
- #fill the structure with the one on the selected contract
- contract_record = contract_obj.browse(cr, uid, contract_id, context=context)
- res['value'].update({
- 'struct_id': contract_record.struct_id.id,
- 'contract_id': contract_id
- })
else:
#if we don't give the contract, then the input to fill should be for all current contracts of the employee
contract_ids = self.get_contract(cr, uid, employee_id, date_from, date_to, context=context)
- if not contract_ids:
- return res
+ if not contract_ids:
+ return res
+ contract_record = contract_obj.browse(cr, uid, contract_ids[0], context=context)
+ res['value'].update({
+ 'contract_id': contract_record and contract_record.id or False
+ })
+ struct_record = contract_record and contract_record.struct_id or False
+ if not struct_record:
+ return res
+ res['value'].update({
+ 'struct_id': struct_record.id,
+ })
#computation of the salary input
worked_days_line_ids = self.get_worked_day_lines(cr, uid, contract_ids, date_from, date_to, context=context)
input_line_ids = self.get_inputs(cr, uid, contract_ids, date_from, date_to, context=context)
diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml
index d5b8b50306d..ef3c0ea2e9f 100644
--- a/addons/hr_payroll/hr_payroll_view.xml
+++ b/addons/hr_payroll/hr_payroll_view.xml
@@ -234,7 +234,7 @@
-
+
@@ -369,7 +369,7 @@
-
+
-
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 52d2cfa9d14..6c92e28564e 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -187,7 +187,7 @@
+ sequence="2" groups="base.group_hr_user"/>
@@ -101,7 +101,7 @@
-
+
@@ -130,7 +130,7 @@
-
+
@@ -159,10 +159,6 @@
-
-
-
-
diff --git a/addons/note/security/res.groups.csv b/addons/note/security/res.groups.csv
index 61c54c964ff..88d7b2cd667 100644
--- a/addons/note/security/res.groups.csv
+++ b/addons/note/security/res.groups.csv
@@ -1,3 +1,2 @@
id,name,implied_ids/id
-group_note_tags,Memo / Display tags,
group_note_fancy,Memo / Fancy mode,
diff --git a/addons/note/static/src/css/Makefile b/addons/note/static/src/css/Makefile
deleted file mode 100644
index 91b3abc9333..00000000000
--- a/addons/note/static/src/css/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-memo.css: memo.sass
- sass -t expanded memo.sass memo.css
-
diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css
index 6ada8d6cd14..d4b5f3d8d64 100644
--- a/addons/note/static/src/css/note.css
+++ b/addons/note/static/src/css/note.css
@@ -1,93 +1,53 @@
@charset "utf-8";
-@font-face {
- font-family: "mnmliconsRegular";
- src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
- src: url("/web/static/src/font/mnmliconsv21-webfont.woff") format("woff");
- src: url("/web/static/src/font/mnmliconsv21-webfont.ttf") format("truetype");
- src: url("/web/static/src/font/mnmliconsv21-webfont.svg") format("svg") active;
- font-weight: normal;
- font-style: normal;
-}
-
-@font-face {
- font-family: "EntypoRegular";
- src: url("/web/static/src/font/entypo-webfont.eot") format("eot");
- src: url("/web/static/src/font/entypo-webfont.eot?#iefix") format("embedded-opentype");
- src: url("/web/static/src/font/entypo-webfont.woff") format("woff");
- src: url("/web/static/src/font/entypo-webfont.ttf") format("truetype");
- src: url("/web/static/src/font/entypo-webfont.svg") format("svg") active;
- font-weight: normal;
- font-style: normal;
-}
-
-@-moz-keyframes bounce {
- 0% {
- -moz-transform: scale(0);
- opacity: 0;
- }
-
- 50% {
- -moz-transform: scale(1.3);
- opacity: 0.4;
- }
-
- 75% {
- -moz-transform: scale(0.9);
- opacity: 0.7;
- }
-
- 100% {
- -moz-transform: scale(1);
- opacity: 1;
- }
-}
-
-@-webkit-keyframes bounce {
- 0% {
- -webkit-transform: scale(0);
- opacity: 0;
- }
-
- 50% {
- -webkit-transform: scale(1.3);
- opacity: 0.4;
- }
-
- 75% {
- -webkit-transform: scale(0.9);
- opacity: 0.7;
- }
-
- 100% {
- -webkit-transform: scale(1);
- opacity: 1;
- }
-}
-
-.oe_kanban_color_2 {
- background-color: red;
-}
-
.oe_kanban_column .note_text_line_through {
text-decoration: line-through;
}
-.openerp .oe_fold_column .oe_kanban_card_fancy {
- text-decoration: none;
- color: black;
- display: block;
- padding: 1em;
- margin-right: 1em;
- margin-bottom: 1em;
- -moz-box-shadow: 5px 5px 7px #212121;
- -webkit-box-shadow: 5px 5px 7px rgba(33, 33, 33, 0.7);
- box-shadow: 5px 5px 7px rgba(33, 33, 33, 0.7);
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_0 {
+ box-shadow: 0px 4px 9px rgba(48, 48, 48, 0.15);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_1 {
+ box-shadow: 0px 4px 9px rgba(0, 0, 0, 0.15);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_2 {
+ box-shadow: 0px 4px 9px rgba(48, 0, 0, 0.15);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_3 {
+ box-shadow: 0px 4px 9px rgba(97, 93, 0, 0.16);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_4 {
+ box-shadow: 0px 4px 9px rgba(77, 128, 0, 0.17);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_5 {
+ box-shadow: 0px 4px 9px rgba(0, 88, 11, 0.15);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_6 {
+ box-shadow: 0px 4px 9px rgba(0, 80, 95, 0.15);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_7 {
+ box-shadow: 0px 4px 9px rgba(3, 13, 133, 0.18);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_8 {
+ box-shadow: 0px 4px 9px rgba(56, 0, 128, 0.15);
+}
+.openerp .oe_kanban_view.oe_notes .oe_kanban_card_fancy.oe_kanban_color_9 {
+ box-shadow: 0px 4px 9px rgba(102, 0, 116, 0.15);
}
-
.openerp .oe_kanban_record .oe_kanban_card_fancy {
+ text-shadow: none;
+ border-radius: 2px;
+ padding: 12px;
+ margin-left: 3px;
+ margin-right: 3px;
+ padding-bottom: 16px;
+ margin-bottom: 16px;
-webkit-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
-moz-transform: rotate(-2deg);
+ -webkit-transition: all 300ms cubic-bezier(0.5, 0, 0.5, 1);
+ -moz-transition: all 300ms cubic-bezier(0.5, 0, 0.5, 1);
+ -ms-transition: all 300ms cubic-bezier(0.5, 0, 0.5, 1);
+ transition: all 300ms cubic-bezier(0.5, 0, 0.5, 1);
}
.openerp .oe_kanban_record:nth-of-type(even) .oe_kanban_card_fancy {
-webkit-transform: rotate(1deg);
@@ -132,12 +92,14 @@
.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card_fancy:hover,
.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card_fancy:focus {
- box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.7);
- -moz-box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.7);
- -webkit-box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.7);
position: relative;
z-index: 5;
- -webkit-transform: rotate(0);
- -o-transform: rotate(0);
- -moz-transform: rotate(0);
+ border-color: rgba(0, 0, 0, 0.4);
+ -webkit-transition: all 150ms cubic-bezier(0.5, 0, 0.5, 1);
+ -moz-transition: all 150ms cubic-bezier(0.5, 0, 0.5, 1);
+ -ms-transition: all 150ms cubic-bezier(0.5, 0, 0.5, 1);
+ transition: all 150ms cubic-bezier(0.5, 0, 0.5, 1);
+ -webkit-transform: rotate(0) !important;
+ -o-transform: rotate(0) !important;
+ -moz-transform: rotate(0) !important;
}
diff --git a/addons/note/static/src/css/note.sass b/addons/note/static/src/css/note.sass
index 56aa91abc44..cc4e44f6765 100644
--- a/addons/note/static/src/css/note.sass
+++ b/addons/note/static/src/css/note.sass
@@ -1,168 +1,54 @@
@charset "utf-8"
-// Variables {{{
-$section-title-color: #8786b7
-$tag-bg-light: #f0f0fa
-$tag-bg-dark: #8786b7
-$tag-border: #afafb6
-$tag-border-selected: #a6a6fe
-$hover-background: #f0f0fa
-$link-color: #8a89ba
-$sheet-max-width: 860px
-// }}}
-// Mixins {{{
-@font-face
- font-family: 'mnmliconsRegular'
- src: url('/web/static/src/font/mnmliconsv21-webfont.eot') format('eot')
- src: url('/web/static/src/font/mnmliconsv21-webfont.woff') format('woff')
- src: url('/web/static/src/font/mnmliconsv21-webfont.ttf') format('truetype')
- src: url('/web/static/src/font/mnmliconsv21-webfont.svg') format('svg') active
- font-weight: normal
- font-style: normal
-
-@font-face
- font-family: 'EntypoRegular'
- src: url('/web/static/src/font/entypo-webfont.eot') format('eot')
- src: url('/web/static/src/font/entypo-webfont.eot?#iefix') format('embedded-opentype')
- src: url('/web/static/src/font/entypo-webfont.woff') format('woff')
- src: url('/web/static/src/font/entypo-webfont.ttf') format('truetype')
- src: url('/web/static/src/font/entypo-webfont.svg') format('svg') active
- font-weight: normal
- font-style: normal
-
-@mixin reset()
- border: none
- padding: 0
- margin: 0
- background: none
- @include radius(none)
- @include box-shadow(none)
-
-@mixin vertical-gradient($startColor: #555, $endColor: #333)
- background-color: $startColor
- background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */
- background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */
- background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
- background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */
- background-image: linear-gradient(to bottom, $startColor, $endColor)
-
-@mixin radial-gradient($gradient)
- background-position: center center
- background-image: -webkit-radial-gradient(circle, $gradient)
- background-image: -moz-radial-gradient($gradient)
- background-image: -ms-radial-gradient($gradient)
- background-image: radial-gradient($gradient)
-
-@mixin radius($radius: 5px)
- -moz-border-radius: $radius
- -webkit-border-radius: $radius
- border-radius: $radius
-
-@mixin box-shadow($bsval: 0px 1px 4px #777)
- -moz-box-shadow: $bsval
- -webkit-box-shadow: $bsval
- box-shadow: $bsval
-
-@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s))
- -webkit-transition: $transval
- -moz-transition: $transval
- -ms-transition: $transval
- -o-transition: $transval
- transition: $transval
-
-@mixin opacity($opacity: .5)
- filter: alpha(opacity=$opacity * 100)
- opacity: $opacity
-
-@mixin background-clip($clip: padding-box)
- -webkit-background-clip: $clip
- -moz-background-clip: $clip
- background-clip: $clip
-
-@mixin box-sizing($type: content)
- // type = border || content || padding
- -webkit-box-sizing: #{$type}-box
- -moz-box-sizing: #{$type}-box
- -ms-box-sizing: #{$type}-box
- box-sizing: #{$type}-box
-
-// Transforms the (readable) text of an inline element into an mmlicons icon,
-// allows for actual readable text in-code (and in readers?) with iconic looks
-@mixin text-to-icon($icon-name, $color: #404040)
- font-size: 1px
- letter-spacing: -1px
- color: transparent
- &: before
- font: 21px "mnmliconsRegular"
- content: $icon-name
- color: $color
-
-// }}}
-// CSS animation bounces {{{
-@-moz-keyframes bounce
- 0%
- -moz-transform: scale(0)
- opacity: 0
- 50%
- -moz-transform: scale(1.3)
- opacity: 0.4
- 75%
- -moz-transform: scale(0.9)
- opacity: 0.7
- 100%
- -moz-transform: scale(1)
- opacity: 1
-
-@-webkit-keyframes bounce
- 0%
- -webkit-transform: scale(0)
- opacity: 0
- 50%
- -webkit-transform: scale(1.3)
- opacity: 0.4
- 75%
- -webkit-transform: scale(0.9)
- opacity: 0.7
- 100%
- -webkit-transform: scale(1)
- opacity: 1
-// }}}
-
-
-.oe_kanban_color_2
- background-color: red
-
-// au BufWritePost,FileWritePost *.sass : !sass --style expanded --line-numbers > "%: p: r.css"
-
.oe_kanban_column
.note_text_line_through
text-decoration: line-through
-
-.openerp
- .oe_fold_column
- .oe_kanban_card_fancy
- text-decoration: none
- color: #000
- display: block
- padding: 1em
- margin-right: 1em
- margin-bottom: 1em
- -moz-box-shadow: 5px 5px 7px rgba(33,33,33,1)
- -webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7)
- box-shadow: 5px 5px 7px rgba(33,33,33,.7)
-
-
@mixin rotate($a)
- -webkit-transform: rotate($a)
- -o-transform: rotate($a)
+ -webkit-transform: rotate($a)
+ -o-transform: rotate($a)
-moz-transform: rotate($a)
+@mixin transition($what:all,$duration:100ms)
+ -webkit-transition: $what $duration cubic-bezier(0.5,0,0.5,1)
+ -moz-transition: $what $duration cubic-bezier(0.5,0,0.5,1)
+ -ms-transition: $what $duration cubic-bezier(0.5,0,0.5,1)
+ transition: $what $duration cubic-bezier(0.5,0,0.5,1)
+
+
.openerp
+ .oe_kanban_view.oe_notes
+ .oe_kanban_card_fancy.oe_kanban_color_0
+ box-shadow: 0px 4px 9px rgba(48,48,48,0.15)
+ .oe_kanban_card_fancy.oe_kanban_color_1
+ box-shadow: 0px 4px 9px rgba(0,0,0,0.15)
+ .oe_kanban_card_fancy.oe_kanban_color_2
+ box-shadow: 0px 4px 9px rgba(48,0,0,0.15)
+ .oe_kanban_card_fancy.oe_kanban_color_3
+ box-shadow: 0px 4px 9px rgba(97,93,0,0.16)
+ .oe_kanban_card_fancy.oe_kanban_color_4
+ box-shadow: 0px 4px 9px rgba(77,128,0,0.17)
+ .oe_kanban_card_fancy.oe_kanban_color_5
+ box-shadow: 0px 4px 9px rgba(0,88,11,0.15)
+ .oe_kanban_card_fancy.oe_kanban_color_6
+ box-shadow: 0px 4px 9px rgba(0,80,95,0.15)
+ .oe_kanban_card_fancy.oe_kanban_color_7
+ box-shadow: 0px 4px 9px rgba(3,13,133,0.18)
+ .oe_kanban_card_fancy.oe_kanban_color_8
+ box-shadow: 0px 4px 9px rgba(56,0,128,0.15)
+ .oe_kanban_card_fancy.oe_kanban_color_9
+ box-shadow: 0px 4px 9px rgba(102,0,116,0.15)
.oe_kanban_record
.oe_kanban_card_fancy
+ text-shadow: none
+ border-radius: 2px
+ padding: 12px
+ margin-left: 3px
+ margin-right: 3px
+ padding-bottom: 16px
+ margin-bottom: 16px
@include rotate(-2deg)
+ @include transition($what:all, $duration:300ms)
.oe_kanban_record:nth-of-type(even)
.oe_kanban_card_fancy
@include rotate(1deg)
@@ -193,17 +79,16 @@ $sheet-max-width: 860px
@include rotate(-1deg)
-@mixin oe_kanban_card_fancy
- box-shadow: 10px 10px 7px rgba(0,0,0,.7)
- -moz-box-shadow: 10px 10px 7px rgba(0,0,0,.7)
- -webkit-box-shadow: 10px 10px 7px rgba(0,0,0,.7)
- position: relative
- z-index: 5
- @include rotate(0)
-
.openerp
.oe_kanban_column
.oe_fold_column
.oe_kanban_card_fancy:hover,
.oe_kanban_card_fancy:focus
- @include oe_kanban_card_fancy
+ position: relative
+ z-index: 5
+ border-color: rgba(0,0,0,0.4)
+ @include transition($what:all, $duration:150ms)
+ -webkit-transform: rotate(0) !important
+ -o-transform: rotate(0) !important
+ -moz-transform: rotate(0) !important
+
diff --git a/addons/pad/pad.py b/addons/pad/pad.py
index 48ac940ccfa..0cbb6107979 100644
--- a/addons/pad/pad.py
+++ b/addons/pad/pad.py
@@ -5,24 +5,56 @@ import re
import string
import urllib2
from tools.translate import _
+from openerp.tools.misc import html2plaintext
+from py_etherpad import EtherpadLiteClient
class pad_common(osv.osv_memory):
_name = 'pad.common'
def pad_generate_url(self, cr, uid, context=None):
- pad_server = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.pad_server
+ company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id;
+
+ pad = {
+ "server" : company.pad_server,
+ "key" : company.pad_key or "4DxmsNIbnQUVQMW9S9tx2oLOSjFdrx1l",
+ }
+
# make sure pad server in the form of http://hostname
- if not pad_server:
+ if not pad["server"]:
return ''
- if not pad_server.startswith('http'):
- pad_server = 'http://' + pad_server
- pad_server = pad_server.rstrip('/')
+ if not pad["server"].startswith('http'):
+ pad["server"] = 'http://' + pad["server"]
+ pad["server"] = pad["server"].rstrip('/')
# generate a salt
s = string.ascii_uppercase + string.digits
salt = ''.join([s[random.randint(0, len(s) - 1)] for i in range(10)])
+ #path
+ path = '%s-%s-%s' % (cr.dbname.replace('_','-'), self._name, salt)
# contruct the url
- url = '%s/p/%s-%s-%s' % (pad_server, cr.dbname.replace('_','-'), self._name, salt)
- return url
+ url = '%s/p/%s' % (pad["server"], path)
+
+ #if create with content
+ if "field_name" in context and "model" in context and "object_id" in context:
+ myPad = EtherpadLiteClient( pad["key"], pad["server"]+'/api')
+ myPad.createPad(path)
+
+ #get attr on the field model
+ model = self.pool.get(context["model"])
+ field = model._all_columns[context['field_name']]
+ real_field = field.column.pad_content_field
+
+ #get content of the real field
+ for record in model.browse(cr, uid, [context["object_id"]]):
+ if record[real_field]:
+ myPad.setText(path, html2plaintext(record[real_field]))
+ #Etherpad for html not functional
+ #myPad.setHTML(path, record[real_field])
+
+ return {
+ "server": pad["server"],
+ "path": path,
+ "url": url,
+ }
def pad_get_content(self, cr, uid, url, context=None):
content = ''
@@ -57,7 +89,8 @@ class pad_common(osv.osv_memory):
for k,v in self._all_columns:
field = v.column
if hasattr(field,'pad_content_field'):
- default[k] = self.pad_generate_url(cr, uid, context)
+ pad = self.pad_generate_url(cr, uid, context)
+ default[k] = pad['url']
return super(pad_common, self).copy(cr, uid, id, default, context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/pad/py_etherpad/__init__.py b/addons/pad/py_etherpad/__init__.py
new file mode 100644
index 00000000000..6af310b48aa
--- /dev/null
+++ b/addons/pad/py_etherpad/__init__.py
@@ -0,0 +1,253 @@
+#!/usr/bin/env python
+"""Module to talk to EtherpadLite API."""
+
+import json
+import urllib
+import urllib2
+
+
+class EtherpadLiteClient:
+ """Client to talk to EtherpadLite API."""
+ API_VERSION = 1 # TODO probably 1.1 sometime soon
+
+ CODE_OK = 0
+ CODE_INVALID_PARAMETERS = 1
+ CODE_INTERNAL_ERROR = 2
+ CODE_INVALID_FUNCTION = 3
+ CODE_INVALID_API_KEY = 4
+ TIMEOUT = 20
+
+ apiKey = ""
+ baseUrl = "http://localhost:9001/api"
+
+ def __init__(self, apiKey=None, baseUrl=None):
+ if apiKey:
+ self.apiKey = apiKey
+
+ if baseUrl:
+ self.baseUrl = baseUrl
+
+ def call(self, function, arguments=None):
+ """Create a dictionary of all parameters"""
+ url = '%s/%d/%s' % (self.baseUrl, self.API_VERSION, function)
+
+ params = arguments or {}
+ params.update({'apikey': self.apiKey})
+ data = urllib.urlencode(params, True)
+
+ try:
+ opener = urllib2.build_opener()
+ request = urllib2.Request(url=url, data=data)
+ response = opener.open(request, timeout=self.TIMEOUT)
+ result = response.read()
+ response.close()
+ except urllib2.HTTPError:
+ raise
+
+ result = json.loads(result)
+ if result is None:
+ raise ValueError("JSON response could not be decoded")
+
+ return self.handleResult(result)
+
+ def handleResult(self, result):
+ """Handle API call result"""
+ if 'code' not in result:
+ raise Exception("API response has no code")
+ if 'message' not in result:
+ raise Exception("API response has no message")
+
+ if 'data' not in result:
+ result['data'] = None
+
+ if result['code'] == self.CODE_OK:
+ return result['data']
+ elif result['code'] == self.CODE_INVALID_PARAMETERS or result['code'] == self.CODE_INVALID_API_KEY:
+ raise ValueError(result['message'])
+ elif result['code'] == self.CODE_INTERNAL_ERROR:
+ raise Exception(result['message'])
+ elif result['code'] == self.CODE_INVALID_FUNCTION:
+ raise Exception(result['message'])
+ else:
+ raise Exception("An unexpected error occurred whilst handling the response")
+
+ # GROUPS
+ # Pads can belong to a group. There will always be public pads that do not belong to a group (or we give this group the id 0)
+
+ def createGroup(self):
+ """creates a new group"""
+ return self.call("createGroup")
+
+ def createGroupIfNotExistsFor(self, groupMapper):
+ """this functions helps you to map your application group ids to etherpad lite group ids"""
+ return self.call("createGroupIfNotExistsFor", {
+ "groupMapper": groupMapper
+ })
+
+ def deleteGroup(self, groupID):
+ """deletes a group"""
+ return self.call("deleteGroup", {
+ "groupID": groupID
+ })
+
+ def listPads(self, groupID):
+ """returns all pads of this group"""
+ return self.call("listPads", {
+ "groupID": groupID
+ })
+
+ def createGroupPad(self, groupID, padName, text=''):
+ """creates a new pad in this group"""
+ params = {
+ "groupID": groupID,
+ "padName": padName,
+ }
+ if text:
+ params['text'] = text
+ return self.call("createGroupPad", params)
+
+ # AUTHORS
+ # Theses authors are bind to the attributes the users choose (color and name).
+
+ def createAuthor(self, name=''):
+ """creates a new author"""
+ params = {}
+ if name:
+ params['name'] = name
+ return self.call("createAuthor", params)
+
+ def createAuthorIfNotExistsFor(self, authorMapper, name=''):
+ """this functions helps you to map your application author ids to etherpad lite author ids"""
+ params = {
+ 'authorMapper': authorMapper
+ }
+ if name:
+ params['name'] = name
+ return self.call("createAuthorIfNotExistsFor", params)
+
+ # SESSIONS
+ # Sessions can be created between a group and a author. This allows
+ # an author to access more than one group. The sessionID will be set as
+ # a cookie to the client and is valid until a certain date.
+
+ def createSession(self, groupID, authorID, validUntil):
+ """creates a new session"""
+ return self.call("createSession", {
+ "groupID": groupID,
+ "authorID": authorID,
+ "validUntil": validUntil
+ })
+
+ def deleteSession(self, sessionID):
+ """deletes a session"""
+ return self.call("deleteSession", {
+ "sessionID": sessionID
+ })
+
+ def getSessionInfo(self, sessionID):
+ """returns informations about a session"""
+ return self.call("getSessionInfo", {
+ "sessionID": sessionID
+ })
+
+ def listSessionsOfGroup(self, groupID):
+ """returns all sessions of a group"""
+ return self.call("listSessionsOfGroup", {
+ "groupID": groupID
+ })
+
+ def listSessionsOfAuthor(self, authorID):
+ """returns all sessions of an author"""
+ return self.call("listSessionsOfAuthor", {
+ "authorID": authorID
+ })
+
+ # PAD CONTENT
+ # Pad content can be updated and retrieved through the API
+
+ def getText(self, padID, rev=None):
+ """returns the text of a pad"""
+ params = {"padID": padID}
+ if rev is not None:
+ params['rev'] = rev
+ return self.call("getText", params)
+
+ # introduced with pull request merge
+ def getHtml(self, padID, rev=None):
+ """returns the html of a pad"""
+ params = {"padID": padID}
+ if rev is not None:
+ params['rev'] = rev
+ return self.call("getHTML", params)
+
+ def setText(self, padID, text):
+ """sets the text of a pad"""
+ return self.call("setText", {
+ "padID": padID,
+ "text": text
+ })
+
+ def setHtml(self, padID, html):
+ """sets the text of a pad from html"""
+ return self.call("setHTML", {
+ "padID": padID,
+ "html": html
+ })
+
+ # PAD
+ # Group pads are normal pads, but with the name schema
+ # GROUPID$PADNAME. A security manager controls access of them and its
+ # forbidden for normal pads to include a in the name.
+
+ def createPad(self, padID, text=''):
+ """creates a new pad"""
+ params = {
+ "padID": padID,
+ }
+ if text:
+ params['text'] = text
+ return self.call("createPad", params)
+
+ def getRevisionsCount(self, padID):
+ """returns the number of revisions of this pad"""
+ return self.call("getRevisionsCount", {
+ "padID": padID
+ })
+
+ def deletePad(self, padID):
+ """deletes a pad"""
+ return self.call("deletePad", {
+ "padID": padID
+ })
+
+ def getReadOnlyID(self, padID):
+ """returns the read only link of a pad"""
+ return self.call("getReadOnlyID", {
+ "padID": padID
+ })
+
+ def setPublicStatus(self, padID, publicStatus):
+ """sets a boolean for the public status of a pad"""
+ return self.call("setPublicStatus", {
+ "padID": padID,
+ "publicStatus": publicStatus
+ })
+
+ def getPublicStatus(self, padID):
+ """return true of false"""
+ return self.call("getPublicStatus", {
+ "padID": padID
+ })
+
+ def setPassword(self, padID, password):
+ """returns ok or a error message"""
+ return self.call("setPassword", {
+ "padID": padID,
+ "password": password
+ })
+
+ def isPasswordProtected(self, padID):
+ """returns true or false"""
+ return self.call("isPasswordProtected", {
+ "padID": padID
+ })
diff --git a/addons/pad/static/src/css/etherpad.css b/addons/pad/static/src/css/etherpad.css
index 8ea7972071e..bd73af6c2cd 100644
--- a/addons/pad/static/src/css/etherpad.css
+++ b/addons/pad/static/src/css/etherpad.css
@@ -1,7 +1,12 @@
.oe_pad_head {
+ box-sizing: border-box;
width: 100%;
display: block;
padding: 4px;
+ text-align: right;
+}
+.oe_pad_head .oe_pad_switch {
+
}
.oe_pad_readonly {
@@ -13,14 +18,38 @@
position: fixed;
top: 0px;
left: 0px;
- width: 100%;
- height: 100%;
+ right: 0px;
+ bottom: 0px;
background-color: white;
+ margin:0;
+ padding:0;
+ border:none;
z-index: 1000;
}
+.oe_pad_content {
+ border: solid 1px #c4c4c4;
+ height: 150px;
+ -webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.1);
+ -moz-box-shadow: 0 5px 10px rgba(0,0,0,0.1);
+ -ms-box-shadow: 0 5px 10px rgba(0,0,0,0.1);
+ -o-box-shadow: 0 5px 10px rgba(0,0,0,0.1);
+ box-shadow: 0 5px 10px rgba(0,0,0,0.1);
+}
+
+.oe_pad_content > p {
+ text-align: center;
+ opacity: 0.75;
+}
+
.oe_pad_fullscreen .oe_pad_content {
height: 100%;
+ border: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ -ms-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
}
.etherpad_readonly ul, .etherpad_readonly ol {
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index b7c13ba1b89..e598ecca4f5 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -16,10 +16,17 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({
var self = this;
var _super = self._super;
_super.apply(self,[val]);
+
if (val === false || val === "") {
- self.field_manager.dataset.call('pad_generate_url').then(function(r) {
- _super.apply(self,[r]);
- self.render_value();
+ self.field_manager.dataset.call('pad_generate_url',{context:{
+ model: self.field_manager.model,
+ field_name: self.name,
+ object_id: self.field_manager.datarecord.id
+ }}).then(function(data) {
+ if(data&&data.url){
+ _super.apply(self,[data.url]);
+ self.render_value();
+ }
});
} else {
self.render_value();
@@ -27,7 +34,6 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({
this._dirty_flag = true;
},
render_value: function() {
- console.log("display");
var self = this;
var value = this.get('value');
diff --git a/addons/pad/static/src/xml/pad.xml b/addons/pad/static/src/xml/pad.xml
index ce79df52684..911655b6b89 100644
--- a/addons/pad/static/src/xml/pad.xml
+++ b/addons/pad/static/src/xml/pad.xml
@@ -5,12 +5,14 @@
- Fullscreen
+ Fullscreen
+
You must configure the etherpad through the menu Setting > Companies > Companies, in the configuration tab of your company.
+
diff --git a/addons/portal/portal_demo.xml b/addons/portal/portal_demo.xml
index f4ba8fe2192..a8727b99556 100644
--- a/addons/portal/portal_demo.xml
+++ b/addons/portal/portal_demo.xml
@@ -19,7 +19,7 @@
- Our first company's blogpost !
+ Our company's first blog-post !
mail.group
-
+
@@ -143,7 +143,6 @@
-
@@ -294,16 +293,14 @@
Click to start a new project.
-
-
+
Projects are used to organize your activities; plan
tasks, track issues, invoice timesheets. You can define
internal projects (R&D, Improve Sales Process),
private projects (My Todos) or customer ones.
-
-
- You will be able collaborate with internal users on
- projects or invite customers to share your activities.
+
+ You will be able collaborate with internal users on
+ projects or invite customers to share your activities.
@@ -402,8 +399,6 @@
states="cancelled,done" context="{'button_reactivate':True}"/>
-
@@ -450,7 +445,9 @@
-
+
+
@@ -517,7 +514,7 @@
Edit...
Delete
-
+
1
2
5
@@ -534,7 +531,8 @@
-
+ oe_kanban_text_red
+
@@ -795,7 +793,7 @@
-
+
diff --git a/addons/project/res_config.py b/addons/project/res_config.py
index 6642dbf485d..85b4bd7001b 100644
--- a/addons/project/res_config.py
+++ b/addons/project/res_config.py
@@ -30,7 +30,7 @@ class project_configuration(osv.osv_memory):
'module_project_mrp': fields.boolean('Generate tasks from sale orders',
help ="""This feature automatically creates project tasks from service products in sale orders.
More precisely, tasks are created for procurement lines with product of type 'Service',
- procurement method 'Make to Order', and supply method 'Produce'.
+ procurement method 'Make to Order', and supply method 'Manufacture'.
This installs the module project_mrp."""),
'module_pad': fields.boolean("Use integrated collaborative note pads on task",
help="""Lets the company customize which Pad installation should be used to link to new pads
@@ -52,7 +52,7 @@ class project_configuration(osv.osv_memory):
'module_project_issue_sheet': fields.boolean("Invoice working time on issues",
help="""Provides timesheet support for the issues/bugs management in project.
This installs the module project_issue_sheet."""),
- 'group_tasks_work_on_tasks': fields.boolean("Compute work activities on tasks",
+ 'group_tasks_work_on_tasks': fields.boolean("Log work activities on tasks",
implied_group='project.group_tasks_work_on_tasks',
help="Allows you to compute work on tasks."),
'group_time_work_estimation_tasks': fields.boolean("Manage time estimation on tasks",
@@ -72,4 +72,9 @@ class project_configuration(osv.osv_memory):
user = self.pool.get('res.users').browse(cr, uid, uid, context)
user.company_id.write({'project_time_mode_id': config.time_unit.id})
+ def onchange_time_estimation_project_timesheet(self, cr, uid, ids, group_time_work_estimation_tasks, module_project_timesheet):
+ if group_time_work_estimation_tasks or module_project_timesheet:
+ return {'value': {'group_tasks_work_on_tasks': True}}
+ return {}
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project/res_config_view.xml b/addons/project/res_config_view.xml
index 56803484adf..207f35da72e 100644
--- a/addons/project/res_config_view.xml
+++ b/addons/project/res_config_view.xml
@@ -29,7 +29,7 @@
-
+
@@ -50,7 +50,7 @@
-
+
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index be7427fe8f4..8d54520261f 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -100,8 +100,6 @@
states="open"/>
-
@@ -118,7 +116,11 @@
-
+
+
+
+
+
diff --git a/addons/project_mrp/project_procurement.py b/addons/project_mrp/project_procurement.py
index 299a74f52aa..f9f6fb6a279 100644
--- a/addons/project_mrp/project_procurement.py
+++ b/addons/project_mrp/project_procurement.py
@@ -73,6 +73,7 @@ class procurement_order(osv.osv):
'date_deadline': procurement.date_planned,
'planned_hours': planned_hours,
'remaining_hours': planned_hours,
+ 'partner_id': procurement.sale_line_id and procurement.sale_line_id.order_id.partner_id.id or False,
'user_id': procurement.product_id.product_manager.id,
'notes': procurement.note,
'procurement_id': procurement.id,
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index e982930d69e..955d55b3825 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -318,21 +318,26 @@ class purchase_order(osv.osv):
for po in self.browse(cr, uid, ids, context=context):
pick_ids += [picking.id for picking in po.picking_ids]
- res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_in_form')
- res_id = res and res[1] or False
-
- return {
- 'name': _('Receptions'),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'view_id': [res_id],
- 'res_model': 'stock.picking',
- 'context': "{'contact_display': 'partner'}",
- 'type': 'ir.actions.act_window',
- 'nodestroy': True,
- 'target': 'current',
- 'res_id': pick_ids and pick_ids[0] or False,
- }
+ action_model, action_id = tuple(mod_obj.get_object_reference(cr, uid, 'stock', 'action_picking_tree4'))
+ action = self.pool.get(action_model).read(cr, uid, action_id, context=context)
+ ctx = eval(action['context'])
+ ctx.update({
+ 'search_default_purchase_id': ids[0]
+ })
+ if pick_ids and len(pick_ids) == 1:
+ form_view_ids = [view_id for view_id, view in action['views'] if view == 'form']
+ view_id = form_view_ids and form_view_ids[0] or False
+ action.update({
+ 'views': [],
+ 'view_mode': 'form',
+ 'view_id': view_id,
+ 'res_id': pick_ids[0]
+ })
+
+ action.update({
+ 'context': ctx,
+ })
+ return action
def wkf_approve_order(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
@@ -863,6 +868,12 @@ class purchase_order_line(osv.osv):
supplier_delay = int(supplier_info.delay) if supplier_info else 0
return datetime.strptime(date_order_str, DEFAULT_SERVER_DATE_FORMAT) + relativedelta(days=supplier_delay)
+ def _check_product_uom_group(self, cr, uid, context=None):
+ group_uom = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'group_uom')
+ res = [user for user in group_uom.users if user.id == uid]
+ return len(res) and True or False
+
+
def onchange_product_id(self, cr, uid, ids, pricelist_id, product_id, qty, uom_id,
partner_id, date_order=False, fiscal_position_id=False, date_planned=False,
name=False, price_unit=False, context=None):
@@ -908,7 +919,8 @@ class purchase_order_line(osv.osv):
uom_id = product_uom_po_id
if product.uom_id.category_id.id != product_uom.browse(cr, uid, uom_id, context=context).category_id.id:
- res['warning'] = {'title': _('Warning!'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure.')}
+ if self._check_product_uom_group(cr, uid, context=context):
+ res['warning'] = {'title': _('Warning!'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure.')}
uom_id = product_uom_po_id
res['value'].update({'product_uom': uom_id})
@@ -1083,15 +1095,15 @@ class procurement_order(osv.osv):
procurement_order()
-class mail_message(osv.osv):
- _name = 'mail.message'
- _inherit = 'mail.message'
+class mail_mail(osv.osv):
+ _name = 'mail.mail'
+ _inherit = 'mail.mail'
- def _postprocess_sent_message(self, cr, uid, message, context=None):
- if message.model == 'purchase.order':
+ def _postprocess_sent_message(self, cr, uid, mail, context=None):
+ if mail.model == 'purchase.order':
wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'purchase.order', message.res_id, 'send_rfq', cr)
- return super(mail_message, self)._postprocess_sent_message(cr, uid, message=message, context=context)
+ wf_service.trg_validate(uid, 'purchase.order', mail.res_id, 'send_rfq', cr)
+ return super(mail_mail, self)._postprocess_sent_message(cr, uid, mail=mail, context=context)
-mail_message()
+mail_mail()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 796fd1351a9..759c0561631 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -14,19 +14,40 @@
+
+
+ Pricelist Versions
+ ir.actions.act_window
+ product.pricelist.version
+ form
+
+ [('pricelist_id.type','=','purchase')]
+
+
+ Click to add a pricelist version.
+
+ There can be more than one version of a pricelist, each of
+ these must be valid during a certain period of time. Some
+ examples of versions: Main Prices, 2010, 2011, Summer Sales,
+ etc.
+
+
+
+ action="purchase_pricelist_version_action" id="menu_purchase_pricelist_version_action"
+ parent="menu_purchase_config_pricelist" sequence="2" groups="product.group_purchase_pricelist"/>
+
-
+ action="product.product_price_type_action" id="menu_product_pricelist_action2_purchase_type"
+ parent="menu_purchase_config_pricelist" sequence="60" />
@@ -188,7 +209,7 @@
-
+
@@ -346,7 +367,7 @@
Quotations
ir.actions.act_window
purchase.order
- {'search_default_draft': 1}
+ {}
[('state','in',('draft','sent','confirmed'))]
tree,form,graph,calendar
diff --git a/addons/purchase/purchase_workflow.xml b/addons/purchase/purchase_workflow.xml
index 00fb5517568..212ce304e07 100644
--- a/addons/purchase/purchase_workflow.xml
+++ b/addons/purchase/purchase_workflow.xml
@@ -145,7 +145,7 @@
- invoice_method<>'order'
+ invoice_method<>'order' and invoiced
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index bf7512a8666..19b059d4d5b 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -46,10 +46,6 @@ class purchase_config_settings(osv.osv_memory):
'group_purchase_delivery_address': fields.boolean("Allow a different address for incoming products and invoicings",
implied_group='purchase.group_delivery_invoice_address',
help="Allows you to specify different delivery and invoice addresses on a purchase order."),
- 'module_purchase_analytic_plans': fields.boolean('Allow using multiple analytic accounts on the same order',
- help ="""Allows the user to maintain several analysis plans. These let you split
- lines on a purchase order between several accounts and analytic plans.
- This installs the module purchase_analytic_plans."""),
'module_warning': fields.boolean("Alerts by products or supplier",
help="""Allow to configure warnings on products and trigger them when a user wants to purchase a given product or a given supplier.
Example: Product: this product is deprecated, do not purchase more than 5.
@@ -62,6 +58,12 @@ class purchase_config_settings(osv.osv_memory):
help="""Purchase Requisitions are used when you want to request quotations from several suppliers for a given set of products.
You can configure per product if you directly do a Request for Quotation
to one supplier or if you want a purchase requisition to negotiate with several suppliers."""),
+ 'module_purchase_analytic_plans': fields.boolean('Use multiple analytic accounts on purchase orders',
+ help ="""Allows the user to maintain several analysis plans. These let you split lines on a purchase order between several accounts and analytic plans.
+ This installs the module purchase_analytic_plans."""),
+ 'group_analytic_account_for_purchases': fields.boolean('Analytic accounting for purchases',
+ implied_group='purchase.group_analytic_accounting',
+ help="Allows you to specify an analytic account on purchase orders."),
}
_defaults = {
@@ -75,7 +77,8 @@ class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'module_purchase_analytic_plans': fields.boolean('Use multiple analytic accounts on orders',
- help="""This allows install module purchase_analytic_plans."""),
+ help ="""Allows the user to maintain several analysis plans. These let you split lines on a purchase order between several accounts and analytic plans.
+ This installs the module purchase_analytic_plans."""),
'group_analytic_account_for_purchases': fields.boolean('Analytic accounting for purchases',
implied_group='purchase.group_analytic_accounting',
help="Allows you to specify an analytic account on purchase orders."),
diff --git a/addons/purchase/res_config_view.xml b/addons/purchase/res_config_view.xml
index 6453752a638..f659d7b437f 100644
--- a/addons/purchase/res_config_view.xml
+++ b/addons/purchase/res_config_view.xml
@@ -74,6 +74,10 @@
+
+
+
+
diff --git a/addons/purchase/stock_view.xml b/addons/purchase/stock_view.xml
index 21c52b4d2ec..d248ef66160 100644
--- a/addons/purchase/stock_view.xml
+++ b/addons/purchase/stock_view.xml
@@ -11,16 +11,6 @@
-
- Picking list
- stock.picking
-
-
-
-
-
-
-
Incoming Picking Inherited
@@ -36,63 +26,18 @@
-
-
- stock.picking.in.search
+
+ stock.picking.in.search.inherit
stock.picking.in
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
- Incoming Shipments
- stock.picking.in
- ir.actions.act_window
- form
- tree,form,calendar
- [('type','=','in')]
- {'search_default_purchase_id': active_id,'default_type': 'in'}
-
-
-
-
-
- tree
-
-
-
-
-
-
- form
-
-
-
-
-
-
- calendar
-
-
-
+
Purchase Picking Inherited
purchase.order
@@ -100,8 +45,8 @@
-
@@ -110,13 +55,13 @@
On Incoming Shipments
- stock.picking
+ stock.picking.in
ir.actions.act_window
form
tree,form,calendar
[('type','=','in')]
{"default_type": "in", "contact_display": "partner_address", "search_default_done": 1, "search_default_to_invoice": 1}
-
+
Here you can track all the product receptions of purchase
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 0d4bda344a5..067f842165e 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -771,7 +771,8 @@ class sale_order(osv.osv):
'default_res_id': ids[0],
'default_use_template': True,
'default_template_id': template_id,
- })
+ 'mark_so_as_sent': True
+ })
return {
'view_type': 'form',
'view_mode': 'form',
@@ -1476,15 +1477,14 @@ class sale_order_line(osv.osv):
sale_order_line()
-class mail_message(osv.osv):
- _inherit = 'mail.message'
-
- def _postprocess_sent_message(self, cr, uid, message, context=None):
- if message.model == 'sale.order':
+class mail_compose_message(osv.osv):
+ _inherit = 'mail.compose.message'
+ def send_mail(self, cr, uid, ids, context=None):
+ context = context or {}
+ if context.get('mark_so_as_sent', False) and context.get('default_res_id', False):
wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'sale.order', message.res_id, 'quotation_sent', cr)
- return super(mail_message, self)._postprocess_sent_message(cr, uid, message=message, context=context)
-
-mail_message()
+ wf_service.trg_validate(uid, 'sale.order', context.get('default_res_id', False), 'quotation_sent', cr)
+ return super(mail_compose_message, self).send_mail(cr, uid, ids, context=context)
+mail_compose_message()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml
index be871b87796..e54ba158b9b 100644
--- a/addons/sale_crm/sale_crm_view.xml
+++ b/addons/sale_crm/sale_crm_view.xml
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/addons/stock/i18n/ru.po b/addons/stock/i18n/ru.po
index 09143eebcef..ae7689060ef 100644
--- a/addons/stock/i18n/ru.po
+++ b/addons/stock/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
-"PO-Revision-Date: 2012-09-10 11:41+0000\n"
+"PO-Revision-Date: 2012-09-20 14:52+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-09-11 04:50+0000\n"
-"X-Generator: Launchpad (build 15924)\n"
+"X-Launchpad-Export-Date: 2012-09-21 04:43+0000\n"
+"X-Generator: Launchpad (build 15985)\n"
#. module: stock
#: field:product.product,track_outgoing:0
@@ -910,7 +910,7 @@ msgstr ""
#: model:ir.actions.act_window,name:stock.action_picking_tree4
#: model:ir.ui.menu,name:stock.menu_action_picking_tree4 view:stock.picking:0
msgid "Incoming Shipments"
-msgstr "Поступающие грузы"
+msgstr "Поступающие ТМЦ"
#. module: stock
#: view:report.stock.inventory:0 view:stock.move:0 view:stock.picking:0
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 041950df281..30bd70b9728 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -673,6 +673,13 @@ class stock_picking(osv.osv):
]
def action_process(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ context.update({
+ 'active_model': self._name,
+ 'active_ids': ids,
+ 'active_id': len(ids) and ids[0] or False
+ })
return {
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index 68e053b9e22..2cf0a743faa 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -107,21 +107,10 @@ class stock_partial_picking(osv.osv_memory):
picking_ids = context.get('active_ids', [])
active_model = context.get('active_model')
- if active_model == 'purchase.order':
- for purchase_order in self.pool.get('purchase.order').browse(cr, uid, picking_ids, context=context):
- picking_ids = [picking_id.id for picking_id in purchase_order.picking_ids]
- elif active_model == 'sale.order':
- for sale_order in self.pool.get('sale.order').browse(cr, uid, picking_ids, context=context):
- picking_ids = [picking.id for picking in sale_order.picking_ids]
-
if not picking_ids or len(picking_ids) != 1:
# Partial Picking Processing may only be done for one picking at a time
return res
- # The check about active_model is there in case the client mismatched the context during propagation of it
- # (already seen in previous bug where context passed was containing ir.ui.menu as active_model and the menu
- # ID as active_id). Though this should be fixed in clients now, this place is sensitive enough to ensure the
- # consistancy of the context.
- assert active_model in ('stock.picking', 'stock.picking.in', 'stock.picking.out', 'purchase.order', 'sale.order'), 'Bad context propagation'
+ assert active_model in ('stock.picking', 'stock.picking.in', 'stock.picking.out'), 'Bad context propagation'
picking_id, = picking_ids
if 'picking_id' in fields:
res.update(picking_id=picking_id)
diff --git a/addons/web_linkedin/static/src/xml/linkedin.xml b/addons/web_linkedin/static/src/xml/linkedin.xml
index 1a8009ab066..4956fd7df5a 100644
--- a/addons/web_linkedin/static/src/xml/linkedin.xml
+++ b/addons/web_linkedin/static/src/xml/linkedin.xml
@@ -30,7 +30,7 @@
LinkedIn access was not enabled on this server.
- Please ask your administrator to configure it in Settings > Configuration > Linkedin.
+ Please ask your administrator to configure it in Settings > Configuration > Sales > Social Network Integration.
\ No newline at end of file