From fce6f5932b1859db8e26dffff5fbb0d445885df5 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Fri, 16 Sep 2011 16:15:01 +0530 Subject: [PATCH 01/25] [kanban] contacts view for kanban bzr revid: tta@openerp.com-20110916104501-tuwftefbl7lumix7 --- openerp/addons/base/res/res_partner.py | 1 + openerp/addons/base/res/res_partner_view.xml | 64 ++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index 4b8f1279787..2e692e2d4b7 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -300,6 +300,7 @@ class res_partner_address(osv.osv): 'active': fields.boolean('Active', help="Uncheck the active field to hide the contact."), # 'company_id': fields.related('partner_id','company_id',type='many2one',relation='res.company',string='Company', store=True), 'company_id': fields.many2one('res.company', 'Company',select=1), + 'color': fields.integer('Color Index'), } _defaults = { 'active': lambda *a: 1, diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 8b26023701d..c47edc57aad 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -105,11 +105,75 @@ + + + res.partner.address.kanban + res.partner.address + kanban + + + + + + + + + + + + + +
+
+ + + + + +
+ +
+
+ + + + + +
+ + + , +
+ ,
+ + , + +
+
+
+ +
+
+
+
+
+
+
+
+
+ Addresses ir.actions.act_window res.partner.address form + tree,form,kanban {"search_default_customer":1} Customers (also called Partners in other areas of the system) helps you manage your address book of companies whether they are prospects, customers and/or suppliers. The partner form allows you to track and record all the necessary information to interact with your partners from the company address to their contacts as well as pricelists, and much more. If you installed the CRM, with the history tab, you can track all the interactions with a partner such as opportunities, emails, or sales orders issued. From 00a2a259301fe612f8d7247563ff956a3b5f929e Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Fri, 16 Sep 2011 16:45:26 +0530 Subject: [PATCH 02/25] [kanban] id changed and make email and phone italic bzr revid: tta@openerp.com-20110916111526-znb3mc918jfzosw7 --- openerp/addons/base/res/res_partner_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index c47edc57aad..35c31cb0b06 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -106,7 +106,7 @@ - + res.partner.address.kanban res.partner.address kanban @@ -143,9 +143,9 @@ ,
,
- + , - + From 2e35f396065201547bb289a458e9e51e6d343798 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Fri, 16 Sep 2011 17:19:45 +0530 Subject: [PATCH 03/25] [kanban] bold tag removed bzr revid: tta@openerp.com-20110916114945-3zge1h6e6x2ohxnm --- openerp/addons/base/res/res_partner_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 35c31cb0b06..722d11c0770 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -106,7 +106,7 @@
- + res.partner.address.kanban res.partner.address kanban @@ -142,10 +142,10 @@ ,
- ,
- + ,
+ , -
+ From dc54be9bb925f50008907dc657a8a5e8bcb2fcbe Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Fri, 16 Sep 2011 18:17:25 +0530 Subject: [PATCH 04/25] [kabanization],kanban view for the partner bzr revid: amb@tinyerp.com-20110916124725-1d07ph63gx8nv3u1 --- openerp/addons/base/res/res_partner.py | 4 ++ openerp/addons/base/res/res_partner_view.xml | 72 ++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index 4b8f1279787..d88bf8463a4 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -131,12 +131,15 @@ class res_partner(osv.osv): 'customer': fields.boolean('Customer', help="Check this box if the partner is a customer."), 'supplier': fields.boolean('Supplier', help="Check this box if the partner is a supplier. If it's not checked, purchase people will not see it when encoding a purchase order."), 'city': fields.related('address', 'city', type='char', string='City'), + 'function': fields.related('address', 'function', type='char', string='function'), + 'subname': fields.related('address', 'name', type='char', string='Contact Name'), 'phone': fields.related('address', 'phone', type='char', string='Phone'), 'mobile': fields.related('address', 'mobile', type='char', string='Mobile'), 'country': fields.related('address', 'country_id', type='many2one', relation='res.country', string='Country'), 'employee': fields.boolean('Employee', help="Check this box if the partner is an Employee."), 'email': fields.related('address', 'email', type='char', size=240, string='E-mail'), 'company_id': fields.many2one('res.company', 'Company', select=1), + 'color': fields.integer('Color Index'), } def _default_category(self, cr, uid, context={}): @@ -150,6 +153,7 @@ class res_partner(osv.osv): 'address': [{'type': 'default'}], 'category_id': _default_category, 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'res.partner', context=c), + 'color': 0, } def copy(self, cr, uid, id, default={}, context={}): diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 8b26023701d..8f7111bd738 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -353,12 +353,84 @@
+ + + + RES - PARTNER KANBAN + res.partner + kanban + + + + + + + + + + + + + +
+
+ + + + + +
+ + + +
+ +
+
+ + , + +
+
+ + , + +
+
+ + + , + + +
+
+ + +
+ +
+
+ +
+
+
+
+
+
+
Customers ir.actions.act_window res.partner form + kanban {"search_default_customer":1} A customer is an entity you do business with, like a company or an organization. A customer can have several contacts or addresses which are the people working for this company. You can use the history tab, to follow all transactions related to a customer: sales order, emails, opportunities, claims, etc. If you use the email gateway, the Outlook or the Thunderbird plugin, don't forget to register emails to each contact so that the gateway will automatically attach incoming emails to the right partner. From 215d89d1cf6307ef70d6592c8ae21ce384f5a174 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 19 Sep 2011 12:17:08 +0530 Subject: [PATCH 05/25] [IMP]:base:improve kanban view for contacts. bzr revid: apa@tinyerp.com-20110919064708-sg2kltpedp3w0h9u --- openerp/addons/base/res/res_partner_view.xml | 83 +++++++++++--------- 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 722d11c0770..87bc0a4d6e6 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -124,44 +124,57 @@
-
- - - - - -
- -
-
- - - - - -
- - - , -
- ,
- - , - -
-
-
-
- - - - - +
+
+ + + + + +
+ + + +
+
+
+ + + + + +
+ + +
+ + , + +
+
+ + , + +
+
+ + , + +
+
+
+ -
-
From 1f9a9b4d902d93c696936000c5ad405569dcffe1 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 19 Sep 2011 12:51:00 +0530 Subject: [PATCH 06/25] improved bzr revid: apa@tinyerp.com-20110919072100-mypi36z63upp10oq --- openerp/addons/base/res/res_partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 87bc0a4d6e6..c6988ba4c38 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -141,7 +141,7 @@
- +
From 496362b29ab86f603bdf0c2be44e5c7c7ab6d8fc Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 19 Sep 2011 14:29:20 +0530 Subject: [PATCH 07/25] [IMP]:improved kanban view for partners. bzr revid: apa@tinyerp.com-20110919085920-p4o1pam5mrjth29r --- openerp/addons/base/res/res_partner_view.xml | 91 +++++++++++--------- 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 8f7111bd738..221d5c34119 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -369,61 +369,66 @@ - - - -
-
- + + + +
+
+
+
- +
- -
-
- - , - -
-
- - , - -
-
- - - , - - -
-
- - -
- - - - - +
+
+
+ +
+ Customers From ad60a40879c05116fd9a4998e49fa1939569e21d Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 19 Sep 2011 14:47:01 +0530 Subject: [PATCH 08/25] [IMP]:improved bzr revid: apa@tinyerp.com-20110919091701-t4jzmqm4245knacb --- openerp/addons/base/res/res_partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 221d5c34119..efac1a6c603 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -390,7 +390,7 @@ + t-att-data-id="record.get('id')" + t-att-style="view.color_for(record)">
- +
From adbc8dc3b64922e738d959f1a7ecf9885296ae29 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Wed, 21 Sep 2011 16:24:56 +0530 Subject: [PATCH 09/25] [IMP] bzr revid: apa@tinyerp.com-20110921105456-nel4dmqrttjztse2 --- openerp/addons/base/res/res_partner_view.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index efac1a6c603..041fe5f85aa 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -361,14 +361,6 @@ kanban - - - - - - - - From 635519fc7fbdabbe7a566cb4c16663d71abcefe8 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Wed, 21 Sep 2011 16:29:48 +0530 Subject: [PATCH 10/25] [IMP] bzr revid: apa@tinyerp.com-20110921105948-1vimypjfazwe5shx --- openerp/addons/base/res/res_partner_view.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index c6988ba4c38..e671a55c1bc 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -112,14 +112,6 @@ kanban - - - - - - - - From c94872fc0236259e4c5155ab63f5e878f65e4556 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Sun, 25 Sep 2011 20:04:07 +0200 Subject: [PATCH 11/25] [ADD] basic colors support to listview via py.parse bzr revid: xmo@openerp.com-20110925180407-n0asxrrjeb1oo5a4 --- addons/web/__openerp__.py | 1 + addons/web/static/lib/py.parse/lib/py.js | 490 +++++++++++++++++++++++ addons/web/static/src/js/view_list.js | 31 ++ addons/web/static/src/xml/base.xml | 3 +- 4 files changed, 524 insertions(+), 1 deletion(-) create mode 100644 addons/web/static/lib/py.parse/lib/py.js diff --git a/addons/web/__openerp__.py b/addons/web/__openerp__.py index 74633fa4969..37a5d435a75 100644 --- a/addons/web/__openerp__.py +++ b/addons/web/__openerp__.py @@ -24,6 +24,7 @@ "static/lib/underscore/underscore.js", "static/lib/underscore/underscore.string.js", "static/lib/labjs/LAB.src.js", + "static/lib/py.parse/lib/py.js", "static/src/js/boot.js", "static/src/js/core.js", "static/src/js/dates.js", diff --git a/addons/web/static/lib/py.parse/lib/py.js b/addons/web/static/lib/py.parse/lib/py.js new file mode 100644 index 00000000000..d5cf304bb58 --- /dev/null +++ b/addons/web/static/lib/py.parse/lib/py.js @@ -0,0 +1,490 @@ +var py = {}; +(function (exports) { + var NUMBER = /^\d$/, + NAME_FIRST = /^[a-zA-Z_]$/, + NAME = /^[a-zA-Z0-9_]$/; + + var create = function (o, props) { + function F() {}; + F.prototype = o; + var inst = new F; + for(var name in props) { + if(!props.hasOwnProperty(name)) { continue; } + inst[name] = props[name]; + } + return inst; + } + + var symbols = {}; + var comparators = {}; + var Base = { + nud: function () { throw new Error(this.id + " undefined as prefix"); }, + led: function (led) { throw new Error(this.id + " undefined as infix"); }, + toString: function () { + if (this.id === '(constant)' || this.id === '(number)' || this.id === '(name)' || this.id === '(string)') { + return [this.id.slice(0, this.id.length-1), ' ', this.value, ')'].join(''); + } else if (this.id === '(end)') { + return '(end)'; + } else if (this.id === '(comparator)' ) { + var out = ['(comparator', this.expressions[0]]; + for (var i=0;i s.lbp) { + s.lbp = bp; + } + return s; + } + return symbols[id] = create(Base, { + id: id, + lbp: bp + }); + } + function constant(id) { + symbol(id).nud = function () { + this.id = "(constant)"; + this.value = id; + return this; + }; + }; + function prefix(id, bp, nud) { + symbol(id).nud = nud || function () { + this.first = expression(bp); + return this + } + } + function infix(id, bp, led) { + symbol(id, bp).led = led || function (left) { + this.first = left; + this.second = expression(bp); + return this; + } + } + function infixr(id, bp) { + symbol(id, bp).led = function (left) { + this.first = left; + this.second = expression(bp - 1); + return this; + } + } + function comparator(id) { + comparators[id] = true; + var bp = 60; + infix(id, bp, function (left) { + this.id = '(comparator)'; + this.operators = [id]; + this.expressions = [left, expression(bp)]; + while (token.id in comparators) { + this.operators.push(token.id); + advance(); + this.expressions.push( + expression(bp)); + } + return this; + }); + } + + constant('None'); constant('False'); constant('True'); + + symbol('(number)').nud = function () { return this; }; + symbol('(name)').nud = function () { return this; }; + symbol('(string)').nud = function () { return this; }; + symbol('(end)'); + + symbol(':'); symbol(')'); symbol(']'); symbol('}'); symbol(','); + symbol('else'); + + symbol('lambda', 20).nud = function () { + this.first = []; + if (token.id !== ':') { + for(;;) { + if (token.id !== '(name)') { + throw new Error('Excepted an argument name'); + } + this.first.push(token); + advance(); + if (token.id !== ',') { + break; + } + advance(','); + } + } + advance(':'); + this.second = expression(); + return this; + }; + infix('if', 20, function (left) { + this.first = left; + this.second = expression(); + advance('else'); + this.third = expression(); + return this; + }); + + infixr('or', 30); infixr('and', 40); prefix('not', 50); + + comparator('in'); comparator('not in'); + comparator('is'); comparator('is not'); + comparator('<'); comparator('<='); + comparator('>'); comparator('>='); + comparator('<>'); comparator('!='); comparator('=='); + + infix('|', 70); infix('^', 80), infix('&', 90); + + infix('<<', 100); infix('>>', 100); + + infix('+', 110); infix('-', 110); + + infix('*', 120); infix('/', 120); + infix('//', 120), infix('%', 120); + + prefix('-', 130); prefix('+', 130); prefix('~', 130) + + infixr('**', 140); + + infix('.', 150, function (left) { + if (token.id !== '(name)') { + throw new Error('Expected attribute name, got ', token.id); + } + this.first = left; + this.second = token; + advance(); + return this; + }); + symbol('(', 150).nud = function () { + this.first = []; + var comma = false; + if (token.id !== ')') { + while (true) { + if (token.id === ')') { + break; + } + this.first.push(expression()) + if (token.id !== ',') { + break; + } + comma = true; + advance(','); + } + } + advance(')'); + if (!this.first.length || comma) { + return this; + } else { + return this.first[0]; + } + }; + symbol('(').led = function (left) { + this.first = left; + this.second = []; + if (token.id !== ")") { + for(;;) { + this.second.push(expression()); + if (token.id !== ',') { + break; + } + advance(','); + } + } + advance(")"); + return this; + + }; + infix('[', 150, function (left) { + this.first = left + this.second = expression() + advance("]") + return this; + }) + symbol('[').nud = function () { + this.first = []; + if (token.id !== ']') { + for (;;) { + if (token.id === ']') { + break; + } + this.first.push(expression()); + if (token.id !== ',') { + break; + } + advance(','); + } + } + advance(']'); + return this; + }; + + symbol('{').nud = function () { + this.first = []; + if (token.id !== '}') { + for(;;) { + if (token.id === '}') { + break; + } + var key = expression(); + advance(':'); + var value = expression(); + this.first.push([key, value]); + if (token.id !== ',') { + break; + } + advance(','); + } + } + advance('}'); + return this; + }; + + var longops = { + '*': ['*'], + '<': ['<', '=', '>'], + '>': ['=', '>'], + '!': ['='], + '=': ['='], + '/': ['/'] + } + function Tokenizer(str) { + this.states = ['initial']; + this.tokens = []; + } + Tokenizer.prototype = { + builder: function (empty) { + var key = this.states[0] + '_builder'; + if (empty) { + var value = this[key]; + delete this[key]; + return value; + } else { + return this[key] = this[key] || []; + } + }, + simple: function (type) { + this.tokens.push({type: type}); + }, + push: function (new_state) { + this.states.push(new_state); + }, + pop: function () { + this.states.pop(); + }, + + feed: function (str, index) { + var s = this.states; + return this[s[s.length - 1]](str, index); + }, + + initial: function (str, index) { + var character = str[index]; + + if (character in longops) { + var follow = longops[character]; + for(var i=0, len=follow.length; i> at index " + index + + ", character [[" + character + "]]" + + "; parsed so far: " + this.tokens); + }, + string: function (str, index) { + var character = str[index]; + if (character === '"' || character === "'") { + this.tokens.push(create(symbols['(string)'], { + value: this.builder(true).join('') + })); + this.pop(); + return index + 1; + } + this.builder().push(character); + return index + 1; + }, + number: function (str, index) { + var character = str[index]; + if (!NUMBER.test(character)) { + this.tokens.push(create(symbols['(number)'], { + value: parseFloat(this.builder(true).join('')) + })); + this.pop(); + return index; + } + this.builder().push(character); + return index + 1; + }, + name: function (str, index) { + var character = str[index]; + if (!NAME.test(character)) { + var name = this.builder(true).join(''); + var symbol = symbols[name]; + if (symbol) { + if (name === 'in' && this.tokens[this.tokens.length-1].id === 'not') { + symbol = symbols['not in']; + this.tokens.pop(); + } else if (name === 'not' && this.tokens[this.tokens.length-1].id === 'is') { + symbol = symbols['is not']; + this.tokens.pop(); + } + this.tokens.push(create(symbol)); + } else { + this.tokens.push(create(symbols['(name)'], { + value: name + })); + } + this.pop(); + return index; + } + this.builder().push(character); + return index + 1; + } + } + + exports.tokenize = function tokenize(str) { + var index = 0, + str = str + '\0', + tokenizer = new Tokenizer(str); + do { + index = tokenizer.feed(str, index); + } while (index !== str.length) + return tokenizer.tokens; + } + + var token, next; + function expression(rbp) { + rbp = rbp || 0; + var t = token; + token = next(); + var left = t.nud(); + while (rbp < token.lbp) { + t = token; + token = next(); + left = t.led(left); + } + return left; + } + function advance(id) { + if (id && token.id !== id) { + throw new Error( + 'Expected "' + id + '", got "' + token.id + '"'); + } + token = next(); + } + + exports.object = create({}, {}); + exports.tuple = create(exports.object, { + __contains__: function (value) { + for(var i=0, len=this.values.length; i': return a > b; + case '>=': return a >= b; + case 'in': return b.__contains__(a); + case 'not in': return !b.__contains__(a); + } + throw new Error('SyntaxError: unknown comparator [[' + operator + ']]'); + } + exports.evaluate = function (expr, context) { + switch (expr.id) { + case '(name)': + var val = context[expr.value]; + if (val === undefined) { + throw new Error("NameError: name '" + expr.value + "' is not defined"); + } + return val; + case '(string)': + case '(number)': + return expr.value; + case '(comparator)': + var result, left = exports.evaluate(expr.expressions[0], context); + for(var i=0; i
From 3c7093aa6e33fa21f06a90383e13c1fc2ebdde2a Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 29 Sep 2011 12:28:32 +0200 Subject: [PATCH 12/25] [imp] synch with client lib bzr revid: nicolas.vanhoren@openerp.com-20110929102832-j3sdi29poe48vq2o --- addons/web/common/openerplib/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/common/openerplib/main.py b/addons/web/common/openerplib/main.py index 53ced4a93d7..ffe7d3c2d8b 100644 --- a/addons/web/common/openerplib/main.py +++ b/addons/web/common/openerplib/main.py @@ -368,7 +368,7 @@ class Model(object): index = {} for r in result: index[r['id']] = r - result = [index[x] for x in args[0]] + result = [index[x] for x in args[0] if x in index] self.__logger.debug('result: %r', result) return result return proxy From a658311000e9ad5a7d078a562da3a9e716f2d4f3 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 29 Sep 2011 14:17:32 +0200 Subject: [PATCH 13/25] [imp] now uses a global connector for connection to OpenERP server bzr revid: nicolas.vanhoren@openerp.com-20110929121732-xydsj26xw9fyn1hr --- addons/web/common/dispatch.py | 7 +++++++ addons/web/common/openerplib/main.py | 10 +++++++++- addons/web/common/session.py | 10 ++++------ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/addons/web/common/dispatch.py b/addons/web/common/dispatch.py index 7a293c8228b..57e45fa594e 100644 --- a/addons/web/common/dispatch.py +++ b/addons/web/common/dispatch.py @@ -311,6 +311,13 @@ class Root(object): def __init__(self, options): self.root = werkzeug.urls.Href('/web/webclient/home') self.config = options + + if self.config.backend == 'local': + conn = openerplib.get_connector(protocol='local') + else: + conn = openerplib.get_connector(hostname=self.config.server_host, + port=self.config.server_port) + self.config.connector = conn self.session_cookie = 'sessionid' self.addons = {} diff --git a/addons/web/common/openerplib/main.py b/addons/web/common/openerplib/main.py index ffe7d3c2d8b..b09e9f9d72f 100644 --- a/addons/web/common/openerplib/main.py +++ b/addons/web/common/openerplib/main.py @@ -71,6 +71,14 @@ class Connector(object): self.hostname = hostname self.port = port + def get_service(self, service_name): + """ + Returns a Service instance to allow easy manipulation of one of the services offered by the remote server. + + :param service_name: The name of the service. + """ + return Service(self, service_name) + class XmlRPCConnector(Connector): """ A type of connector that uses the XMLRPC protocol. @@ -321,7 +329,7 @@ class Connection(object): :param service_name: The name of the service. """ - return Service(self.connector, service_name) + return self.connector.get_service(service_name) class AuthenticationError(Exception): """ diff --git a/addons/web/common/session.py b/addons/web/common/session.py index c06763bebe2..d4265851acc 100644 --- a/addons/web/common/session.py +++ b/addons/web/common/session.py @@ -5,6 +5,9 @@ import time import openerplib import nonliterals + +import logging +_logger = logging.getLogger(__name__) #---------------------------------------------------------- # OpenERPSession RPC openerp backend access #---------------------------------------------------------- @@ -41,12 +44,7 @@ class OpenERPSession(object): self.client_timezone = False def build_connection(self): - if self.config.backend == 'local': - conn = openerplib.get_connection(protocol='local', database=self._db, - login=self._login, user_id=self._uid, password=self._password) - else: - conn = openerplib.get_connection(hostname=self.config.server_host, - port=self.config.server_port, database=self._db, login=self._login, + conn = openerplib.Connection(self.config.connector, database=self._db, login=self._login, user_id=self._uid, password=self._password) return conn From 22b1bb8abb0cb7148d0cbeadea1fe0aba2e11f97 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 29 Sep 2011 15:07:01 +0200 Subject: [PATCH 14/25] [FIX] do not remove 'multi=True' actions in fields_view_get for tree view fields_view_get removed multi=True actions from the result of ir_values.get_actions('client_action_multi', ...), so that multi actions would not be displayed in the form view's sidebar in the GTK client. The web client has a sidebar in both cases, the GTK client just ignores 'toolbar' key if not in tree view, so don't remove 'multi' actions in tree view toolbar, to avoid having to perform one more RPC call (explicit ir_values.get) in web client. lp bug: https://launchpad.net/bugs/856378 fixed bzr revid: xmo@openerp.com-20110929130701-65ubx1o0swk889nl --- openerp/osv/orm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 5a18b893910..7e3ffa7fcb0 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -2069,8 +2069,9 @@ class BaseModel(object): context) resprint = map(clean, resprint) resaction = map(clean, resaction) - resaction = filter(lambda x: not x.get('multi', False), resaction) - resprint = filter(lambda x: not x.get('multi', False), resprint) + if view_type != 'tree': + resaction = filter(lambda x: not x.get('multi'), resaction) + resprint = filter(lambda x: not x.get('multi'), resprint) resrelate = map(lambda x: x[2], resrelate) for x in resprint + resaction + resrelate: From d32d0c5637e0b7d85c97278e4479d4e5f8ff1d69 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 29 Sep 2011 15:54:49 +0200 Subject: [PATCH 15/25] [IMP] update py.parse to 0.2 bzr revid: xmo@openerp.com-20110929135449-ssommvnyof6auy29 --- .../web/static/lib/py.parse/.hg_archival.txt | 5 + addons/web/static/lib/py.parse/README | 1 + addons/web/static/lib/py.parse/TODO.rst | 14 +++ addons/web/static/lib/py.parse/lib/py.js | 116 +++++++++++++----- addons/web/static/lib/py.parse/test/test.js | 90 ++++++++++++++ 5 files changed, 196 insertions(+), 30 deletions(-) create mode 100644 addons/web/static/lib/py.parse/.hg_archival.txt create mode 100644 addons/web/static/lib/py.parse/README create mode 100644 addons/web/static/lib/py.parse/TODO.rst create mode 100644 addons/web/static/lib/py.parse/test/test.js diff --git a/addons/web/static/lib/py.parse/.hg_archival.txt b/addons/web/static/lib/py.parse/.hg_archival.txt new file mode 100644 index 00000000000..43d5d80a9e4 --- /dev/null +++ b/addons/web/static/lib/py.parse/.hg_archival.txt @@ -0,0 +1,5 @@ +repo: 076b192d0d8ab2b92d1dbcfa3da055382f30eaea +node: 87fb1b67d6a13f10a1a328104ee4d4b2c36801ec +branch: default +latesttag: 0.2 +latesttagdistance: 1 diff --git a/addons/web/static/lib/py.parse/README b/addons/web/static/lib/py.parse/README new file mode 100644 index 00000000000..453f001ee15 --- /dev/null +++ b/addons/web/static/lib/py.parse/README @@ -0,0 +1 @@ +Parser and evaluator of Python expressions diff --git a/addons/web/static/lib/py.parse/TODO.rst b/addons/web/static/lib/py.parse/TODO.rst new file mode 100644 index 00000000000..3638b681ddc --- /dev/null +++ b/addons/web/static/lib/py.parse/TODO.rst @@ -0,0 +1,14 @@ +* Parser + since parsing expressions, try with a pratt parser + http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/ + http://effbot.org/zone/simple-top-down-parsing.htm + +Evaluator +--------- + +* Stop busyworking trivial binary operator +* Make it *trivial* to build Python type-wrappers +* Implement Python's `data model + protocols`_ + for *all* supported operations, optimizations can come later +* Automatically type-wrap everything (for now anyway) diff --git a/addons/web/static/lib/py.parse/lib/py.js b/addons/web/static/lib/py.parse/lib/py.js index d5cf304bb58..0f2415f1252 100644 --- a/addons/web/static/lib/py.parse/lib/py.js +++ b/addons/web/static/lib/py.parse/lib/py.js @@ -5,7 +5,7 @@ var py = {}; NAME = /^[a-zA-Z0-9_]$/; var create = function (o, props) { - function F() {}; + function F() {} F.prototype = o; var inst = new F; for(var name in props) { @@ -13,7 +13,7 @@ var py = {}; inst[name] = props[name]; } return inst; - } + }; var symbols = {}; var comparators = {}; @@ -26,17 +26,17 @@ var py = {}; } else if (this.id === '(end)') { return '(end)'; } else if (this.id === '(comparator)' ) { - var out = ['(comparator', this.expressions[0]]; + var repr = ['(comparator', this.expressions[0]]; for (var i=0;i': return a > b; case '>=': return a >= b; - case 'in': return b.__contains__(a); - case 'not in': return !b.__contains__(a); + case 'in': + if (typeof b === 'string') { + return b.indexOf(a) !== -1; + } + return b.__contains__(a); + case 'not in': + if (typeof b === 'string') { + return b.indexOf(a) === -1; + } + return !b.__contains__(a); } throw new Error('SyntaxError: unknown comparator [[' + operator + ']]'); - } + }; exports.evaluate = function (expr, context) { switch (expr.id) { case '(name)': @@ -444,6 +463,14 @@ var py = {}; case '(string)': case '(number)': return expr.value; + case '(constant)': + if (expr.value === 'None') + return null; + else if (expr.value === 'False') + return false; + else if (expr.value === 'True') + return true; + throw new Error("SyntaxError: unknown constant '" + expr.value + "'"); case '(comparator)': var result, left = exports.evaluate(expr.expressions[0], context); for(var i=0; i= 3')); +assert.ok(py.eval('3 >= 3')); +assert.ok(!py.eval('5 < 3')); +assert.ok(py.eval('1 < 3 < 5')); +assert.ok(py.eval('5 > 3 > 1')); +assert.ok(py.eval('1 < 3 > 2 == 2 > -2 not in (0, 1, 2)')); +// string rich comparisons +assert.ok(py.eval( + 'date >= current', {date: '2010-06-08', current: '2010-06-05'})); + +// Boolean operators +assert.ok(py.eval( + "foo == 'foo' or foo == 'bar'", {foo: 'bar'})); +assert.ok(py.eval( + "foo == 'foo' and bar == 'bar'", {foo: 'foo', bar: 'bar'})); +// - lazyness, second clauses NameError if not short-circuited +assert.ok(py.eval( + "foo == 'foo' or bar == 'bar'", {foo: 'foo'})); +assert.ok(!py.eval( + "foo == 'foo' and bar == 'bar'", {foo: 'bar'})); + +// contains (in) +assert.ok(py.eval( + "foo in ('foo', 'bar')", {foo: 'bar'})); +assert.ok(py.eval('1 in (1, 2, 3, 4)')); +assert.ok(!py.eval('1 in (2, 3, 4)')); +assert.ok(py.eval('type in ("url",)', {type: 'url'})); +assert.ok(!py.eval('type in ("url",)', {type: 'ur'})); +assert.ok(py.eval('1 not in (2, 3, 4)')); +assert.ok(py.eval('type not in ("url",)', {type: 'ur'})); + +assert.ok(py.eval( + "foo in ['foo', 'bar']", {foo: 'bar'})); +// string contains +assert.ok(py.eval('type in "view"', {type: 'view'})); +assert.ok(!py.eval('type in "view"', {type: 'bob'})); +assert.ok(py.eval('type in "url"', {type: 'ur'})); + +// Literals +assert.strictEqual(py.eval('False'), false); +assert.strictEqual(py.eval('True'), true); +assert.strictEqual(py.eval('None'), null); +assert.ok(py.eval('foo == False', {foo: false})); +assert.ok(!py.eval('foo == False', {foo: true})); + +// conversions +assert.strictEqual( + py.eval('bool(date_deadline)', {bool: py.bool, date_deadline: '2008'}), + true); + +// getattr +assert.ok(py.eval('foo.bar', {foo: {bar: true}})); +assert.ok(!py.eval('foo.bar', {foo: {bar: false}})); + +// complex expressions +assert.ok(py.eval( + "state=='pending' and not(date_deadline and (date_deadline < current_date))", + {state: 'pending', date_deadline: false})); +assert.ok(py.eval( + "state=='pending' and not(date_deadline and (date_deadline < current_date))", + {state: 'pending', date_deadline: '2010-05-08', current_date: '2010-05-08'}));; From 8dbbacca082f0f2c3355971527c2addd677cecae Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 29 Sep 2011 16:15:56 +0200 Subject: [PATCH 16/25] [imp] improved logging, now blacklist openerplib bzr revid: nicolas.vanhoren@openerp.com-20110929141556-j92hlk7j2ahx8i70 --- .bzrignore | 1 - logging.json | 27 +++++++++++++++++++++++++++ openerp-web.py | 12 ++++++++---- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 logging.json diff --git a/.bzrignore b/.bzrignore index 7ae985ce4df..b83a43bf1d4 100644 --- a/.bzrignore +++ b/.bzrignore @@ -9,4 +9,3 @@ RE:^include/ RE:^share/ RE:^man/ RE:^lib/ -logging.cfg diff --git a/logging.json b/logging.json new file mode 100644 index 00000000000..36b2952a6ec --- /dev/null +++ b/logging.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "formatters": { + "simple": { + "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + } + }, + "handlers": { + "console": { + "class": "logging.StreamHandler", + "level": "DEBUG", + "formatter": "simple", + "stream": "ext://sys.stdout" + } + }, + "loggers": { + "web": { + }, + "web.common.openerplib": { + "level": "INFO" + } + }, + "root": { + "level": "DEBUG", + "handlers": ["console"] + } +} diff --git a/openerp-web.py b/openerp-web.py index 928a62e4528..e167568cdab 100755 --- a/openerp-web.py +++ b/openerp-web.py @@ -2,6 +2,7 @@ import optparse import os import sys +import json import tempfile import logging import logging.config @@ -48,7 +49,7 @@ logging_opts = optparse.OptionGroup(optparser, "Logging") logging_opts.add_option("--log-level", dest="log_level", type="choice", default='debug', help="Global logging level", metavar="LOG_LEVEL", choices=['debug', 'info', 'warning', 'error', 'critical']) -logging_opts.add_option("--log-config", dest="log_config", +logging_opts.add_option("--log-config", dest="log_config", default=os.path.join(os.path.dirname(__file__), "logging.json"), help="Logging configuration file", metavar="FILE") optparser.add_option_group(logging_opts) @@ -60,10 +61,13 @@ if __name__ == "__main__": os.environ["TZ"] = "UTC" - if not options.log_config: - logging.basicConfig(level=getattr(logging, options.log_level.upper())) + if sys.version_info >= (2, 7): + with open(options.log_config) as file: + dct = json.load(file) + logging.config.dictConfig(dct) + logging.getLogger("").setLevel(getattr(logging, options.log_level.upper())) else: - logging.config.fileConfig(options.log_config) + logging.basicConfig(level=getattr(logging, options.log_level.upper())) app = web.common.dispatch.Root(options) From d793d6c1aeddc4c7f79d22cc7f1c8a12533e70e6 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 29 Sep 2011 16:24:10 +0200 Subject: [PATCH 17/25] [ADD] atom context keys (uid and current_date) to evaluation context of row colors bzr revid: xmo@openerp.com-20110929142410-1f9btd6f3ws0srpj --- addons/web/static/src/js/view_list.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index cb8637ff0a4..144e0309c16 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -142,11 +142,16 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# */ color_for: function (record) { if (!this.colors) { return ''; } + var context = _.extend({}, record.attributes, { + uid: this.session.uid, + current_date: new Date().toString('yyyy-MM-dd') + // TODO: time, datetime, relativedelta + }); for(var i=0, len=this.colors.length; i Date: Thu, 29 Sep 2011 16:29:19 +0200 Subject: [PATCH 18/25] [imp] changed logging to be like server bzr revid: nicolas.vanhoren@openerp.com-20110929142919-v8pzr4zpy984e5qc --- logging.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging.json b/logging.json index 36b2952a6ec..1f982a6d4d0 100644 --- a/logging.json +++ b/logging.json @@ -2,7 +2,7 @@ "version": 1, "formatters": { "simple": { - "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + "format": "[%(asctime)s] %(levelname)s:%(name)s:%(message)s" } }, "handlers": { From ba86faac47ac3489e6db87265a4bd0ca6e576ca6 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 29 Sep 2011 16:50:31 +0200 Subject: [PATCH 19/25] [IMP] shave ~190ms off of *big* listview rendering speed make conversion of internal Records to form-shape faster by iterating over the attributes object directly instead of using _.each bzr revid: xmo@openerp.com-20110929145031-q7mqf43gza94ekj6 --- addons/web/static/src/js/view_list.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 144e0309c16..12711e8b2fe 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -1391,10 +1391,10 @@ var Record = openerp.web.Class.extend(/** @lends Record# */{ * @returns {Object} record displayable in a form view */ toForm: function () { - var form_data = {}; - _(this.attributes).each(function (value, key) { - form_data[key] = {value: value}; - }); + var form_data = {}, attrs = this.attributes; + for(var k in attrs) { + form_data[k] = {value: attrs[k]}; + } return {data: form_data}; } From 5c2d8e4cdc9a92187891a8476de28dcc8ae4b6f5 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 29 Sep 2011 16:57:51 +0200 Subject: [PATCH 20/25] [fix] problem in database when creating a new database bzr revid: nicolas.vanhoren@openerp.com-20110929145751-4oh0b9uqll8wx3zj --- addons/web/static/src/js/chrome.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index e6a850cd799..1955298ba27 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1,7 +1,6 @@ /*--------------------------------------------------------- * OpenERP Web chrome *---------------------------------------------------------*/ - openerp.web.chrome = function(openerp) { var QWeb = openerp.web.qweb; @@ -300,9 +299,9 @@ openerp.web.Database = openerp.web.Widget.extend(/** @lends openerp.web.Database var admin = result[1][0]; setTimeout(function () { - self.stop(); self.widget_parent.do_login( info.db, admin.login, admin.password); + self.stop(); $.unblockUI(); }); }); From 58ece9f856f2d8e0ae1495b780afec5fd354e52a Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 29 Sep 2011 17:13:22 +0200 Subject: [PATCH 21/25] [fix] error message when login invalid broken bzr revid: nicolas.vanhoren@openerp.com-20110929151322-zcymbsemo962ky0j --- addons/web/static/src/css/base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index c75fe786543..8c99823434c 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -125,7 +125,7 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio margin-top: 5px; text-align: center; } -.openerp .login.login_invalid .login_error_message { +.openerp .login .login_invalid .login_error_message { display: block; } From eb92957c8c25b2c8a092fa996970aba795a8c0fd Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 29 Sep 2011 17:40:07 +0200 Subject: [PATCH 22/25] [fix] obvious bug, field used in a on_change but not declared in the view bzr revid: nicolas.vanhoren@openerp.com-20110929154007-gtxf31frsuukepvf --- addons/account_voucher/voucher_payment_receipt_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 6a9e69ab27e..9c8bdffb35d 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -280,6 +280,7 @@
+ Date: Fri, 30 Sep 2011 00:23:47 +0200 Subject: [PATCH 23/25] [IMP] audittrail cleanup and speedup - test for auditrail before anything else - dont allocate a different cursor bzr revid: al@openerp.com-20110929222347-c2ywh8nwhl27d9uv --- addons/audittrail/audittrail.py | 154 +++++++------------------------- 1 file changed, 34 insertions(+), 120 deletions(-) diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 4eded2f299d..80af2e7ea3a 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -123,9 +123,6 @@ class audittrail_rule(osv.osv): #End Loop return True -audittrail_rule() - - class audittrail_log(osv.osv): """ For Audittrail Log @@ -161,9 +158,6 @@ class audittrail_log(osv.osv): } _order = "timestamp desc" -audittrail_log() - - class audittrail_log_line(osv.osv): """ Audittrail Log Line. @@ -181,9 +175,6 @@ class audittrail_log_line(osv.osv): 'field_description': fields.char('Field Description', size=64), } -audittrail_log_line() - - class audittrail_objects_proxy(object_proxy): """ Uses Object proxy for auditing changes on object of subscribed Rules""" @@ -289,8 +280,7 @@ class audittrail_objects_proxy(object_proxy): #End Loop return True - - def log_fct(self, db, uid, model, method, fct_src, *args): + def log_fct(self, cr, uid, model, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @@ -304,8 +294,7 @@ class audittrail_objects_proxy(object_proxy): uid_orig = uid uid = 1 res2 = args - pool = pooler.get_pool(db) - cr = pooler.get_db(db).cursor() + pool = pooler.get_pool(cr.dbname) resource_pool = pool.get(model) log_pool = pool.get('audittrail.log') model_pool = pool.get('ir.model') @@ -316,8 +305,7 @@ class audittrail_objects_proxy(object_proxy): model = model_pool.browse(cr, uid, model_id) if method in ('create'): - res_id = fct_src(db, uid_orig, model.model, method, *args) - cr.commit() + res_id = fct_src(cr, uid_orig, model.model, method, *args) resource = resource_pool.read(cr, uid, res_id, args[0].keys()) vals = { "method": method, @@ -338,14 +326,12 @@ class audittrail_objects_proxy(object_proxy): lines.append(line) self.create_log_line(cr, uid, log_id, model, lines) - cr.commit() - cr.close() return res_id elif method in ('read'): res_ids = args[0] old_values = {} - res = fct_src(db, uid_orig, model.model, method, *args) + res = fct_src(cr, uid_orig, model.model, method, *args) if type(res) == list: for v in res: old_values[v['id']] = v @@ -370,8 +356,6 @@ class audittrail_objects_proxy(object_proxy): lines.append(line) self.create_log_line(cr, uid, log_id, model, lines) - cr.commit() - cr.close() return res elif method in ('unlink'): @@ -401,9 +385,7 @@ class audittrail_objects_proxy(object_proxy): lines.append(line) self.create_log_line(cr, uid, log_id, model, lines) - res = fct_src(db, uid_orig, model.model, method, *args) - cr.commit() - cr.close() + res = fct_src(cr, uid_orig, model.model, method, *args) return res else: res_ids = [] @@ -428,8 +410,7 @@ class audittrail_objects_proxy(object_proxy): old_values_text[field] = self.get_value_text(cr, uid, field, resource[field], model) old_values[resource_id] = {'text':old_values_text, 'value': old_value} - res = fct_src(db, uid_orig, model.model, method, *args) - cr.commit() + res = fct_src(cr, uid_orig, model.model, method, *args) if res_ids: for resource in resource_pool.read(cr, uid, res_ids): @@ -457,107 +438,40 @@ class audittrail_objects_proxy(object_proxy): lines.append(line) self.create_log_line(cr, uid, log_id, model, lines) - cr.commit() - cr.close() return res return True - - - def execute(self, db, uid, model, method, *args, **kw): - """ - Overrides Object Proxy execute method - @param db: the current database - @param uid: the current user's ID for security checks, - @param object: Object who's values are being changed - @param method: get any method and create log - - @return: Returns result as per method of Object proxy - """ - uid_orig = uid - uid = 1 - pool = pooler.get_pool(db) - model_pool = pool.get('ir.model') - rule_pool = pool.get('audittrail.rule') - cr = pooler.get_db(db).cursor() - cr.autocommit(True) - logged_uids = [] - fct_src = super(audittrail_objects_proxy, self).execute - - def my_fct(db, uid, model, method, *args): - rule = False - model_ids = model_pool.search(cr, uid, [('model', '=', model)]) + def check_rules(self, cr, uid, model, method): + pool = pooler.get_pool(cr.dbname) + # Check if auditrails is installed for that db and then if one rule match + if 'audittrail.rule' in pool.models: + model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', model)]) model_id = model_ids and model_ids[0] or False + if model_id: + rule_ids = pool.get('audittrail.rule').search(cr, 1, [('object_id', '=', model_id), ('state', '=', 'subscribed')]) + for rule in pool.get('audittrail.rule').read(cr, 1, rule_ids, ['user_id','log_read','log_write','log_create','log_unlink','log_action','log_workflow']): + if len(rule['user_id'])==0 or uid in rule['user_id']: + if rule.get('log_'+method,0): + return True + elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'): + if rule['log_action']: + return True - for model_name in pool.obj_list(): - if model_name == 'audittrail.rule': - rule = True - if not rule: - return fct_src(db, uid_orig, model, method, *args) - if not model_id: - return fct_src(db, uid_orig, model, method, *args) + def execute_cr(self, cr, uid, model, method, *args, **kw): + fct_src = super(audittrail_objects_proxy, self).execute_cr + if self.check_rules(cr,uid,model,method): + res = self.log_fct(cr, uid, model, method, fct_src, *args) + else: + res = fct_src(cr, uid, model, method, *args) + return res - rule_ids = rule_pool.search(cr, uid, [('object_id', '=', model_id), ('state', '=', 'subscribed')]) - if not rule_ids: - return fct_src(db, uid_orig, model, method, *args) - - for thisrule in rule_pool.browse(cr, uid, rule_ids): - for user in thisrule.user_id: - logged_uids.append(user.id) - if not logged_uids or uid in logged_uids: - if method in ('read', 'write', 'create', 'unlink'): - if getattr(thisrule, 'log_' + method): - return self.log_fct(db, uid_orig, model, method, fct_src, *args) - - elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'): - if thisrule.log_action: - return self.log_fct(db, uid_orig, model, method, fct_src, *args) - - return fct_src(db, uid_orig, model, method, *args) - try: - res = my_fct(db, uid, model, method, *args) - return res - finally: - cr.close() - - def exec_workflow(self, db, uid, model, method, *args, **argv): - uid_orig = uid - uid = 1 - - pool = pooler.get_pool(db) - logged_uids = [] - fct_src = super(audittrail_objects_proxy, self).exec_workflow - field = method - rule = False - model_pool = pool.get('ir.model') - rule_pool = pool.get('audittrail.rule') - cr = pooler.get_db(db).cursor() - cr.autocommit(True) - try: - model_ids = model_pool.search(cr, uid, [('model', '=', model)]) - for obj_name in pool.obj_list(): - if obj_name == 'audittrail.rule': - rule = True - if not rule: - return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv) - if not model_ids: - return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv) - - rule_ids = rule_pool.search(cr, uid, [('object_id', 'in', model_ids), ('state', '=', 'subscribed')]) - if not rule_ids: - return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv) - - for thisrule in rule_pool.browse(cr, uid, rule_ids): - for user in thisrule.user_id: - logged_uids.append(user.id) - if not logged_uids or uid in logged_uids: - if thisrule.log_workflow: - return self.log_fct(db, uid_orig, model, method, fct_src, *args) - return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv) - - return True - finally: - cr.close() + def exec_workflow_cr(self, cr, uid, model, method, *args, **argv): + fct_src = super(audittrail_objects_proxy, self).exec_workflow_cr + if self.check_rules(cr,uid,model,'workflow'): + res = self.log_fct(cr, uid, model, method, fct_src, *args) + else: + res = fct_src(cr, uid, model, method, *args) + return res audittrail_objects_proxy() From 46d3f7e42c915d10349b1118ce1e648330bcf8c6 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Fri, 30 Sep 2011 00:49:19 +0200 Subject: [PATCH 24/25] [FIX] osv object_proxy to use new style class bzr revid: al@openerp.com-20110929224919-uacfp8w53jfqikkj --- openerp/osv/osv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/osv.py b/openerp/osv/osv.py index 821c52a55ef..0e27e71d475 100644 --- a/openerp/osv/osv.py +++ b/openerp/osv/osv.py @@ -39,7 +39,7 @@ except_osv = openerp.exceptions.Warning service = None -class object_proxy(): +class object_proxy(object): def __init__(self): self.logger = logging.getLogger('web-services') global service From 8507f7cc4a446da13a83abf5ff711a730bc60e8c Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Fri, 30 Sep 2011 04:40:48 +0000 Subject: [PATCH 25/25] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110930043724-cv7w2vcqt7soa9gc bzr revid: launchpad_translations_on_behalf_of_openerp-20110930044048-j5gv3hmo9cj3dhyg --- addons/account/i18n/et.po | 200 ++++++++++++++++-------------- openerp/addons/base/i18n/zh_TW.po | 8 +- 2 files changed, 108 insertions(+), 100 deletions(-) diff --git a/addons/account/i18n/et.po b/addons/account/i18n/et.po index 6c6a6385ec9..b671a24e720 100644 --- a/addons/account/i18n/et.po +++ b/addons/account/i18n/et.po @@ -7,24 +7,24 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2010-12-12 00:12+0000\n" -"Last-Translator: qdp (OpenERP) \n" +"PO-Revision-Date: 2011-09-28 14:57+0000\n" +"Last-Translator: Raiko Pajur \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: 2011-09-17 04:56+0000\n" -"X-Generator: Launchpad (build 13955)\n" +"X-Launchpad-Export-Date: 2011-09-30 04:40+0000\n" +"X-Generator: Launchpad (build 14071)\n" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 msgid "System payment" -msgstr "" +msgstr "Süsteemi maksed" #. module: account #: view:account.journal:0 msgid "Other Configuration" -msgstr "" +msgstr "Muud konfiguratsioonid" #. module: account #: code:addons/account/wizard/account_open_closed_fiscalyear.py:40 @@ -39,6 +39,8 @@ msgid "" "You cannot remove/deactivate an account which is set as a property to any " "Partner." msgstr "" +"Sa ei saa kustutada / desaktiveerida kontot, mis on määratud mis tahes " +"\"Partner\" varaks." #. module: account #: view:account.move.reconcile:0 @@ -48,7 +50,7 @@ msgstr "" #. module: account #: field:account.installer.modules,account_voucher:0 msgid "Voucher Management" -msgstr "" +msgstr "Voucheri juhtimine" #. module: account #: view:account.account:0 @@ -133,13 +135,13 @@ msgstr "Raamatupidamise kirjed-" #: code:addons/account/account.py:1291 #, python-format msgid "You can not delete posted movement: \"%s\"!" -msgstr "" +msgstr "Sa ei saa kustutada postitatud liikumist: \"%s\"!" #. module: account #: report:account.invoice:0 #: field:account.invoice.line,origin:0 msgid "Origin" -msgstr "Päritolu" +msgstr "Allikas" #. module: account #: view:account.account:0 @@ -164,7 +166,7 @@ msgstr "Viide" #. module: account #: view:account.open.closed.fiscalyear:0 msgid "Choose Fiscal Year " -msgstr "" +msgstr "Vali eelarveaasta " #. module: account #: help:account.payment.term,active:0 @@ -172,12 +174,14 @@ msgid "" "If the active field is set to False, it will allow you to hide the payment " "term without removing it." msgstr "" +"Kui aktiivne ala on väärne ( False ), siis see võimaldab teil peita/varjata " +"maksetähtaeg seda kustutamata." #. module: account #: code:addons/account/invoice.py:1421 #, python-format msgid "Warning!" -msgstr "" +msgstr "Hoiatus!" #. module: account #: field:account.fiscal.position.account,account_src_id:0 @@ -204,7 +208,7 @@ msgstr "Negatiivne" #: code:addons/account/wizard/account_move_journal.py:95 #, python-format msgid "Journal: %s" -msgstr "" +msgstr "Päevik: %s" #. module: account #: help:account.analytic.journal,type:0 @@ -231,7 +235,7 @@ msgstr "konto.maks" msgid "" "No period defined for this date: %s !\n" "Please create a fiscal year." -msgstr "" +msgstr "Periood ei ole defineeritud sellele kuupäevale: %s" #. module: account #: model:ir.model,name:account.model_account_move_line_reconcile_select @@ -259,7 +263,7 @@ msgstr "" #: code:addons/account/invoice.py:1210 #, python-format msgid "Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)" -msgstr "" +msgstr "Arve '%s' on makstud osaliselt: %s%s on tasutud %s%s (%s%s maksmata)" #. module: account #: model:process.transition,note:account.process_transition_supplierentriesreconcile0 @@ -280,7 +284,7 @@ msgstr "Teie ei saa lisada/muuta suletud päeviku kirjeid." #. module: account #: view:account.bank.statement:0 msgid "Calculated Balance" -msgstr "" +msgstr "Välja arvutatud tasakaal (Calculated Balance)" #. module: account #: model:ir.actions.act_window,name:account.action_account_use_model_create_entry @@ -352,7 +356,7 @@ msgstr "Ostu omadused" #: view:account.installer:0 #: view:account.installer.modules:0 msgid "Configure" -msgstr "" +msgstr "Seadista" #. module: account #: selection:account.entries.report,month:0 @@ -361,7 +365,7 @@ msgstr "" #: selection:report.account.sales,month:0 #: selection:report.account_type.sales,month:0 msgid "June" -msgstr "" +msgstr "Juuni" #. module: account #: model:ir.actions.act_window,help:account.action_account_moves_bank @@ -395,12 +399,12 @@ msgstr "" #. module: account #: selection:account.journal,type:0 msgid "Opening/Closing Situation" -msgstr "" +msgstr "Avamise/Sulgemise situatsioon" #. module: account #: help:account.journal,currency:0 msgid "The currency used to enter statement" -msgstr "" +msgstr "Valuuta väite sisestamiseks" #. module: account #: field:account.open.closed.fiscalyear,fyear_id:0 @@ -498,17 +502,17 @@ msgstr "Päevik" #. module: account #: model:ir.model,name:account.model_account_invoice_confirm msgid "Confirm the selected invoices" -msgstr "" +msgstr "Kinnita valitud arved" #. module: account #: field:account.addtmpl.wizard,cparent_id:0 msgid "Parent target" -msgstr "" +msgstr "Lapsevanema sihtmärk" #. module: account #: field:account.bank.statement,account_id:0 msgid "Account used in this journal" -msgstr "" +msgstr "Konto kasutatud selles arveraamatus" #. module: account #: help:account.aged.trial.balance,chart_account_id:0 @@ -527,7 +531,7 @@ msgstr "" #: help:account.report.general.ledger,chart_account_id:0 #: help:account.vat.declaration,chart_account_id:0 msgid "Select Charts of Accounts" -msgstr "" +msgstr "Vali Kontode graafikud" #. module: account #: view:product.product:0 @@ -537,7 +541,7 @@ msgstr "Ostumaksud" #. module: account #: model:ir.model,name:account.model_account_invoice_refund msgid "Invoice Refund" -msgstr "" +msgstr "Arveraamatu tagasimakse" #. module: account #: report:account.overdue:0 @@ -560,7 +564,7 @@ msgstr "" #: field:account.fiscal.position,tax_ids:0 #: field:account.fiscal.position.template,tax_ids:0 msgid "Tax Mapping" -msgstr "" +msgstr "Maksude kaardistamine" #. module: account #: model:ir.actions.act_window,name:account.action_account_fiscalyear_close_state @@ -571,7 +575,7 @@ msgstr "Sule majandusaasta" #. module: account #: model:process.transition,note:account.process_transition_confirmstatementfromdraft0 msgid "The accountant confirms the statement." -msgstr "" +msgstr "Raamatupidaja kinnitab selle avalduse" #. module: account #: selection:account.balance.report,display_account:0 @@ -587,12 +591,12 @@ msgstr "Kõik" #. module: account #: field:account.invoice.report,address_invoice_id:0 msgid "Invoice Address Name" -msgstr "" +msgstr "Arveraamatu Aadressi Nimi" #. module: account #: selection:account.installer,period:0 msgid "3 Monthly" -msgstr "" +msgstr "Iga 3 kuu tagant" #. module: account #: view:account.unreconcile.reconcile:0 @@ -604,7 +608,7 @@ msgstr "" #. module: account #: view:analytic.entries.report:0 msgid " 30 Days " -msgstr "" +msgstr " 30 päeva " #. module: account #: field:ir.sequence,fiscal_ids:0 @@ -624,7 +628,7 @@ msgstr "" #. module: account #: sql_constraint:account.sequence.fiscalyear:0 msgid "Main Sequence must be different from current !" -msgstr "" +msgstr "Pea" #. module: account #: field:account.invoice.tax,tax_amount:0 @@ -652,12 +656,12 @@ msgstr "Sulge periood" #. module: account #: model:ir.model,name:account.model_account_common_partner_report msgid "Account Common Partner Report" -msgstr "" +msgstr "Konto tava \"Partner\" aruanne" #. module: account #: field:account.fiscalyear.close,period_id:0 msgid "Opening Entries Period" -msgstr "" +msgstr "Avatud sissekanete periood" #. module: account #: model:ir.model,name:account.model_account_journal_period @@ -791,7 +795,7 @@ msgstr "J.C./liiguta nime" #: selection:report.account.sales,month:0 #: selection:report.account_type.sales,month:0 msgid "September" -msgstr "" +msgstr "September" #. module: account #: selection:account.subscription,period_type:0 @@ -802,7 +806,7 @@ msgstr "päevad" #: help:account.account.template,nocreate:0 msgid "" "If checked, the new chart of accounts will not contain this by default." -msgstr "" +msgstr "Kui märgitud, siis uus kontode graafik ei sisalda seda puudujääki." #. module: account #: code:addons/account/wizard/account_invoice_refund.py:102 @@ -825,7 +829,7 @@ msgstr "Arvutus" #. module: account #: view:account.move.line:0 msgid "Next Partner to reconcile" -msgstr "" +msgstr "Kooskõlastama järgmise \"Partner\"-iga" #. module: account #: code:addons/account/account_move_line.py:1191 @@ -834,12 +838,14 @@ msgid "" "You can not do this modification on a confirmed entry ! Please note that you " "can just change some non important fields !" msgstr "" +"Teie ei saa teha see muudatus kinnitatud kirjel ! Teie saate muuta ainult " +"mõned vähetähtsad väljad !" #. module: account #: view:account.invoice.report:0 #: field:account.invoice.report,delay_to_pay:0 msgid "Avg. Delay To Pay" -msgstr "" +msgstr "Keskmine viivitus maksete tegemisel" #. module: account #: model:ir.actions.act_window,name:account.action_account_tax_chart @@ -862,7 +868,7 @@ msgstr "Tähtaeg" #: view:account.invoice.report:0 #: field:account.invoice.report,price_total_tax:0 msgid "Total With Tax" -msgstr "" +msgstr "Kokku koos maksudega" #. module: account #: view:account.invoice:0 @@ -870,7 +876,7 @@ msgstr "" #: view:validate.account.move:0 #: view:validate.account.move.lines:0 msgid "Approve" -msgstr "" +msgstr "Nõustu" #. module: account #: view:account.invoice:0 @@ -925,7 +931,7 @@ msgstr "" #. module: account #: view:account.analytic.line:0 msgid "Purchases" -msgstr "" +msgstr "Ostud" #. module: account #: field:account.model,lines_id:0 @@ -972,7 +978,7 @@ msgstr "Partneri bilanss" #. module: account #: field:account.bank.accounts.wizard,acc_name:0 msgid "Account Name." -msgstr "" +msgstr "Konto nimi." #. module: account #: field:account.chart.template,property_reserve_and_surplus_account:0 @@ -983,7 +989,7 @@ msgstr "" #. module: account #: field:report.account.receivable,name:0 msgid "Week of Year" -msgstr "" +msgstr "Nädal" #. module: account #: field:account.bs.report,display_type:0 @@ -995,12 +1001,12 @@ msgstr "Rõhtpaigutus" #. module: account #: view:board.board:0 msgid "Customer Invoices to Approve" -msgstr "" +msgstr "Kliendi arved kinnitamiseks" #. module: account #: help:account.fiscalyear.close,fy_id:0 msgid "Select a Fiscal year to close" -msgstr "" +msgstr "Vali eelarve aasta mida sulgeda" #. module: account #: help:account.account,user_type:0 @@ -1018,13 +1024,13 @@ msgstr "" #. module: account #: report:account.partner.balance:0 msgid "In dispute" -msgstr "" +msgstr "Vaidlustatav" #. module: account #: model:ir.actions.act_window,name:account.action_view_bank_statement_tree #: model:ir.ui.menu,name:account.journal_cash_move_lines msgid "Cash Registers" -msgstr "" +msgstr "Raha register" #. module: account #: selection:account.account.type,report_type:0 @@ -1042,7 +1048,7 @@ msgstr "-" #. module: account #: view:account.analytic.account:0 msgid "Manager" -msgstr "" +msgstr "Juhataja" #. module: account #: view:account.subscription.generate:0 @@ -1052,7 +1058,7 @@ msgstr "" #. module: account #: selection:account.bank.accounts.wizard,account_type:0 msgid "Bank" -msgstr "" +msgstr "Pank" #. module: account #: field:account.period,date_start:0 @@ -1062,13 +1068,13 @@ msgstr "Perioodi algus" #. module: account #: model:process.transition,name:account.process_transition_confirmstatementfromdraft0 msgid "Confirm statement" -msgstr "" +msgstr "Kinnita avaldus" #. module: account #: field:account.fiscal.position.tax,tax_dest_id:0 #: field:account.fiscal.position.tax.template,tax_dest_id:0 msgid "Replacement Tax" -msgstr "" +msgstr "Vahetus maks" #. module: account #: selection:account.move.line,centralisation:0 @@ -1087,12 +1093,12 @@ msgstr "" #. module: account #: view:account.invoice.cancel:0 msgid "Cancel Invoices" -msgstr "" +msgstr "Peata arved" #. module: account #: view:account.unreconcile.reconcile:0 msgid "Unreconciliation transactions" -msgstr "" +msgstr "Mittesobivad tehingud" #. module: account #: field:account.invoice.tax,tax_code_id:0 @@ -1110,7 +1116,7 @@ msgstr "" #. module: account #: help:account.move.line,move_id:0 msgid "The move of this entry line." -msgstr "" +msgstr "Selle rea liigutus." #. module: account #: field:account.move.line.reconcile,trans_nbr:0 @@ -1174,7 +1180,7 @@ msgstr "Konto" #. module: account #: field:account.tax,include_base_amount:0 msgid "Included in base amount" -msgstr "" +msgstr "Lisa baas osa" #. module: account #: view:account.entries.report:0 @@ -1186,7 +1192,7 @@ msgstr "" #. module: account #: field:account.account,level:0 msgid "Level" -msgstr "" +msgstr "Tase" #. module: account #: report:account.invoice:0 @@ -1207,7 +1213,7 @@ msgstr "Maksud" #: code:addons/account/wizard/account_report_common.py:120 #, python-format msgid "Select a starting and an ending period" -msgstr "" +msgstr "Vali algus ja lõpp periood" #. module: account #: model:ir.model,name:account.model_account_account_template @@ -1217,12 +1223,12 @@ msgstr "Mallid kontodele" #. module: account #: view:account.tax.code.template:0 msgid "Search tax template" -msgstr "" +msgstr "Otsi maksu templati" #. module: account #: report:account.invoice:0 msgid "Your Reference" -msgstr "" +msgstr "Teie viide" #. module: account #: view:account.move.reconcile:0 @@ -1246,7 +1252,7 @@ msgstr "" #. module: account #: view:account.invoice:0 msgid "Reset to Draft" -msgstr "" +msgstr "Lähtesta mustandiks" #. module: account #: view:wizard.multi.charts.accounts:0 @@ -1268,7 +1274,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_partner_all #: model:ir.ui.menu,name:account.next_id_22 msgid "Partners" -msgstr "" +msgstr "Partnerid" #. module: account #: view:account.bank.statement:0 @@ -1323,7 +1329,7 @@ msgstr "Bilanss pole 0" #. module: account #: view:account.tax:0 msgid "Search Taxes" -msgstr "" +msgstr "Otsi maksu" #. module: account #: model:ir.model,name:account.model_account_analytic_cost_ledger @@ -1338,7 +1344,7 @@ msgstr "Loo sissekanded" #. module: account #: field:account.entries.report,nbr:0 msgid "# of Items" -msgstr "" +msgstr "# detaile" #. module: account #: field:account.automatic.reconcile,max_amount:0 @@ -1353,7 +1359,7 @@ msgstr "Arvuta maksud" #. module: account #: field:wizard.multi.charts.accounts,code_digits:0 msgid "# of Digits" -msgstr "" +msgstr "# numbrit" #. module: account #: field:account.journal,entry_posted:0 @@ -1364,7 +1370,7 @@ msgstr "" #: view:account.invoice.report:0 #: field:account.invoice.report,price_total:0 msgid "Total Without Tax" -msgstr "" +msgstr "Kokku ilma maksudeta" #. module: account #: model:ir.actions.act_window,help:account.action_move_journal_line @@ -1378,7 +1384,7 @@ msgstr "" #. module: account #: view:account.entries.report:0 msgid "# of Entries " -msgstr "" +msgstr "# sisestusi " #. module: account #: model:ir.model,name:account.model_temp_range @@ -1435,7 +1441,7 @@ msgstr "Mall finantspositsioonile" #. module: account #: model:account.tax.code,name:account.account_tax_code_0 msgid "Tax Code Test" -msgstr "" +msgstr "Maksu koodi test" #. module: account #: field:account.automatic.reconcile,reconciled:0 @@ -1445,22 +1451,22 @@ msgstr "" #. module: account #: field:account.journal.view,columns_id:0 msgid "Columns" -msgstr "" +msgstr "Veerud" #. module: account #: report:account.overdue:0 msgid "." -msgstr "" +msgstr "." #. module: account #: view:account.analytic.cost.ledger.journal.report:0 msgid "and Journals" -msgstr "" +msgstr "ja arveraamatud" #. module: account #: field:account.journal,groups_id:0 msgid "Groups" -msgstr "" +msgstr "Grupid" #. module: account #: field:account.invoice,amount_untaxed:0 @@ -1471,18 +1477,20 @@ msgstr "Maksuvaba" #. module: account #: view:account.partner.reconcile.process:0 msgid "Go to next partner" -msgstr "" +msgstr "Mine järgmise \"Partner\"-ile" #. module: account #: view:account.bank.statement:0 msgid "Search Bank Statements" -msgstr "" +msgstr "Otsi panga avaldust" #. module: account #: sql_constraint:account.model.line:0 msgid "" "Wrong credit or debit value in model (Credit + Debit Must Be greater \"0\")!" msgstr "" +"Vale krediidi või deebeti arv mudelis ( Krediit + Deebet Peab olema suurem " +"kui \"0\" ) !" #. module: account #: view:account.chart.template:0 @@ -1516,14 +1524,14 @@ msgstr "" #. module: account #: report:account.analytic.account.cost_ledger:0 msgid "Date/Code" -msgstr "" +msgstr "Kuupäev/Kood" #. module: account #: field:account.analytic.line,general_account_id:0 #: view:analytic.entries.report:0 #: field:analytic.entries.report,general_account_id:0 msgid "General Account" -msgstr "" +msgstr "Üldine konto" #. module: account #: field:res.partner,debit_limit:0 @@ -1554,13 +1562,13 @@ msgstr "" #. module: account #: field:wizard.multi.charts.accounts,seq_journal:0 msgid "Separated Journal Sequences" -msgstr "" +msgstr "Eraldatud päeviku järjekorrad" #. module: account #: field:account.bank.statement,user_id:0 #: view:account.invoice:0 msgid "Responsible" -msgstr "" +msgstr "Vastutav" #. module: account #: report:account.overdue:0 @@ -1570,7 +1578,7 @@ msgstr "Vahesumma:" #. module: account #: model:ir.actions.act_window,name:account.action_report_account_type_sales_tree_all msgid "Sales by Account Type" -msgstr "" +msgstr "Müügid konto järgi" #. module: account #: view:account.invoice.refund:0 @@ -1582,7 +1590,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.periodical_processing_invoicing msgid "Invoicing" -msgstr "" +msgstr "Arveldamine" #. module: account #: field:account.chart.template,tax_code_root_id:0 @@ -1598,17 +1606,17 @@ msgstr "Kaasa algsed" #. module: account #: field:account.tax.code,sum:0 msgid "Year Sum" -msgstr "" +msgstr "Aasta kokkuvõtte" #. module: account #: model:ir.actions.report.xml,name:account.report_account_voucher_new msgid "Print Voucher" -msgstr "" +msgstr "Prindi voucher" #. module: account #: view:account.change.currency:0 msgid "This wizard will change the currency of the invoice" -msgstr "" +msgstr "See wizard muudab valuuta arvelduses" #. module: account #: model:ir.actions.act_window,help:account.action_account_chart @@ -1632,7 +1640,7 @@ msgstr "" #. module: account #: field:account.cashbox.line,pieces:0 msgid "Values" -msgstr "" +msgstr "Väärtused" #. module: account #: help:account.journal.period,active:0 @@ -1675,7 +1683,7 @@ msgstr "" #. module: account #: report:account.move.voucher:0 msgid "Ref. :" -msgstr "" +msgstr "Viide:" #. module: account #: view:account.analytic.chart:0 @@ -1685,7 +1693,7 @@ msgstr "Analüütilised kontoplaanid" #. module: account #: view:account.analytic.line:0 msgid "My Entries" -msgstr "" +msgstr "Minu sisestused" #. module: account #: report:account.overdue:0 @@ -1696,7 +1704,7 @@ msgstr "Kliendi viide:" #: code:addons/account/account_cash_statement.py:328 #, python-format msgid "User %s does not have rights to access %s journal !" -msgstr "" +msgstr "Kasutajal %s ei ole õigusi et siseneda %s arveraamatusse !" #. module: account #: help:account.period,special:0 @@ -1717,12 +1725,12 @@ msgstr "" #: code:addons/account/account.py:499 #, python-format msgid "You cannot deactivate an account that contains account moves." -msgstr "" +msgstr "Sa ei saa deaktiveerida kontot mis sisaldab konto liikumisi." #. module: account #: field:account.move.line.reconcile,credit:0 msgid "Credit amount" -msgstr "" +msgstr "Kreedidi kogus" #. module: account #: constraint:account.move.line:0 @@ -1745,7 +1753,7 @@ msgstr "" #. module: account #: sql_constraint:account.move.line:0 msgid "Wrong credit or debit value in accounting entry !" -msgstr "" +msgstr "Vale kreedit või deebeti raamatupidamise sisend !" #. module: account #: view:account.invoice.report:0 @@ -1757,7 +1765,7 @@ msgstr "" #. module: account #: model:ir.model,name:account.model_account_period_close msgid "period close" -msgstr "" +msgstr "Periood suletud" #. module: account #: view:account.installer:0 @@ -1767,18 +1775,18 @@ msgstr "" #. module: account #: model:ir.actions.act_window,name:account.action_project_account_analytic_line_form msgid "Entries By Line" -msgstr "" +msgstr "SIsestused ridade kaupa" #. module: account #: report:account.tax.code.entries:0 msgid "A/c Code" -msgstr "" +msgstr "A/c kood" #. module: account #: field:account.invoice,move_id:0 #: field:account.invoice,move_name:0 msgid "Journal Entry" -msgstr "" +msgstr "Päevaraamatu kanne" #. module: account #: view:account.tax:0 @@ -1788,7 +1796,7 @@ msgstr "" #. module: account #: field:account.cashbox.line,subtotal:0 msgid "Sub Total" -msgstr "" +msgstr "Vahesumma" #. module: account #: view:account.account:0 @@ -1798,7 +1806,7 @@ msgstr "" #. module: account #: constraint:res.company:0 msgid "Error! You can not create recursive companies." -msgstr "" +msgstr "Viga! Sa ei saa luua rekursiivseid ettevõtteid." #. module: account #: view:account.analytic.account:0 @@ -1821,12 +1829,12 @@ msgstr "Kehtiv" #: model:ir.actions.act_window,name:account.action_account_print_journal #: model:ir.model,name:account.model_account_print_journal msgid "Account Print Journal" -msgstr "" +msgstr "Prindi konto arveraamat" #. module: account #: model:ir.model,name:account.model_product_category msgid "Product Category" -msgstr "" +msgstr "Toote kategooria" #. module: account #: selection:account.account.type,report_type:0 @@ -1836,7 +1844,7 @@ msgstr "/" #. module: account #: field:account.bs.report,reserve_account_id:0 msgid "Reserve & Profit/Loss Account" -msgstr "" +msgstr "Reservi & kasumi/kahjumi konto" #. module: account #: help:account.bank.statement,balance_end:0 diff --git a/openerp/addons/base/i18n/zh_TW.po b/openerp/addons/base/i18n/zh_TW.po index ab4f83dd89d..04b75725807 100644 --- a/openerp/addons/base/i18n/zh_TW.po +++ b/openerp/addons/base/i18n/zh_TW.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-09-28 13:58+0000\n" +"PO-Revision-Date: 2011-09-29 15:26+0000\n" "Last-Translator: Walter Cheuk \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: 2011-09-29 04:36+0000\n" -"X-Generator: Launchpad (build 14049)\n" +"X-Launchpad-Export-Date: 2011-09-30 04:37+0000\n" +"X-Generator: Launchpad (build 14071)\n" #. module: base #: view:ir.filters:0 @@ -2795,7 +2795,7 @@ msgstr "向用戶提供目標視窗之額外說明文字,如其用法及用途 #. module: base #: model:res.country,name:base.va msgid "Holy See (Vatican City State)" -msgstr "教廷(梵蒂岡)" +msgstr "教廷 (梵蒂岡)" #. module: base #: field:base.module.import,module_file:0