Merge lp:~zikzak/oosalespromotions/sale_promotions into lp:oosalespromotions

Proposed by Raimon Esteve (www.zikzakmedia.com) on 2011-03-14
Status: Needs review
Proposed branch: lp:~zikzak/oosalespromotions/sale_promotions
Merge into: lp:oosalespromotions
Diff against target: 2948 lines (+2436/-194)
12 files modified
__openerp__.py (+54/-0)
__terp__.py (+0/-51)
example/xml-rpc-test.py (+1/-1)
i18n/ca.po (+459/-0)
i18n/ca_ES.po (+471/-0)
i18n/es.po (+421/-0)
i18n/es_ES.po (+471/-0)
i18n/sale_promotions.pot (+431/-0)
models/rules.py (+79/-109)
security/ir.model.access.csv (+4/-0)
views/rule.xml (+38/-23)
views/sale.xml (+7/-10)
To merge this branch: bzr merge lp:~zikzak/oosalespromotions/sale_promotions
Reviewer Review Type Date Requested Status
Sharoon Thomas http://openlabs.co.in 2011-03-14 Needs Fixing on 2011-03-14
Review via email: mp+53304@code.launchpad.net

Description of the change

[IMP] Sale Promotions: Translate and redefine Selection values for translate
[IMP] Security rules and views form expression and condition

To post a comment you must log in.

Hello Raimon,

Line 1486 - 1523

Using globals is a bad idea for the following reasons:

1. It will not allow new modules to add types of operations. So new modules written will not even be able to disallow or allow certain operations.
2. Makes program slower because of the way python does attribute access. (insignificant but still valid when you consider the application of e-commerce)

Hence, could you please fix that and propose a merge. Thanks...

review: Needs Fixing

2011/3/14 Sharoon Thomas http://openlabs.co.in <email address hidden>:
> Using globals is a bad idea for the following reasons:

Selection fields at def don't have translation.

We have tolk this morning howto translated this fields and only is
avaible about list (similar a pwemail template engine ;) )

Spekers not english, design rules in English is very heavy (less than,...)

Are you another idea/design this fields are translated selection fields?

--
Raimon Esteve
// OpenERP Partner. www.openerp.com/node/682
// e-sale: Zoook 100% OpenERP / Magento
// AulaERP, formació online www.aulaerp.com
www.zikzakmedia.com

Can you not use the _(x) method inside the function which returns the list of tuples ?

globals are added to namespace with the classes and methods but the methods will be only be cached at that time. So executing this like:

class XYZ(..):

...
   def method(self, ...):
       return [
          ('a', _('a'))
          ]

should work? or am i missing something?

2011/3/14 Sharoon Thomas http://openlabs.co.in <email address hidden>:
>   def method(self, ...):
>       return [
>          ('a', _('a'))
>          ]

Yes! First I try testing this code but nothing. OpenERP don't
translated (I don't remember if it's avaible translated fields in po
or only when show view).
We tested versions 5.0.15 and 6.0.1 and translated fields are not
avaible. Now, I'm retested another time = not translated fields.

After, we decided a list global. Now, This selection field are avaible
translated.

You understand what user design rules (conditions or actions) only
English is difficult Spekears not English.

But this option it's than slowly? do you have some test?

--
Raimon Esteve
// OpenERP Partner. www.openerp.com/node/682
// e-sale: Zoook 100% OpenERP / Magento
// AulaERP, formació online www.aulaerp.com
www.zikzakmedia.com

I completely agree on the fact that fields need to be translated. But I am almost sure that it can be done within the function too as i dont see how it will not work.

If it doesnt work, i think its a serious framework issue. Dont you think so?

2011/3/15, Sharoon Thomas http://openlabs.co.in <email address hidden>:
> I completely agree on the fact that fields need to be translated. But I am
> almost sure that it can be done within the function too as i dont see how it
> will not work.

please, test it and feedback. we tested 5.0.15 and 6.0.1 and same result.

> If it doesnt work, i think its a serious framework issue. Dont you think so?

Of course

--
Raimon Esteve
// OpenERP Partner. www.openerp.com/node/682
// e-sale: Zoook 100% OpenERP / Magento
// AulaERP, formació online www.aulaerp.com
www.zikzakmedia.com

11. By Raimon Esteve (www.zikzakmedia.com) on 2011-11-30

[IMP] Security Rules [FIX] Promo Rule. Coupon Code required

Unmerged revisions

11. By Raimon Esteve (www.zikzakmedia.com) on 2011-11-30

[IMP] Security Rules [FIX] Promo Rule. Coupon Code required

10. By Raimon Esteve (www.zikzakmedia.com) on 2011-03-14

[IMP] Translation and security rules

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '__openerp__.py'
2--- __openerp__.py 1970-01-01 00:00:00 +0000
3+++ __openerp__.py 2011-11-30 12:20:28 +0000
4@@ -0,0 +1,54 @@
5+# -*- encoding: utf-8 -*-
6+##############################################################################
7+#
8+# OpenERP, Open Source Management Solution
9+# Copyright (C) 2010, Open Labs Business Solution
10+# Copyright (C) 2011, Zikzakmedia #
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU General Public License as published by
14+# the Free Software Foundation, either version 3 of the License, or
15+# (at your option) any later version.
16+#
17+# This program is distributed in the hope that it will be useful,
18+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+# GNU General Public License for more details.
21+#
22+# You should have received a copy of the GNU General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+
27+{
28+ 'name' : 'Promotions for OpenERP',
29+ 'version' : '0.1',
30+ 'author' : 'Open Labs Business Solutions',
31+ 'website': 'http://openlabs.co.in',
32+ 'category' : 'Generic Modules/Sales & Purchases',
33+ 'depends' : [
34+ "base",
35+ "sale",
36+ ],
37+ 'init_xml' : [],
38+ 'demo_xml' : [],
39+ 'description': """
40+ Promotions on Sale Order for OpenERP
41+ = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
42+ Features:
43+ 1. Promotions based on conditions and coupons
44+ 2. Web services API compliance
45+
46+ Credits:
47+ This design is based/inspired by the Magento commerce
48+ Special Thanks to Yannick Buron for analysis
49+ Migration Module OpenERP 6: Zikzakmedia
50+ """,
51+ 'update_xml': [
52+ 'security/ir.model.access.csv',
53+ 'views/rule.xml',
54+ 'views/sale.xml',
55+ ],
56+ 'installable': True,
57+ 'active': False,
58+}
59
60=== removed file '__terp__.py'
61--- __terp__.py 2010-06-08 09:17:32 +0000
62+++ __terp__.py 1970-01-01 00:00:00 +0000
63@@ -1,51 +0,0 @@
64-# -*- encoding: utf-8 -*-
65-##############################################################################
66-#
67-# OpenERP, Open Source Management Solution
68-# Copyright (C) 2010, Open Labs Business Solution
69-#
70-# This program is free software: you can redistribute it and/or modify
71-# it under the terms of the GNU General Public License as published by
72-# the Free Software Foundation, either version 3 of the License, or
73-# (at your option) any later version.
74-#
75-# This program is distributed in the hope that it will be useful,
76-# but WITHOUT ANY WARRANTY; without even the implied warranty of
77-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78-# GNU General Public License for more details.
79-#
80-# You should have received a copy of the GNU General Public License
81-# along with this program. If not, see <http://www.gnu.org/licenses/>.
82-#
83-##############################################################################
84-
85-{
86- 'name' : 'Promotions for Open ERP',
87- 'version' : '0.1',
88- 'author' : 'Open Labs Business Solutions',
89- 'website': 'http://openlabs.co.in',
90- 'category' : 'Customised Modules',
91- 'depends' : [
92- "base",
93- "sale",
94- ],
95- 'init_xml' : [],
96- 'demo_xml' : [],
97- 'description': """
98- Promotions on Sale Order for Open ERP
99- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
100- Features:
101- 1. Promotions based on conditions and coupons
102- 2. Web services API compliance
103-
104- Credits:
105- This design is based/inspired by the Magento commerce
106- Special Thanks to Yannick Buron for analysis
107- """,
108- 'update_xml': [
109- 'views/rule.xml',
110- 'views/sale.xml',
111- ],
112- 'installable': True,
113- 'active': False,
114-}
115
116=== modified file 'example/xml-rpc-test.py'
117--- example/xml-rpc-test.py 2010-06-08 09:17:32 +0000
118+++ example/xml-rpc-test.py 2011-11-30 12:20:28 +0000
119@@ -11,5 +11,5 @@
120 common = xmlrpclib.ServerProxy(url + '/xmlrpc/common')
121 uid = common.login(dbname, username, password)
122 object = xmlrpclib.ServerProxy(url + '/xmlrpc/object')
123-object.execute(dbname, uid, password,'promos.rules', 'evaluate', 1, 3)
124+#object.execute(dbname, uid, password,'promos.rules', 'evaluate', 1, 3) #TODO: evaluate def need object, not ID values
125 object.execute(dbname, uid, password, 'promos.rules', 'apply_promotions', 3)
126
127=== added directory 'i18n'
128=== added file 'i18n/ca.po'
129--- i18n/ca.po 1970-01-01 00:00:00 +0000
130+++ i18n/ca.po 2011-11-30 12:20:28 +0000
131@@ -0,0 +1,459 @@
132+# Translation of OpenERP Server.
133+# This file contains the translation of the following modules:
134+# * sale_promotions
135+#
136+msgid ""
137+msgstr ""
138+"Project-Id-Version: OpenERP Server 5.0.15\n"
139+"Report-Msgid-Bugs-To: support@openerp.com\n"
140+"POT-Creation-Date: 2011-03-14 14:53+0000\n"
141+"PO-Revision-Date: 2011-10-11 17:39+0100\n"
142+"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
143+"Language-Team: \n"
144+"MIME-Version: 1.0\n"
145+"Content-Type: text/plain; charset=UTF-8\n"
146+"Content-Transfer-Encoding: 8bit\n"
147+"Plural-Forms: \n"
148+
149+#. module: sale_promotions
150+#: field:promos.rules,name:0
151+msgid "Promo Name"
152+msgstr "Nom"
153+
154+#. module: sale_promotions
155+#: view:promos.rules:0
156+msgid "expressions are"
157+msgstr "les expressions son"
158+
159+#. module: sale_promotions
160+#: field:promos.rules.conditions.exps,stop_further:0
161+msgid "Stop further checks"
162+msgstr "Finalitzar comprovació"
163+
164+#. module: sale_promotions
165+#: field:promos.rules,uses_per_coupon:0
166+msgid "Uses per Coupon"
167+msgstr "Usos per cupó"
168+
169+#. module: sale_promotions
170+#: field:promos.rules,coupon_used:0
171+msgid "Number of Coupon Uses"
172+msgstr "Número d'usos per cupó"
173+
174+#. module: sale_promotions
175+#: field:promos.rules.actions,product_code:0
176+msgid "Product Code"
177+msgstr "Codi producte"
178+
179+#. module: sale_promotions
180+#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
181+#: model:ir.model,name:sale_promotions.model_promos_rules
182+#: model:ir.ui.menu,name:sale_promotions.promos
183+msgid "Promotion Rules"
184+msgstr "Regles de promoció"
185+
186+#. module: sale_promotions
187+#: field:sale.order,coupon_code:0
188+msgid "Promo Coupon Code"
189+msgstr "Codi cupó de la promoció"
190+
191+#. module: sale_promotions
192+#: view:promos.rules:0
193+msgid "Applicable Period"
194+msgstr "Període aplicable"
195+
196+#. module: sale_promotions
197+#: field:promos.rules,stop_further:0
198+msgid "Stop Checks"
199+msgstr "Finalitzar procés"
200+
201+#. module: sale_promotions
202+#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
203+msgid "Expressions for conditions"
204+msgstr "Expressions per les condicions"
205+
206+#. module: sale_promotions
207+#: field:promos.rules,to_date:0
208+msgid "To Date"
209+msgstr "Fins"
210+
211+#. module: sale_promotions
212+#: code:addons/sale_promotions/models/rules.py:62
213+#: selection:promos.rules.conditions.exps,comparator:0
214+#, python-format
215+msgid "not equal to"
216+msgstr "no es igual a"
217+
218+#. module: sale_promotions
219+#: field:promos.rules.actions,arguments:0
220+msgid "Arguments"
221+msgstr "Arguments"
222+
223+#. module: sale_promotions
224+#: code:addons/sale_promotions/models/rules.py:64
225+#: selection:promos.rules.conditions.exps,comparator:0
226+#, python-format
227+msgid "greater than or equal to"
228+msgstr "major o igual a"
229+
230+#. module: sale_promotions
231+#: field:promos.rules,expected_logic_result:0
232+msgid "Output"
233+msgstr "Sortida"
234+
235+#. module: sale_promotions
236+#: selection:promos.rules.conditions.exps,attribute:0
237+msgid "Product UnitPrice combination"
238+msgstr "Combinació preu unitat del producte"
239+
240+#. module: sale_promotions
241+#: help:promos.rules,stop_further:0
242+msgid "Stops further promotions being checked"
243+msgstr "Finalitzar promocions"
244+
245+#. module: sale_promotions
246+#: model:ir.model,name:sale_promotions.model_promos_rules_actions
247+msgid "Promotions actions"
248+msgstr "Accions de la promoció"
249+
250+#. module: sale_promotions
251+#: selection:promos.rules.conditions.exps,attribute:0
252+msgid "Product Discount combination"
253+msgstr "Combinació descompte del producte"
254+
255+#. module: sale_promotions
256+#: view:promos.rules:0
257+msgid "Conditions"
258+msgstr "Condicions"
259+
260+#. module: sale_promotions
261+#: code:addons/sale_promotions/models/rules.py:75
262+#: selection:promos.rules.actions,action_type:0
263+#, python-format
264+msgid "Fixed amount on Sub Total"
265+msgstr "Quantitat fixa en subtotal"
266+
267+#. module: sale_promotions
268+#: sql_constraint:sale.order:0
269+msgid "Order Reference must be unique !"
270+msgstr "Order Reference must be unique !"
271+
272+#. module: sale_promotions
273+#: view:promos.rules:0
274+#: field:promos.rules,description:0
275+msgid "Description"
276+msgstr "Descripció"
277+
278+#. module: sale_promotions
279+#: field:promos.rules.conditions.exps,serialised_expr:0
280+msgid "Expression"
281+msgstr "Expressió"
282+
283+#. module: sale_promotions
284+#: field:promos.rules,coupon_code:0
285+msgid "Coupon Code"
286+msgstr "Codi cupó"
287+
288+#. module: sale_promotions
289+#: code:addons/sale_promotions/models/rules.py:68
290+#: selection:promos.rules.conditions.exps,comparator:0
291+#, python-format
292+msgid "is not in"
293+msgstr "no està en"
294+
295+#. module: sale_promotions
296+#: selection:promos.rules.conditions.exps,attribute:0
297+msgid "Product Weight combination"
298+msgstr "Combinació pes del producte"
299+
300+#. module: sale_promotions
301+#: selection:promos.rules.conditions.exps,attribute:0
302+msgid "Product SubTotal combination"
303+msgstr "Combinació subtotal del producte"
304+
305+#. module: sale_promotions
306+#: help:sale.order.line,promotion_line:0
307+msgid "Indicates if the line was created by promotions"
308+msgstr "Indicar si aquesta línia es creada per promocions"
309+
310+#. module: sale_promotions
311+#: field:promos.rules,active:0
312+msgid "Active"
313+msgstr "Actiu"
314+
315+#. module: sale_promotions
316+#: selection:promos.rules,expected_logic_result:0
317+msgid "True"
318+msgstr "Verdader"
319+
320+#. module: sale_promotions
321+#: view:promos.rules:0
322+msgid "Coupon/Voucher Settings"
323+msgstr "Configuració dels cupons"
324+
325+#. module: sale_promotions
326+#: view:promos.rules:0
327+msgid "Promotions"
328+msgstr "Promocions"
329+
330+#. module: sale_promotions
331+#: code:addons/sale_promotions/models/rules.py:76
332+#: selection:promos.rules.actions,action_type:0
333+#, python-format
334+msgid "Buy X get Y free"
335+msgstr "Compra X i emportis Y"
336+
337+#. module: sale_promotions
338+#: selection:promos.rules.conditions.exps,attribute:0
339+msgid "Compute sub total of products"
340+msgstr "Calcula subtotal dels productes"
341+
342+#. module: sale_promotions
343+#: field:promos.rules.conditions.exps,comparator:0
344+msgid "Comparator"
345+msgstr "Comparador"
346+
347+#. module: sale_promotions
348+#: selection:promos.rules.conditions.exps,attribute:0
349+msgid "Tax Amount"
350+msgstr "Impostos"
351+
352+#. module: sale_promotions
353+#: code:addons/sale_promotions/models/rules.py:42
354+#: selection:promos.rules.conditions.exps,attribute:0
355+#, python-format
356+msgid "Untaxed Total"
357+msgstr "Base imponible"
358+
359+#. module: sale_promotions
360+#: field:promos.rules.conditions.exps,value:0
361+msgid "Value"
362+msgstr "Valor"
363+
364+#. module: sale_promotions
365+#: code:addons/sale_promotions/models/rules.py:61
366+#: selection:promos.rules.conditions.exps,comparator:0
367+#, python-format
368+msgid "equals"
369+msgstr "es igual a"
370+
371+#. module: sale_promotions
372+#: view:promos.rules:0
373+#: field:promos.rules,partner_categories:0
374+msgid "Partner Categories"
375+msgstr "Categories de clients"
376+
377+#. module: sale_promotions
378+#: selection:promos.rules.conditions.exps,attribute:0
379+msgid "Product Quantity combination"
380+msgstr "Combinació quantitat del producte"
381+
382+#. module: sale_promotions
383+#: field:promos.rules,uses_per_partner:0
384+msgid "Uses per Partner"
385+msgstr "Usos per client"
386+
387+#. module: sale_promotions
388+#: selection:promos.rules.conditions.exps,attribute:0
389+msgid "Compute sub total excluding products"
390+msgstr "Calcula subtotal excloent productes"
391+
392+#. module: sale_promotions
393+#: field:promos.rules,logic:0
394+msgid "Logic"
395+msgstr "Lògica"
396+
397+#. module: sale_promotions
398+#: view:promos.rules:0
399+msgid "If"
400+msgstr "Si"
401+
402+#. module: sale_promotions
403+#: field:promos.rules.actions,action_type:0
404+msgid "Action"
405+msgstr "Accions"
406+
407+#. module: sale_promotions
408+#: selection:promos.rules,expected_logic_result:0
409+msgid "False"
410+msgstr "Fals"
411+
412+#. module: sale_promotions
413+#: field:promos.rules.actions,promotion:0
414+#: field:promos.rules.conditions.exps,promotion:0
415+msgid "Promotion"
416+msgstr "Promoció"
417+
418+#. module: sale_promotions
419+#: selection:promos.rules.conditions.exps,attribute:0
420+msgid "Custom domain expression"
421+msgstr "Expressió personalitzada"
422+
423+#. module: sale_promotions
424+#: code:addons/sale_promotions/models/rules.py:74
425+#: selection:promos.rules.actions,action_type:0
426+#, python-format
427+msgid "Discount % on Sub Total"
428+msgstr "Descompte % en el subtotal"
429+
430+#. module: sale_promotions
431+#: code:addons/sale_promotions/models/rules.py:66
432+#: selection:promos.rules.conditions.exps,comparator:0
433+#, python-format
434+msgid "less than or equal to"
435+msgstr "menor o igual a"
436+
437+#. module: sale_promotions
438+#: field:sale.order.line,promotion_line:0
439+msgid "Promotion Line"
440+msgstr "Línia de promoció"
441+
442+#. module: sale_promotions
443+#: field:promos.rules,shop:0
444+msgid "Shop"
445+msgstr "Botiga"
446+
447+#. module: sale_promotions
448+#: selection:promos.rules.conditions.exps,attribute:0
449+msgid "Total Amount"
450+msgstr "Quantitat Total"
451+
452+#. module: sale_promotions
453+#: selection:promos.rules,logic:0
454+msgid "All"
455+msgstr "Tot"
456+
457+#. module: sale_promotions
458+#: model:ir.model,name:sale_promotions.model_sale_order
459+msgid "Sales Order"
460+msgstr "Sales Order"
461+
462+#. module: sale_promotions
463+#: field:promos.rules,expressions:0
464+msgid "Expressions/Conditions"
465+msgstr "Expressions/Condicions"
466+
467+#. module: sale_promotions
468+#: field:promos.rules,sequence:0
469+#: field:promos.rules.actions,sequence:0
470+#: field:promos.rules.conditions.exps,sequence:0
471+msgid "Sequence"
472+msgstr "Seqüència"
473+
474+#. module: sale_promotions
475+#: code:addons/sale_promotions/models/rules.py:67
476+#: selection:promos.rules.conditions.exps,comparator:0
477+#, python-format
478+msgid "is in"
479+msgstr "es en"
480+
481+#. module: sale_promotions
482+#: field:promos.rules.conditions.exps,attribute:0
483+msgid "Attribute"
484+msgstr "Atribut"
485+
486+#. module: sale_promotions
487+#: code:addons/sale_promotions/models/rules.py:65
488+#: selection:promos.rules.conditions.exps,comparator:0
489+#, python-format
490+msgid "less than"
491+msgstr "menys de"
492+
493+#. module: sale_promotions
494+#: view:promos.rules:0
495+#: field:promos.rules,actions:0
496+msgid "Actions"
497+msgstr "Accions"
498+
499+#. module: sale_promotions
500+#: help:promos.rules,partner_categories:0
501+msgid "Applicable to all if none is selected"
502+msgstr "Aplicable en tot si cap es seleccionat"
503+
504+#. module: sale_promotions
505+#: model:ir.model,name:sale_promotions.model_sale_order_line
506+msgid "Sales Order Line"
507+msgstr "Sales Order Line"
508+
509+#. module: sale_promotions
510+#: code:addons/sale_promotions/models/rules.py:63
511+#: selection:promos.rules.conditions.exps,comparator:0
512+#, python-format
513+msgid "greater than"
514+msgstr "major que"
515+
516+#. module: sale_promotions
517+#: code:addons/sale_promotions/models/rules.py:72
518+#: selection:promos.rules.actions,action_type:0
519+#, python-format
520+msgid "Discount % on Product"
521+msgstr "Descompte % en el producte"
522+
523+#. module: sale_promotions
524+#: help:promos.rules,coupon_used:0
525+msgid "The number of times this coupon has been used."
526+msgstr "El número de cupons ja s'ha utilitzat."
527+
528+#. module: sale_promotions
529+#: selection:promos.rules.conditions.exps,attribute:0
530+msgid "Product Code in order"
531+msgstr "Codi producte en la comanda"
532+
533+#. module: sale_promotions
534+#: code:addons/sale_promotions/models/rules.py:73
535+#: selection:promos.rules.actions,action_type:0
536+#, python-format
537+msgid "Fixed amount on Product"
538+msgstr "Quantitat fixe del producte"
539+
540+#. module: sale_promotions
541+#: selection:promos.rules,logic:0
542+msgid "Any"
543+msgstr "Cap"
544+
545+#. module: sale_promotions
546+#: view:sale.order:0
547+msgid "Apply Promotions"
548+msgstr "Aplicar promocions"
549+
550+#. module: sale_promotions
551+#: field:promos.rules,from_date:0
552+msgid "From Date"
553+msgstr "Desde"
554+
555+#~ msgid "Rule Expressions"
556+#~ msgstr "Expressió de la regla"
557+#~ msgid ""
558+#~ "The Object name must start with x_ and not contain any special character !"
559+#~ msgstr ""
560+#~ "¡El nom del objecte ha de començar amb x_ i no contenir cap caràcter "
561+#~ "especial!"
562+#~ msgid "Promotions for Open ERP"
563+#~ msgstr "Promociones per OpenERP"
564+#~ msgid ""
565+#~ "\n"
566+#~ " Promotions on Sale Order for Open ERP\n"
567+#~ " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
568+#~ " Features:\n"
569+#~ " 1. Promotions based on conditions and coupons\n"
570+#~ " 2. Web services API compliance\n"
571+#~ " \n"
572+#~ " Credits:\n"
573+#~ " This design is based/inspired by the Magento commerce\n"
574+#~ " Special Thanks to Yannick Buron for analysis\n"
575+#~ " "
576+#~ msgstr ""
577+#~ "\n"
578+#~ " Promocions en les comandes de venda d'OpenERP\n"
579+#~ " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
580+#~ " Característiques:\n"
581+#~ " 1. Promociones basades en condicions i cupons\n"
582+#~ " 2. Web services API pel seu comerç electrònic\n"
583+#~ " \n"
584+#~ " Crèdits:\n"
585+#~ " Aquest mòdul està dissenyat/inspirat en Magento ecommerce\n"
586+#~ " Agraïments a Yannick Buron pel anàlisis\n"
587+#~ " "
588+#~ msgid "Product NetPrice combination"
589+#~ msgstr "Combinació preu net del producte"
590+
591
592=== added file 'i18n/ca_ES.po'
593--- i18n/ca_ES.po 1970-01-01 00:00:00 +0000
594+++ i18n/ca_ES.po 2011-11-30 12:20:28 +0000
595@@ -0,0 +1,471 @@
596+# Translation of OpenERP Server.
597+# This file contains the translation of the following modules:
598+# * sale_promotions
599+#
600+msgid ""
601+msgstr ""
602+"Project-Id-Version: OpenERP Server 5.0.15\n"
603+"Report-Msgid-Bugs-To: support@openerp.com\n"
604+"POT-Creation-Date: 2011-03-14 11:44:29+0000\n"
605+"PO-Revision-Date: 2011-03-14 13:21+0100\n"
606+"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
607+"Language-Team: \n"
608+"MIME-Version: 1.0\n"
609+"Content-Type: text/plain; charset=UTF-8\n"
610+"Content-Transfer-Encoding: 8bit\n"
611+"Plural-Forms: \n"
612+
613+#. module: sale_promotions
614+#: selection:promos.rules,expected_logic_result:0
615+msgid "False"
616+msgstr "Fals"
617+
618+#. module: sale_promotions
619+#: field:promos.rules,name:0
620+msgid "Promo Name"
621+msgstr "Nom"
622+
623+#. module: sale_promotions
624+#: constraint:ir.model:0
625+msgid "The Object name must start with x_ and not contain any special character !"
626+msgstr "¡El nom del objecte ha de començar amb x_ i no contenir cap caràcter especial!"
627+
628+#. module: sale_promotions
629+#: field:promos.rules.conditions.exps,stop_further:0
630+msgid "Stop further checks"
631+msgstr "Finalitzar comprovació"
632+
633+#. module: sale_promotions
634+#: field:promos.rules,uses_per_coupon:0
635+msgid "Uses per Coupon"
636+msgstr "Usos per cupó"
637+
638+#. module: sale_promotions
639+#: field:promos.rules,coupon_used:0
640+msgid "Number of Coupon Uses"
641+msgstr "Número d'usos per cupó"
642+
643+#. module: sale_promotions
644+#: field:promos.rules.actions,product_code:0
645+msgid "Product Code"
646+msgstr "Codi producte"
647+
648+#. module: sale_promotions
649+#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
650+#: model:ir.model,name:sale_promotions.model_promos_rules
651+#: model:ir.ui.menu,name:sale_promotions.promos
652+msgid "Promotion Rules"
653+msgstr "Regles de promoció"
654+
655+#. module: sale_promotions
656+#: field:sale.order,coupon_code:0
657+msgid "Promo Coupon Code"
658+msgstr "Codi cupó de la promoció"
659+
660+#. module: sale_promotions
661+#: view:promos.rules:0
662+msgid "Applicable Period"
663+msgstr "Període aplicable"
664+
665+#. module: sale_promotions
666+#: code:addons/sale_promotions/models/rules.py:0
667+#: selection:promos.rules.conditions.exps,comparator:0
668+#, python-format
669+msgid "greater than"
670+msgstr "major que"
671+
672+#. module: sale_promotions
673+#: view:promos.rules:0
674+msgid "expressions are"
675+msgstr "les expressions son"
676+
677+#. module: sale_promotions
678+#: field:promos.rules,stop_further:0
679+msgid "Stop Checks"
680+msgstr "Finalitzar procés"
681+
682+#. module: sale_promotions
683+#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
684+msgid "Expressions for conditions"
685+msgstr "Expressions per les condicions"
686+
687+#. module: sale_promotions
688+#: field:promos.rules,to_date:0
689+msgid "To Date"
690+msgstr "Des de"
691+
692+#. module: sale_promotions
693+#: code:addons/sale_promotions/models/rules.py:0
694+#: selection:promos.rules.conditions.exps,comparator:0
695+#, python-format
696+msgid "not equal to"
697+msgstr "no es igual a"
698+
699+#. module: sale_promotions
700+#: field:promos.rules.actions,arguments:0
701+msgid "Arguments"
702+msgstr "Arguments"
703+
704+#. module: sale_promotions
705+#: constraint:ir.actions.act_window:0
706+msgid "Invalid model name in the action definition."
707+msgstr "Nom del model invàlid en la definició de la acció."
708+
709+#. module: sale_promotions
710+#: field:promos.rules,expected_logic_result:0
711+msgid "Output"
712+msgstr "Sortida"
713+
714+#. module: sale_promotions
715+#: selection:promos.rules.conditions.exps,attribute:0
716+msgid "Product UnitPrice combination"
717+msgstr "Combinació preu unitat del producte"
718+
719+#. module: sale_promotions
720+#: help:promos.rules,stop_further:0
721+msgid "Stops further promotions being checked"
722+msgstr "Finalitzar promocions"
723+
724+#. module: sale_promotions
725+#: model:ir.model,name:sale_promotions.model_promos_rules_actions
726+msgid "Promotions actions"
727+msgstr "Accions de la promoció"
728+
729+#. module: sale_promotions
730+#: selection:promos.rules.conditions.exps,attribute:0
731+msgid "Product Discount combination"
732+msgstr "Combinació descompte del producte"
733+
734+#. module: sale_promotions
735+#: view:promos.rules:0
736+msgid "Conditions"
737+msgstr "Condicions"
738+
739+#. module: sale_promotions
740+#: code:addons/sale_promotions/models/rules.py:0
741+#: selection:promos.rules.conditions.exps,comparator:0
742+#, python-format
743+msgid "greater than or equal to"
744+msgstr "major o igual a"
745+
746+#. module: sale_promotions
747+#: code:addons/sale_promotions/models/rules.py:0
748+#: selection:promos.rules.actions,action_type:0
749+#, python-format
750+msgid "Fixed amount on Sub Total"
751+msgstr "Quantitat fixa en subtotal"
752+
753+#. module: sale_promotions
754+#: view:promos.rules:0
755+#: field:promos.rules,description:0
756+msgid "Description"
757+msgstr "Descripció"
758+
759+#. module: sale_promotions
760+#: field:promos.rules.conditions.exps,serialised_expr:0
761+msgid "Expression"
762+msgstr "Expressió"
763+
764+#. module: sale_promotions
765+#: field:promos.rules,coupon_code:0
766+msgid "Coupon Code"
767+msgstr "Codi cupó"
768+
769+#. module: sale_promotions
770+#: code:addons/sale_promotions/models/rules.py:0
771+#: selection:promos.rules.conditions.exps,comparator:0
772+#, python-format
773+msgid "is not in"
774+msgstr "no està en"
775+
776+#. module: sale_promotions
777+#: selection:promos.rules.conditions.exps,attribute:0
778+msgid "Product Weight combination"
779+msgstr "Combinació pes del producte"
780+
781+#. module: sale_promotions
782+#: selection:promos.rules.conditions.exps,attribute:0
783+msgid "Product SubTotal combination"
784+msgstr "Combinació subtotal del producte"
785+
786+#. module: sale_promotions
787+#: help:sale.order.line,promotion_line:0
788+msgid "Indicates if the line was created by promotions"
789+msgstr "Indicar si aquesta línia es creada per promocions"
790+
791+#. module: sale_promotions
792+#: field:promos.rules,active:0
793+msgid "Active"
794+msgstr "Actiu"
795+
796+#. module: sale_promotions
797+#: selection:promos.rules,expected_logic_result:0
798+msgid "True"
799+msgstr "Verdader"
800+
801+#. module: sale_promotions
802+#: selection:promos.rules.conditions.exps,attribute:0
803+msgid "Total Amount"
804+msgstr "Quantitat Total"
805+
806+#. module: sale_promotions
807+#: view:promos.rules:0
808+msgid "Coupon/Voucher Settings"
809+msgstr "Configuració dels cupons"
810+
811+#. module: sale_promotions
812+#: view:promos.rules:0
813+msgid "Promotions"
814+msgstr "Promocions"
815+
816+#. module: sale_promotions
817+#: code:addons/sale_promotions/models/rules.py:0
818+#: selection:promos.rules.actions,action_type:0
819+#, python-format
820+msgid "Buy X get Y free"
821+msgstr "Compra X i emportis Y"
822+
823+#. module: sale_promotions
824+#: constraint:ir.ui.view:0
825+msgid "Invalid XML for View Architecture!"
826+msgstr "¡XML invàlid per la definició de la vista!"
827+
828+#. module: sale_promotions
829+#: selection:promos.rules.conditions.exps,attribute:0
830+msgid "Compute sub total of products"
831+msgstr "Calcula subtotal dels productes"
832+
833+#. module: sale_promotions
834+#: field:promos.rules.conditions.exps,comparator:0
835+msgid "Comparator"
836+msgstr "Comparador"
837+
838+#. module: sale_promotions
839+#: selection:promos.rules.conditions.exps,attribute:0
840+msgid "Tax Amount"
841+msgstr "Impostos"
842+
843+#. module: sale_promotions
844+#: code:addons/sale_promotions/models/rules.py:0
845+#: selection:promos.rules.conditions.exps,attribute:0
846+#, python-format
847+msgid "Untaxed Total"
848+msgstr "Base imponible"
849+
850+#. module: sale_promotions
851+#: field:promos.rules.conditions.exps,value:0
852+msgid "Value"
853+msgstr "Valor"
854+
855+#. module: sale_promotions
856+#: code:addons/sale_promotions/models/rules.py:0
857+#: selection:promos.rules.conditions.exps,comparator:0
858+#, python-format
859+msgid "equals"
860+msgstr "es igual a"
861+
862+#. module: sale_promotions
863+#: view:promos.rules:0
864+#: field:promos.rules,partner_categories:0
865+msgid "Partner Categories"
866+msgstr "Categories de clients"
867+
868+#. module: sale_promotions
869+#: selection:promos.rules.conditions.exps,attribute:0
870+msgid "Product Quantity combination"
871+msgstr "Combinació quantitat del producte"
872+
873+#. module: sale_promotions
874+#: field:promos.rules,uses_per_partner:0
875+msgid "Uses per Partner"
876+msgstr "Usos per client"
877+
878+#. module: sale_promotions
879+#: selection:promos.rules.conditions.exps,attribute:0
880+msgid "Compute sub total excluding products"
881+msgstr "Calcula subtotal excloent productes"
882+
883+#. module: sale_promotions
884+#: field:promos.rules,logic:0
885+msgid "Logic"
886+msgstr "Lògica"
887+
888+#. module: sale_promotions
889+#: view:promos.rules:0
890+msgid "If"
891+msgstr "Si"
892+
893+#. module: sale_promotions
894+#: field:promos.rules.actions,action_type:0
895+msgid "Action"
896+msgstr "Accions"
897+
898+#. module: sale_promotions
899+#: field:promos.rules,expressions:0
900+msgid "Expressions/Conditions"
901+msgstr "Expressions/Condicions"
902+
903+#. module: sale_promotions
904+#: field:promos.rules.actions,promotion:0
905+#: field:promos.rules.conditions.exps,promotion:0
906+msgid "Promotion"
907+msgstr "Promoció"
908+
909+#. module: sale_promotions
910+#: selection:promos.rules.conditions.exps,attribute:0
911+msgid "Custom domain expression"
912+msgstr "Expressió personalitzada"
913+
914+#. module: sale_promotions
915+#: code:addons/sale_promotions/models/rules.py:0
916+#: selection:promos.rules.actions,action_type:0
917+#, python-format
918+msgid "Discount % on Sub Total"
919+msgstr "Descompte % en el subtotal"
920+
921+#. module: sale_promotions
922+#: code:addons/sale_promotions/models/rules.py:0
923+#: selection:promos.rules.conditions.exps,comparator:0
924+#, python-format
925+msgid "less than or equal to"
926+msgstr "menor o igual a"
927+
928+#. module: sale_promotions
929+#: field:sale.order.line,promotion_line:0
930+msgid "Promotion Line"
931+msgstr "Línia de promoció"
932+
933+#. module: sale_promotions
934+#: field:promos.rules,shop:0
935+msgid "Shop"
936+msgstr "Botiga"
937+
938+#. module: sale_promotions
939+#: model:ir.module.module,shortdesc:sale_promotions.module_meta_information
940+msgid "Promotions for Open ERP"
941+msgstr "Promociones per OpenERP"
942+
943+#. module: sale_promotions
944+#: selection:promos.rules,logic:0
945+msgid "All"
946+msgstr "Tot"
947+
948+#. module: sale_promotions
949+#: model:ir.module.module,description:sale_promotions.module_meta_information
950+msgid ""
951+"\n"
952+" Promotions on Sale Order for Open ERP\n"
953+" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
954+" Features:\n"
955+" 1. Promotions based on conditions and coupons\n"
956+" 2. Web services API compliance\n"
957+" \n"
958+" Credits:\n"
959+" This design is based/inspired by the Magento commerce\n"
960+" Special Thanks to Yannick Buron for analysis\n"
961+" "
962+msgstr ""
963+"\n"
964+" Promocions en les comandes de venda d'OpenERP\n"
965+" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
966+" Característiques:\n"
967+" 1. Promociones basades en condicions i cupons\n"
968+" 2. Web services API pel seu comerç electrònic\n"
969+" \n"
970+" Crèdits:\n"
971+" Aquest mòdul està dissenyat/inspirat en Magento ecommerce\n"
972+" Agraïments a Yannick Buron pel anàlisis\n"
973+" "
974+
975+#. module: sale_promotions
976+#: field:promos.rules,sequence:0
977+#: field:promos.rules.actions,sequence:0
978+#: field:promos.rules.conditions.exps,sequence:0
979+msgid "Sequence"
980+msgstr "Seqüència"
981+
982+#. module: sale_promotions
983+#: code:addons/sale_promotions/models/rules.py:0
984+#: selection:promos.rules.conditions.exps,comparator:0
985+#, python-format
986+msgid "is in"
987+msgstr "es en"
988+
989+#. module: sale_promotions
990+#: field:promos.rules.conditions.exps,attribute:0
991+msgid "Attribute"
992+msgstr "Atribut"
993+
994+#. module: sale_promotions
995+#: view:promos.rules.conditions.expres
996+#: view:promos.rules.conditions.exps:0
997+msgid "Rule Expressions"
998+msgstr "Expressió de la regla"
999+
1000+#. module: sale_promotions
1001+#: code:addons/sale_promotions/models/rules.py:0
1002+#: selection:promos.rules.conditions.exps,comparator:0
1003+#, python-format
1004+msgid "less than"
1005+msgstr "menys de"
1006+
1007+#. module: sale_promotions
1008+#: view:promos.rules:0
1009+#: field:promos.rules,actions:0
1010+msgid "Actions"
1011+msgstr "Accions"
1012+
1013+#. module: sale_promotions
1014+#: help:promos.rules,partner_categories:0
1015+msgid "Applicable to all if none is selected"
1016+msgstr "Aplicable en tot si cap es seleccionat"
1017+
1018+#. module: sale_promotions
1019+#: selection:promos.rules.conditions.exps,attribute:0
1020+msgid "Product NetPrice combination"
1021+msgstr "Combinació preu net del producte"
1022+
1023+#. module: sale_promotions
1024+#: code:addons/sale_promotions/models/rules.py:0
1025+#: selection:promos.rules.actions,action_type:0
1026+#, python-format
1027+msgid "Discount % on Product"
1028+msgstr "Descompte % en el producte"
1029+
1030+#. module: sale_promotions
1031+#: help:promos.rules,coupon_used:0
1032+msgid "The number of times this coupon has been used."
1033+msgstr "El número de cupons ja s'ha utilitzat."
1034+
1035+#. module: sale_promotions
1036+#: selection:promos.rules.conditions.exps,attribute:0
1037+msgid "Product Code in order"
1038+msgstr "Codi producte en la comanda"
1039+
1040+#. module: sale_promotions
1041+#: view:promos.rules:0
1042+msgid "Expressions"
1043+msgstr "Expressions"
1044+
1045+#. module: sale_promotions
1046+#: code:addons/sale_promotions/models/rules.py:0
1047+#: selection:promos.rules.actions,action_type:0
1048+#, python-format
1049+msgid "Fixed amount on Product"
1050+msgstr "Quantitat fixe del producte"
1051+
1052+#. module: sale_promotions
1053+#: selection:promos.rules,logic:0
1054+msgid "Any"
1055+msgstr "Cap"
1056+
1057+#. module: sale_promotions
1058+#: view:sale.order:0
1059+msgid "Apply Promotions"
1060+msgstr "Aplicar promocions"
1061+
1062+#. module: sale_promotions
1063+#: field:promos.rules,from_date:0
1064+msgid "From Date"
1065+msgstr "Fins a"
1066+
1067
1068=== added file 'i18n/es.po'
1069--- i18n/es.po 1970-01-01 00:00:00 +0000
1070+++ i18n/es.po 2011-11-30 12:20:28 +0000
1071@@ -0,0 +1,421 @@
1072+# Translation of OpenERP Server.
1073+# This file contains the translation of the following modules:
1074+# * sale_promotions
1075+#
1076+msgid ""
1077+msgstr ""
1078+"Project-Id-Version: OpenERP Server 5.0.15\n"
1079+"Report-Msgid-Bugs-To: support@openerp.com\n"
1080+"POT-Creation-Date: 2011-03-14 14:53+0000\n"
1081+"PO-Revision-Date: 2011-10-11 17:39+0100\n"
1082+"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
1083+"Language-Team: \n"
1084+"MIME-Version: 1.0\n"
1085+"Content-Type: text/plain; charset=UTF-8\n"
1086+"Content-Transfer-Encoding: 8bit\n"
1087+"Plural-Forms: \n"
1088+
1089+#. module: sale_promotions
1090+#: field:promos.rules,name:0
1091+msgid "Promo Name"
1092+msgstr "Nombre"
1093+
1094+#. module: sale_promotions
1095+#: view:promos.rules:0
1096+msgid "expressions are"
1097+msgstr "las expresiones son"
1098+
1099+#. module: sale_promotions
1100+#: field:promos.rules.conditions.exps,stop_further:0
1101+msgid "Stop further checks"
1102+msgstr "Finalizar comprobación"
1103+
1104+#. module: sale_promotions
1105+#: field:promos.rules,uses_per_coupon:0
1106+msgid "Uses per Coupon"
1107+msgstr "Usos por cupón"
1108+
1109+#. module: sale_promotions
1110+#: field:promos.rules,coupon_used:0
1111+msgid "Number of Coupon Uses"
1112+msgstr "Número de usos por cupón"
1113+
1114+#. module: sale_promotions
1115+#: field:promos.rules.actions,product_code:0
1116+msgid "Product Code"
1117+msgstr "Código producto"
1118+
1119+#. module: sale_promotions
1120+#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
1121+#: model:ir.model,name:sale_promotions.model_promos_rules
1122+#: model:ir.ui.menu,name:sale_promotions.promos
1123+msgid "Promotion Rules"
1124+msgstr "Reglas de promoción"
1125+
1126+#. module: sale_promotions
1127+#: field:sale.order,coupon_code:0
1128+msgid "Promo Coupon Code"
1129+msgstr "Código cupón de la promoción"
1130+
1131+#. module: sale_promotions
1132+#: view:promos.rules:0
1133+msgid "Applicable Period"
1134+msgstr "Periodo aplicable"
1135+
1136+#. module: sale_promotions
1137+#: field:promos.rules,stop_further:0
1138+msgid "Stop Checks"
1139+msgstr "Finalizar proceso"
1140+
1141+#. module: sale_promotions
1142+#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
1143+msgid "Expressions for conditions"
1144+msgstr "Expresiones para las condiciones"
1145+
1146+#. module: sale_promotions
1147+#: field:promos.rules,to_date:0
1148+msgid "To Date"
1149+msgstr "Hasta"
1150+
1151+#. module: sale_promotions
1152+#: code:addons/sale_promotions/models/rules.py:62
1153+#: selection:promos.rules.conditions.exps,comparator:0
1154+#, python-format
1155+msgid "not equal to"
1156+msgstr "no es igual a"
1157+
1158+#. module: sale_promotions
1159+#: field:promos.rules.actions,arguments:0
1160+msgid "Arguments"
1161+msgstr "Argumentos"
1162+
1163+#. module: sale_promotions
1164+#: code:addons/sale_promotions/models/rules.py:64
1165+#: selection:promos.rules.conditions.exps,comparator:0
1166+#, python-format
1167+msgid "greater than or equal to"
1168+msgstr "mayor o igual a"
1169+
1170+#. module: sale_promotions
1171+#: field:promos.rules,expected_logic_result:0
1172+msgid "Output"
1173+msgstr "Salida"
1174+
1175+#. module: sale_promotions
1176+#: selection:promos.rules.conditions.exps,attribute:0
1177+msgid "Product UnitPrice combination"
1178+msgstr "Combinación precio unidad del producto"
1179+
1180+#. module: sale_promotions
1181+#: help:promos.rules,stop_further:0
1182+msgid "Stops further promotions being checked"
1183+msgstr "Finalizar promociones"
1184+
1185+#. module: sale_promotions
1186+#: model:ir.model,name:sale_promotions.model_promos_rules_actions
1187+msgid "Promotions actions"
1188+msgstr "Acciones de la promoción"
1189+
1190+#. module: sale_promotions
1191+#: selection:promos.rules.conditions.exps,attribute:0
1192+msgid "Product Discount combination"
1193+msgstr "Combinación descuento del producto"
1194+
1195+#. module: sale_promotions
1196+#: view:promos.rules:0
1197+msgid "Conditions"
1198+msgstr "Condiciones"
1199+
1200+#. module: sale_promotions
1201+#: code:addons/sale_promotions/models/rules.py:75
1202+#: selection:promos.rules.actions,action_type:0
1203+#, python-format
1204+msgid "Fixed amount on Sub Total"
1205+msgstr "Cantidad fija en subtotal"
1206+
1207+#. module: sale_promotions
1208+#: sql_constraint:sale.order:0
1209+msgid "Order Reference must be unique !"
1210+msgstr "Order Reference must be unique !"
1211+
1212+#. module: sale_promotions
1213+#: view:promos.rules:0
1214+#: field:promos.rules,description:0
1215+msgid "Description"
1216+msgstr "Descripción"
1217+
1218+#. module: sale_promotions
1219+#: field:promos.rules,coupon_code:0
1220+msgid "Coupon Code"
1221+msgstr "Código cupón"
1222+
1223+#. module: sale_promotions
1224+#: code:addons/sale_promotions/models/rules.py:68
1225+#: selection:promos.rules.conditions.exps,comparator:0
1226+#, python-format
1227+msgid "is not in"
1228+msgstr "no está en"
1229+
1230+#. module: sale_promotions
1231+#: selection:promos.rules.conditions.exps,attribute:0
1232+msgid "Product Weight combination"
1233+msgstr "Combinación peso del producto"
1234+
1235+#. module: sale_promotions
1236+#: selection:promos.rules.conditions.exps,attribute:0
1237+msgid "Product SubTotal combination"
1238+msgstr "Combinación subtotal del producto"
1239+
1240+#. module: sale_promotions
1241+#: help:sale.order.line,promotion_line:0
1242+msgid "Indicates if the line was created by promotions"
1243+msgstr "Indicar si esta línea es creada por promociones"
1244+
1245+#. module: sale_promotions
1246+#: field:promos.rules,active:0
1247+msgid "Active"
1248+msgstr "Activo"
1249+
1250+#. module: sale_promotions
1251+#: selection:promos.rules,expected_logic_result:0
1252+msgid "True"
1253+msgstr "Verdadero"
1254+
1255+#. module: sale_promotions
1256+#: view:promos.rules:0
1257+msgid "Coupon/Voucher Settings"
1258+msgstr "Configuración de los cupones"
1259+
1260+#. module: sale_promotions
1261+#: view:promos.rules:0
1262+msgid "Promotions"
1263+msgstr "Promociones"
1264+
1265+#. module: sale_promotions
1266+#: code:addons/sale_promotions/models/rules.py:76
1267+#: selection:promos.rules.actions,action_type:0
1268+#, python-format
1269+msgid "Buy X get Y free"
1270+msgstr "Compre X y llévate Y"
1271+
1272+#. module: sale_promotions
1273+#: selection:promos.rules.conditions.exps,attribute:0
1274+msgid "Compute sub total of products"
1275+msgstr "Calcula subtotal de los productos"
1276+
1277+#. module: sale_promotions
1278+#: field:promos.rules.conditions.exps,comparator:0
1279+msgid "Comparator"
1280+msgstr "Comparador"
1281+
1282+#. module: sale_promotions
1283+#: selection:promos.rules.conditions.exps,attribute:0
1284+msgid "Tax Amount"
1285+msgstr "Impuestos"
1286+
1287+#. module: sale_promotions
1288+#: code:addons/sale_promotions/models/rules.py:42
1289+#: selection:promos.rules.conditions.exps,attribute:0
1290+#, python-format
1291+msgid "Untaxed Total"
1292+msgstr "Base imponible"
1293+
1294+#. module: sale_promotions
1295+#: field:promos.rules.conditions.exps,value:0
1296+msgid "Value"
1297+msgstr "Valor"
1298+
1299+#. module: sale_promotions
1300+#: code:addons/sale_promotions/models/rules.py:61
1301+#: selection:promos.rules.conditions.exps,comparator:0
1302+#, python-format
1303+msgid "equals"
1304+msgstr "es igual a"
1305+
1306+#. module: sale_promotions
1307+#: view:promos.rules:0
1308+#: field:promos.rules,partner_categories:0
1309+msgid "Partner Categories"
1310+msgstr "Categorias de clientes"
1311+
1312+#. module: sale_promotions
1313+#: selection:promos.rules.conditions.exps,attribute:0
1314+msgid "Product Quantity combination"
1315+msgstr "Combinación cantidad del producto"
1316+
1317+#. module: sale_promotions
1318+#: field:promos.rules,uses_per_partner:0
1319+msgid "Uses per Partner"
1320+msgstr "Usos por cliente"
1321+
1322+#. module: sale_promotions
1323+#: selection:promos.rules.conditions.exps,attribute:0
1324+msgid "Compute sub total excluding products"
1325+msgstr "Calcula subtotal excluyendo productos"
1326+
1327+#. module: sale_promotions
1328+#: field:promos.rules,logic:0
1329+msgid "Logic"
1330+msgstr "Lógica"
1331+
1332+#. module: sale_promotions
1333+#: view:promos.rules:0
1334+msgid "If"
1335+msgstr "Si"
1336+
1337+#. module: sale_promotions
1338+#: field:promos.rules.actions,action_type:0
1339+msgid "Action"
1340+msgstr "Acciones"
1341+
1342+#. module: sale_promotions
1343+#: selection:promos.rules,expected_logic_result:0
1344+msgid "False"
1345+msgstr "Falso"
1346+
1347+#. module: sale_promotions
1348+#: field:promos.rules.actions,promotion:0
1349+#: field:promos.rules.conditions.exps,promotion:0
1350+msgid "Promotion"
1351+msgstr "Promoción"
1352+
1353+#. module: sale_promotions
1354+#: selection:promos.rules.conditions.exps,attribute:0
1355+msgid "Custom domain expression"
1356+msgstr "Expresión personalizada"
1357+
1358+#. module: sale_promotions
1359+#: code:addons/sale_promotions/models/rules.py:74
1360+#: selection:promos.rules.actions,action_type:0
1361+#, python-format
1362+msgid "Discount % on Sub Total"
1363+msgstr "Descuento % en el subtotal"
1364+
1365+#. module: sale_promotions
1366+#: code:addons/sale_promotions/models/rules.py:66
1367+#: selection:promos.rules.conditions.exps,comparator:0
1368+#, python-format
1369+msgid "less than or equal to"
1370+msgstr "menor o igual a"
1371+
1372+#. module: sale_promotions
1373+#: field:sale.order.line,promotion_line:0
1374+msgid "Promotion Line"
1375+msgstr "Línia de promoción"
1376+
1377+#. module: sale_promotions
1378+#: field:promos.rules,shop:0
1379+msgid "Shop"
1380+msgstr "Tienda"
1381+
1382+#. module: sale_promotions
1383+#: selection:promos.rules.conditions.exps,attribute:0
1384+msgid "Total Amount"
1385+msgstr "Cantidad Total"
1386+
1387+#. module: sale_promotions
1388+#: selection:promos.rules,logic:0
1389+msgid "All"
1390+msgstr "Todo"
1391+
1392+#. module: sale_promotions
1393+#: model:ir.model,name:sale_promotions.model_sale_order
1394+msgid "Sales Order"
1395+msgstr "Sales Order"
1396+
1397+#. module: sale_promotions
1398+#: field:promos.rules,expressions:0
1399+msgid "Expressions/Conditions"
1400+msgstr "Expresiones/Condiciones"
1401+
1402+#. module: sale_promotions
1403+#: field:promos.rules,sequence:0
1404+#: field:promos.rules.actions,sequence:0
1405+#: field:promos.rules.conditions.exps,sequence:0
1406+msgid "Sequence"
1407+msgstr "Secuencia"
1408+
1409+#. module: sale_promotions
1410+#: code:addons/sale_promotions/models/rules.py:67
1411+#: selection:promos.rules.conditions.exps,comparator:0
1412+#, python-format
1413+msgid "is in"
1414+msgstr "es en"
1415+
1416+#. module: sale_promotions
1417+#: field:promos.rules.conditions.exps,attribute:0
1418+msgid "Attribute"
1419+msgstr "Atributo"
1420+
1421+#. module: sale_promotions
1422+#: code:addons/sale_promotions/models/rules.py:65
1423+#: selection:promos.rules.conditions.exps,comparator:0
1424+#, python-format
1425+msgid "less than"
1426+msgstr "menos de"
1427+
1428+#. module: sale_promotions
1429+#: view:promos.rules:0
1430+#: field:promos.rules,actions:0
1431+msgid "Actions"
1432+msgstr "Acciones"
1433+
1434+#. module: sale_promotions
1435+#: help:promos.rules,partner_categories:0
1436+msgid "Applicable to all if none is selected"
1437+msgstr "Aplicable en todo si ninguno es seleccionado"
1438+
1439+#. module: sale_promotions
1440+#: model:ir.model,name:sale_promotions.model_sale_order_line
1441+msgid "Sales Order Line"
1442+msgstr "Sales Order Line"
1443+
1444+#. module: sale_promotions
1445+#: code:addons/sale_promotions/models/rules.py:63
1446+#: selection:promos.rules.conditions.exps,comparator:0
1447+#, python-format
1448+msgid "greater than"
1449+msgstr "mayor que"
1450+
1451+#. module: sale_promotions
1452+#: code:addons/sale_promotions/models/rules.py:72
1453+#: selection:promos.rules.actions,action_type:0
1454+#, python-format
1455+msgid "Discount % on Product"
1456+msgstr "Descuento % en el producto"
1457+
1458+#. module: sale_promotions
1459+#: help:promos.rules,coupon_used:0
1460+msgid "The number of times this coupon has been used."
1461+msgstr "El número de cupones ya se han utilizado."
1462+
1463+#. module: sale_promotions
1464+#: selection:promos.rules.conditions.exps,attribute:0
1465+msgid "Product Code in order"
1466+msgstr "Código producto en orden"
1467+
1468+#. module: sale_promotions
1469+#: code:addons/sale_promotions/models/rules.py:73
1470+#: selection:promos.rules.actions,action_type:0
1471+#, python-format
1472+msgid "Fixed amount on Product"
1473+msgstr "Cantidad fija del producto"
1474+
1475+#. module: sale_promotions
1476+#: selection:promos.rules,logic:0
1477+msgid "Any"
1478+msgstr "Ninguno"
1479+
1480+#. module: sale_promotions
1481+#: view:sale.order:0
1482+msgid "Apply Promotions"
1483+msgstr "Aplicar promociones"
1484+
1485+#. module: sale_promotions
1486+#: field:promos.rules,from_date:0
1487+msgid "From Date"
1488+msgstr "Desde"
1489+
1490+#~ msgid "Rule Expressions"
1491+#~ msgstr "Expresión de la regla"
1492+
1493
1494=== added file 'i18n/es_ES.po'
1495--- i18n/es_ES.po 1970-01-01 00:00:00 +0000
1496+++ i18n/es_ES.po 2011-11-30 12:20:28 +0000
1497@@ -0,0 +1,471 @@
1498+# Translation of OpenERP Server.
1499+# This file contains the translation of the following modules:
1500+# * sale_promotions
1501+#
1502+msgid ""
1503+msgstr ""
1504+"Project-Id-Version: OpenERP Server 5.0.15\n"
1505+"Report-Msgid-Bugs-To: support@openerp.com\n"
1506+"POT-Creation-Date: 2011-03-14 11:44:29+0000\n"
1507+"PO-Revision-Date: 2011-03-14 13:17+0100\n"
1508+"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
1509+"Language-Team: \n"
1510+"MIME-Version: 1.0\n"
1511+"Content-Type: text/plain; charset=UTF-8\n"
1512+"Content-Transfer-Encoding: 8bit\n"
1513+"Plural-Forms: \n"
1514+
1515+#. module: sale_promotions
1516+#: selection:promos.rules,expected_logic_result:0
1517+msgid "False"
1518+msgstr "Falso"
1519+
1520+#. module: sale_promotions
1521+#: field:promos.rules,name:0
1522+msgid "Promo Name"
1523+msgstr "Nombre"
1524+
1525+#. module: sale_promotions
1526+#: constraint:ir.model:0
1527+msgid "The Object name must start with x_ and not contain any special character !"
1528+msgstr "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter especial!"
1529+
1530+#. module: sale_promotions
1531+#: field:promos.rules.conditions.exps,stop_further:0
1532+msgid "Stop further checks"
1533+msgstr "Finalizar comprobación"
1534+
1535+#. module: sale_promotions
1536+#: field:promos.rules,uses_per_coupon:0
1537+msgid "Uses per Coupon"
1538+msgstr "Usos por cupón"
1539+
1540+#. module: sale_promotions
1541+#: field:promos.rules,coupon_used:0
1542+msgid "Number of Coupon Uses"
1543+msgstr "Número de usos por cupón"
1544+
1545+#. module: sale_promotions
1546+#: field:promos.rules.actions,product_code:0
1547+msgid "Product Code"
1548+msgstr "Código producto"
1549+
1550+#. module: sale_promotions
1551+#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
1552+#: model:ir.model,name:sale_promotions.model_promos_rules
1553+#: model:ir.ui.menu,name:sale_promotions.promos
1554+msgid "Promotion Rules"
1555+msgstr "Reglas de promoción"
1556+
1557+#. module: sale_promotions
1558+#: field:sale.order,coupon_code:0
1559+msgid "Promo Coupon Code"
1560+msgstr "Código cupón de la promoción"
1561+
1562+#. module: sale_promotions
1563+#: view:promos.rules:0
1564+msgid "Applicable Period"
1565+msgstr "Periodo aplicable"
1566+
1567+#. module: sale_promotions
1568+#: code:addons/sale_promotions/models/rules.py:0
1569+#: selection:promos.rules.conditions.exps,comparator:0
1570+#, python-format
1571+msgid "greater than"
1572+msgstr "mayor que"
1573+
1574+#. module: sale_promotions
1575+#: view:promos.rules:0
1576+msgid "expressions are"
1577+msgstr "las expresiones son"
1578+
1579+#. module: sale_promotions
1580+#: field:promos.rules,stop_further:0
1581+msgid "Stop Checks"
1582+msgstr "Finalizar proceso"
1583+
1584+#. module: sale_promotions
1585+#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
1586+msgid "Expressions for conditions"
1587+msgstr "Expresiones para las condiciones"
1588+
1589+#. module: sale_promotions
1590+#: field:promos.rules,to_date:0
1591+msgid "To Date"
1592+msgstr "Desde"
1593+
1594+#. module: sale_promotions
1595+#: code:addons/sale_promotions/models/rules.py:0
1596+#: selection:promos.rules.conditions.exps,comparator:0
1597+#, python-format
1598+msgid "not equal to"
1599+msgstr "no es igual a"
1600+
1601+#. module: sale_promotions
1602+#: field:promos.rules.actions,arguments:0
1603+msgid "Arguments"
1604+msgstr "Argumentos"
1605+
1606+#. module: sale_promotions
1607+#: constraint:ir.actions.act_window:0
1608+msgid "Invalid model name in the action definition."
1609+msgstr "Nombre del modelo inválido en la definición de la acción."
1610+
1611+#. module: sale_promotions
1612+#: field:promos.rules,expected_logic_result:0
1613+msgid "Output"
1614+msgstr "Salida"
1615+
1616+#. module: sale_promotions
1617+#: selection:promos.rules.conditions.exps,attribute:0
1618+msgid "Product UnitPrice combination"
1619+msgstr "Combinación precio unidad del producto"
1620+
1621+#. module: sale_promotions
1622+#: help:promos.rules,stop_further:0
1623+msgid "Stops further promotions being checked"
1624+msgstr "Finalizar promociones"
1625+
1626+#. module: sale_promotions
1627+#: model:ir.model,name:sale_promotions.model_promos_rules_actions
1628+msgid "Promotions actions"
1629+msgstr "Acciones de la promoción"
1630+
1631+#. module: sale_promotions
1632+#: selection:promos.rules.conditions.exps,attribute:0
1633+msgid "Product Discount combination"
1634+msgstr "Combinación descuento del producto"
1635+
1636+#. module: sale_promotions
1637+#: view:promos.rules:0
1638+msgid "Conditions"
1639+msgstr "Condiciones"
1640+
1641+#. module: sale_promotions
1642+#: code:addons/sale_promotions/models/rules.py:0
1643+#: selection:promos.rules.conditions.exps,comparator:0
1644+#, python-format
1645+msgid "greater than or equal to"
1646+msgstr "mayor o igual a"
1647+
1648+#. module: sale_promotions
1649+#: code:addons/sale_promotions/models/rules.py:0
1650+#: selection:promos.rules.actions,action_type:0
1651+#, python-format
1652+msgid "Fixed amount on Sub Total"
1653+msgstr "Cantidad fija en subtotal"
1654+
1655+#. module: sale_promotions
1656+#: view:promos.rules:0
1657+#: field:promos.rules,description:0
1658+msgid "Description"
1659+msgstr "Descripción"
1660+
1661+#. module: sale_promotions
1662+#: field:promos.rules.conditions.exps,serialised_expr:0
1663+msgid "Expression"
1664+msgstr "Expresión"
1665+
1666+#. module: sale_promotions
1667+#: field:promos.rules,coupon_code:0
1668+msgid "Coupon Code"
1669+msgstr "Código cupón"
1670+
1671+#. module: sale_promotions
1672+#: code:addons/sale_promotions/models/rules.py:0
1673+#: selection:promos.rules.conditions.exps,comparator:0
1674+#, python-format
1675+msgid "is not in"
1676+msgstr "no está en"
1677+
1678+#. module: sale_promotions
1679+#: selection:promos.rules.conditions.exps,attribute:0
1680+msgid "Product Weight combination"
1681+msgstr "Combinación peso del producto"
1682+
1683+#. module: sale_promotions
1684+#: selection:promos.rules.conditions.exps,attribute:0
1685+msgid "Product SubTotal combination"
1686+msgstr "Combinación subtotal del producto"
1687+
1688+#. module: sale_promotions
1689+#: help:sale.order.line,promotion_line:0
1690+msgid "Indicates if the line was created by promotions"
1691+msgstr "Indicar si esta línea es creada por promociones"
1692+
1693+#. module: sale_promotions
1694+#: field:promos.rules,active:0
1695+msgid "Active"
1696+msgstr "Activo"
1697+
1698+#. module: sale_promotions
1699+#: selection:promos.rules,expected_logic_result:0
1700+msgid "True"
1701+msgstr "Verdadero"
1702+
1703+#. module: sale_promotions
1704+#: selection:promos.rules.conditions.exps,attribute:0
1705+msgid "Total Amount"
1706+msgstr "Cantidad Total"
1707+
1708+#. module: sale_promotions
1709+#: view:promos.rules:0
1710+msgid "Coupon/Voucher Settings"
1711+msgstr "Configuración de los cupones"
1712+
1713+#. module: sale_promotions
1714+#: view:promos.rules:0
1715+msgid "Promotions"
1716+msgstr "Promociones"
1717+
1718+#. module: sale_promotions
1719+#: code:addons/sale_promotions/models/rules.py:0
1720+#: selection:promos.rules.actions,action_type:0
1721+#, python-format
1722+msgid "Buy X get Y free"
1723+msgstr "Compre X y llévate Y"
1724+
1725+#. module: sale_promotions
1726+#: constraint:ir.ui.view:0
1727+msgid "Invalid XML for View Architecture!"
1728+msgstr "¡XML inválido para la definición de la vista!"
1729+
1730+#. module: sale_promotions
1731+#: selection:promos.rules.conditions.exps,attribute:0
1732+msgid "Compute sub total of products"
1733+msgstr "Calcula subtotal de los productos"
1734+
1735+#. module: sale_promotions
1736+#: field:promos.rules.conditions.exps,comparator:0
1737+msgid "Comparator"
1738+msgstr "Comparador"
1739+
1740+#. module: sale_promotions
1741+#: selection:promos.rules.conditions.exps,attribute:0
1742+msgid "Tax Amount"
1743+msgstr "Impuestos"
1744+
1745+#. module: sale_promotions
1746+#: code:addons/sale_promotions/models/rules.py:0
1747+#: selection:promos.rules.conditions.exps,attribute:0
1748+#, python-format
1749+msgid "Untaxed Total"
1750+msgstr "Base imponible"
1751+
1752+#. module: sale_promotions
1753+#: field:promos.rules.conditions.exps,value:0
1754+msgid "Value"
1755+msgstr "Valor"
1756+
1757+#. module: sale_promotions
1758+#: code:addons/sale_promotions/models/rules.py:0
1759+#: selection:promos.rules.conditions.exps,comparator:0
1760+#, python-format
1761+msgid "equals"
1762+msgstr "es igual a"
1763+
1764+#. module: sale_promotions
1765+#: view:promos.rules:0
1766+#: field:promos.rules,partner_categories:0
1767+msgid "Partner Categories"
1768+msgstr "Categorias de clientes"
1769+
1770+#. module: sale_promotions
1771+#: selection:promos.rules.conditions.exps,attribute:0
1772+msgid "Product Quantity combination"
1773+msgstr "Combinación cantidad del producto"
1774+
1775+#. module: sale_promotions
1776+#: field:promos.rules,uses_per_partner:0
1777+msgid "Uses per Partner"
1778+msgstr "Usos por cliente"
1779+
1780+#. module: sale_promotions
1781+#: selection:promos.rules.conditions.exps,attribute:0
1782+msgid "Compute sub total excluding products"
1783+msgstr "Calcula subtotal excluyendo productos"
1784+
1785+#. module: sale_promotions
1786+#: field:promos.rules,logic:0
1787+msgid "Logic"
1788+msgstr "Lógica"
1789+
1790+#. module: sale_promotions
1791+#: view:promos.rules:0
1792+msgid "If"
1793+msgstr "Si"
1794+
1795+#. module: sale_promotions
1796+#: field:promos.rules.actions,action_type:0
1797+msgid "Action"
1798+msgstr "Acciones"
1799+
1800+#. module: sale_promotions
1801+#: field:promos.rules,expressions:0
1802+msgid "Expressions/Conditions"
1803+msgstr "Expresiones/Condiciones"
1804+
1805+#. module: sale_promotions
1806+#: field:promos.rules.actions,promotion:0
1807+#: field:promos.rules.conditions.exps,promotion:0
1808+msgid "Promotion"
1809+msgstr "Promoción"
1810+
1811+#. module: sale_promotions
1812+#: selection:promos.rules.conditions.exps,attribute:0
1813+msgid "Custom domain expression"
1814+msgstr "Expresión personalizada"
1815+
1816+#. module: sale_promotions
1817+#: code:addons/sale_promotions/models/rules.py:0
1818+#: selection:promos.rules.actions,action_type:0
1819+#, python-format
1820+msgid "Discount % on Sub Total"
1821+msgstr "Descuento % en el subtotal"
1822+
1823+#. module: sale_promotions
1824+#: code:addons/sale_promotions/models/rules.py:0
1825+#: selection:promos.rules.conditions.exps,comparator:0
1826+#, python-format
1827+msgid "less than or equal to"
1828+msgstr "menor o igual a"
1829+
1830+#. module: sale_promotions
1831+#: field:sale.order.line,promotion_line:0
1832+msgid "Promotion Line"
1833+msgstr "Línia de promoción"
1834+
1835+#. module: sale_promotions
1836+#: field:promos.rules,shop:0
1837+msgid "Shop"
1838+msgstr "Tienda"
1839+
1840+#. module: sale_promotions
1841+#: model:ir.module.module,shortdesc:sale_promotions.module_meta_information
1842+msgid "Promotions for Open ERP"
1843+msgstr "Promociones para OpenERP"
1844+
1845+#. module: sale_promotions
1846+#: selection:promos.rules,logic:0
1847+msgid "All"
1848+msgstr "Todo"
1849+
1850+#. module: sale_promotions
1851+#: model:ir.module.module,description:sale_promotions.module_meta_information
1852+msgid ""
1853+"\n"
1854+" Promotions on Sale Order for Open ERP\n"
1855+" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
1856+" Features:\n"
1857+" 1. Promotions based on conditions and coupons\n"
1858+" 2. Web services API compliance\n"
1859+" \n"
1860+" Credits:\n"
1861+" This design is based/inspired by the Magento commerce\n"
1862+" Special Thanks to Yannick Buron for analysis\n"
1863+" "
1864+msgstr ""
1865+"\n"
1866+" Promociones en los pedidos de venta de OpenERP\n"
1867+" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
1868+" Características:\n"
1869+" 1. Promociones basadas en condiciones y cupones\n"
1870+" 2. Web services API para su comercio electrónico\n"
1871+" \n"
1872+" Créditos:\n"
1873+" Este módulo se ha diseñado/inspirado de Magento ecommerce\n"
1874+" Agradecimientos a Yannick Buron para el análisis\n"
1875+" "
1876+
1877+#. module: sale_promotions
1878+#: field:promos.rules,sequence:0
1879+#: field:promos.rules.actions,sequence:0
1880+#: field:promos.rules.conditions.exps,sequence:0
1881+msgid "Sequence"
1882+msgstr "Secuencia"
1883+
1884+#. module: sale_promotions
1885+#: code:addons/sale_promotions/models/rules.py:0
1886+#: selection:promos.rules.conditions.exps,comparator:0
1887+#, python-format
1888+msgid "is in"
1889+msgstr "es en"
1890+
1891+#. module: sale_promotions
1892+#: field:promos.rules.conditions.exps,attribute:0
1893+msgid "Attribute"
1894+msgstr "Atributo"
1895+
1896+#. module: sale_promotions
1897+#: view:promos.rules.conditions.expres
1898+#: view:promos.rules.conditions.exps:0
1899+msgid "Rule Expressions"
1900+msgstr "Expresión de la regla"
1901+
1902+#. module: sale_promotions
1903+#: code:addons/sale_promotions/models/rules.py:0
1904+#: selection:promos.rules.conditions.exps,comparator:0
1905+#, python-format
1906+msgid "less than"
1907+msgstr "menos de"
1908+
1909+#. module: sale_promotions
1910+#: view:promos.rules:0
1911+#: field:promos.rules,actions:0
1912+msgid "Actions"
1913+msgstr "Acciones"
1914+
1915+#. module: sale_promotions
1916+#: help:promos.rules,partner_categories:0
1917+msgid "Applicable to all if none is selected"
1918+msgstr "Aplicable en todo si ninguno es seleccionado"
1919+
1920+#. module: sale_promotions
1921+#: selection:promos.rules.conditions.exps,attribute:0
1922+msgid "Product NetPrice combination"
1923+msgstr "Combinación precio neto del producto"
1924+
1925+#. module: sale_promotions
1926+#: code:addons/sale_promotions/models/rules.py:0
1927+#: selection:promos.rules.actions,action_type:0
1928+#, python-format
1929+msgid "Discount % on Product"
1930+msgstr "Descuento % en el producto"
1931+
1932+#. module: sale_promotions
1933+#: help:promos.rules,coupon_used:0
1934+msgid "The number of times this coupon has been used."
1935+msgstr "El número de cupones ya se han utilizado."
1936+
1937+#. module: sale_promotions
1938+#: selection:promos.rules.conditions.exps,attribute:0
1939+msgid "Product Code in order"
1940+msgstr "Código producto en orden"
1941+
1942+#. module: sale_promotions
1943+#: view:promos.rules:0
1944+msgid "Expressions"
1945+msgstr "Expresiones"
1946+
1947+#. module: sale_promotions
1948+#: code:addons/sale_promotions/models/rules.py:0
1949+#: selection:promos.rules.actions,action_type:0
1950+#, python-format
1951+msgid "Fixed amount on Product"
1952+msgstr "Cantidad fija del producto"
1953+
1954+#. module: sale_promotions
1955+#: selection:promos.rules,logic:0
1956+msgid "Any"
1957+msgstr "Ninguno"
1958+
1959+#. module: sale_promotions
1960+#: view:sale.order:0
1961+msgid "Apply Promotions"
1962+msgstr "Aplicar promociones"
1963+
1964+#. module: sale_promotions
1965+#: field:promos.rules,from_date:0
1966+msgid "From Date"
1967+msgstr "Hasta"
1968+
1969
1970=== added file 'i18n/sale_promotions.pot'
1971--- i18n/sale_promotions.pot 1970-01-01 00:00:00 +0000
1972+++ i18n/sale_promotions.pot 2011-11-30 12:20:28 +0000
1973@@ -0,0 +1,431 @@
1974+# Translation of OpenERP Server.
1975+# This file contains the translation of the following modules:
1976+# * sale_promotions
1977+#
1978+msgid ""
1979+msgstr ""
1980+"Project-Id-Version: OpenERP Server 6.0.1\n"
1981+"Report-Msgid-Bugs-To: support@openerp.com\n"
1982+"POT-Creation-Date: 2011-03-14 14:53+0000\n"
1983+"PO-Revision-Date: 2011-03-14 14:53+0000\n"
1984+"Last-Translator: <>\n"
1985+"Language-Team: \n"
1986+"MIME-Version: 1.0\n"
1987+"Content-Type: text/plain; charset=UTF-8\n"
1988+"Content-Transfer-Encoding: \n"
1989+"Plural-Forms: \n"
1990+
1991+#. module: sale_promotions
1992+#: field:promos.rules,name:0
1993+msgid "Promo Name"
1994+msgstr "Promo Name"
1995+
1996+#. module: sale_promotions
1997+#: view:promos.rules:0
1998+msgid "expressions are"
1999+msgstr "expressions are"
2000+
2001+#. module: sale_promotions
2002+#: field:promos.rules.conditions.exps,stop_further:0
2003+msgid "Stop further checks"
2004+msgstr "Stop further checks"
2005+
2006+#. module: sale_promotions
2007+#: field:promos.rules,uses_per_coupon:0
2008+msgid "Uses per Coupon"
2009+msgstr "Uses per Coupon"
2010+
2011+#. module: sale_promotions
2012+#: field:promos.rules,coupon_used:0
2013+msgid "Number of Coupon Uses"
2014+msgstr "Number of Coupon Uses"
2015+
2016+#. module: sale_promotions
2017+#: field:promos.rules.actions,product_code:0
2018+msgid "Product Code"
2019+msgstr "Product Code"
2020+
2021+#. module: sale_promotions
2022+#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
2023+#: model:ir.model,name:sale_promotions.model_promos_rules
2024+#: model:ir.ui.menu,name:sale_promotions.promos
2025+msgid "Promotion Rules"
2026+msgstr "Promotion Rules"
2027+
2028+#. module: sale_promotions
2029+#: field:sale.order,coupon_code:0
2030+msgid "Promo Coupon Code"
2031+msgstr "Promo Coupon Code"
2032+
2033+#. module: sale_promotions
2034+#: view:promos.rules:0
2035+msgid "Applicable Period"
2036+msgstr "Applicable Period"
2037+
2038+#. module: sale_promotions
2039+#: field:promos.rules,stop_further:0
2040+msgid "Stop Checks"
2041+msgstr "Stop Checks"
2042+
2043+#. module: sale_promotions
2044+#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
2045+msgid "Expressions for conditions"
2046+msgstr "Expressions for conditions"
2047+
2048+#. module: sale_promotions
2049+#: field:promos.rules,to_date:0
2050+msgid "To Date"
2051+msgstr "To Date"
2052+
2053+#. module: sale_promotions
2054+#: code:addons/sale_promotions/models/rules.py:62
2055+#: selection:promos.rules.conditions.exps,comparator:0
2056+#, python-format
2057+msgid "not equal to"
2058+msgstr "not equal to"
2059+
2060+#. module: sale_promotions
2061+#: field:promos.rules.actions,arguments:0
2062+msgid "Arguments"
2063+msgstr "Arguments"
2064+
2065+#. module: sale_promotions
2066+#: code:addons/sale_promotions/models/rules.py:64
2067+#: selection:promos.rules.conditions.exps,comparator:0
2068+#, python-format
2069+msgid "greater than or equal to"
2070+msgstr "greater than or equal to"
2071+
2072+#. module: sale_promotions
2073+#: field:promos.rules,expected_logic_result:0
2074+msgid "Output"
2075+msgstr "Output"
2076+
2077+#. module: sale_promotions
2078+#: selection:promos.rules.conditions.exps,attribute:0
2079+msgid "Product UnitPrice combination"
2080+msgstr "Product UnitPrice combination"
2081+
2082+#. module: sale_promotions
2083+#: help:promos.rules,stop_further:0
2084+msgid "Stops further promotions being checked"
2085+msgstr "Stops further promotions being checked"
2086+
2087+#. module: sale_promotions
2088+#: model:ir.model,name:sale_promotions.model_promos_rules_actions
2089+msgid "Promotions actions"
2090+msgstr "Promotions actions"
2091+
2092+#. module: sale_promotions
2093+#: selection:promos.rules.conditions.exps,attribute:0
2094+msgid "Product Discount combination"
2095+msgstr "Product Discount combination"
2096+
2097+#. module: sale_promotions
2098+#: view:promos.rules:0
2099+msgid "Conditions"
2100+msgstr "Conditions"
2101+
2102+#. module: sale_promotions
2103+#: code:addons/sale_promotions/models/rules.py:75
2104+#: selection:promos.rules.actions,action_type:0
2105+#, python-format
2106+msgid "Fixed amount on Sub Total"
2107+msgstr "Fixed amount on Sub Total"
2108+
2109+#. module: sale_promotions
2110+#: sql_constraint:sale.order:0
2111+msgid "Order Reference must be unique !"
2112+msgstr "Order Reference must be unique !"
2113+
2114+#. module: sale_promotions
2115+#: view:promos.rules:0
2116+#: field:promos.rules,description:0
2117+msgid "Description"
2118+msgstr "Description"
2119+
2120+#. module: sale_promotions
2121+#: field:promos.rules.conditions.exps,serialised_expr:0
2122+msgid "Expression"
2123+msgstr "Expression"
2124+
2125+#. module: sale_promotions
2126+#: field:promos.rules,coupon_code:0
2127+msgid "Coupon Code"
2128+msgstr "Coupon Code"
2129+
2130+#. module: sale_promotions
2131+#: code:addons/sale_promotions/models/rules.py:68
2132+#: selection:promos.rules.conditions.exps,comparator:0
2133+#, python-format
2134+msgid "is not in"
2135+msgstr "is not in"
2136+
2137+#. module: sale_promotions
2138+#: selection:promos.rules.conditions.exps,attribute:0
2139+msgid "Product Weight combination"
2140+msgstr "Product Weight combination"
2141+
2142+#. module: sale_promotions
2143+#: selection:promos.rules.conditions.exps,attribute:0
2144+msgid "Product SubTotal combination"
2145+msgstr "Product SubTotal combination"
2146+
2147+#. module: sale_promotions
2148+#: help:sale.order.line,promotion_line:0
2149+msgid "Indicates if the line was created by promotions"
2150+msgstr "Indicates if the line was created by promotions"
2151+
2152+#. module: sale_promotions
2153+#: field:promos.rules,active:0
2154+msgid "Active"
2155+msgstr "Active"
2156+
2157+#. module: sale_promotions
2158+#: selection:promos.rules,expected_logic_result:0
2159+msgid "True"
2160+msgstr "True"
2161+
2162+#. module: sale_promotions
2163+#: view:promos.rules:0
2164+msgid "Coupon/Voucher Settings"
2165+msgstr "Coupon/Voucher Settings"
2166+
2167+#. module: sale_promotions
2168+#: view:promos.rules:0
2169+msgid "Promotions"
2170+msgstr "Promotions"
2171+
2172+#. module: sale_promotions
2173+#: code:addons/sale_promotions/models/rules.py:76
2174+#: selection:promos.rules.actions,action_type:0
2175+#, python-format
2176+msgid "Buy X get Y free"
2177+msgstr "Buy X get Y free"
2178+
2179+#. module: sale_promotions
2180+#: selection:promos.rules.conditions.exps,attribute:0
2181+msgid "Compute sub total of products"
2182+msgstr "Compute sub total of products"
2183+
2184+#. module: sale_promotions
2185+#: field:promos.rules.conditions.exps,comparator:0
2186+msgid "Comparator"
2187+msgstr "Comparator"
2188+
2189+#. module: sale_promotions
2190+#: selection:promos.rules.conditions.exps,attribute:0
2191+msgid "Tax Amount"
2192+msgstr "Tax Amount"
2193+
2194+#. module: sale_promotions
2195+#: code:addons/sale_promotions/models/rules.py:42
2196+#: selection:promos.rules.conditions.exps,attribute:0
2197+#, python-format
2198+msgid "Untaxed Total"
2199+msgstr "Untaxed Total"
2200+
2201+#. module: sale_promotions
2202+#: field:promos.rules.conditions.exps,value:0
2203+msgid "Value"
2204+msgstr "Value"
2205+
2206+#. module: sale_promotions
2207+#: code:addons/sale_promotions/models/rules.py:61
2208+#: selection:promos.rules.conditions.exps,comparator:0
2209+#, python-format
2210+msgid "equals"
2211+msgstr "equals"
2212+
2213+#. module: sale_promotions
2214+#: view:promos.rules:0
2215+#: field:promos.rules,partner_categories:0
2216+msgid "Partner Categories"
2217+msgstr "Partner Categories"
2218+
2219+#. module: sale_promotions
2220+#: selection:promos.rules.conditions.exps,attribute:0
2221+msgid "Product Quantity combination"
2222+msgstr "Product Quantity combination"
2223+
2224+#. module: sale_promotions
2225+#: field:promos.rules,uses_per_partner:0
2226+msgid "Uses per Partner"
2227+msgstr "Uses per Partner"
2228+
2229+#. module: sale_promotions
2230+#: selection:promos.rules.conditions.exps,attribute:0
2231+msgid "Compute sub total excluding products"
2232+msgstr "Compute sub total excluding products"
2233+
2234+#. module: sale_promotions
2235+#: field:promos.rules,logic:0
2236+msgid "Logic"
2237+msgstr "Logic"
2238+
2239+#. module: sale_promotions
2240+#: view:promos.rules:0
2241+msgid "If"
2242+msgstr "If"
2243+
2244+#. module: sale_promotions
2245+#: field:promos.rules.actions,action_type:0
2246+msgid "Action"
2247+msgstr "Action"
2248+
2249+#. module: sale_promotions
2250+#: selection:promos.rules,expected_logic_result:0
2251+msgid "False"
2252+msgstr "False"
2253+
2254+#. module: sale_promotions
2255+#: field:promos.rules.actions,promotion:0
2256+#: field:promos.rules.conditions.exps,promotion:0
2257+msgid "Promotion"
2258+msgstr "Promotion"
2259+
2260+#. module: sale_promotions
2261+#: selection:promos.rules.conditions.exps,attribute:0
2262+msgid "Custom domain expression"
2263+msgstr "Custom domain expression"
2264+
2265+#. module: sale_promotions
2266+#: code:addons/sale_promotions/models/rules.py:74
2267+#: selection:promos.rules.actions,action_type:0
2268+#, python-format
2269+msgid "Discount % on Sub Total"
2270+msgstr "Discount % on Sub Total"
2271+
2272+#. module: sale_promotions
2273+#: code:addons/sale_promotions/models/rules.py:66
2274+#: selection:promos.rules.conditions.exps,comparator:0
2275+#, python-format
2276+msgid "less than or equal to"
2277+msgstr "less than or equal to"
2278+
2279+#. module: sale_promotions
2280+#: field:sale.order.line,promotion_line:0
2281+msgid "Promotion Line"
2282+msgstr "Promotion Line"
2283+
2284+#. module: sale_promotions
2285+#: field:promos.rules,shop:0
2286+msgid "Shop"
2287+msgstr "Shop"
2288+
2289+#. module: sale_promotions
2290+#: selection:promos.rules.conditions.exps,attribute:0
2291+msgid "Total Amount"
2292+msgstr "Total Amount"
2293+
2294+#. module: sale_promotions
2295+#: selection:promos.rules,logic:0
2296+msgid "All"
2297+msgstr "All"
2298+
2299+#. module: sale_promotions
2300+#: model:ir.model,name:sale_promotions.model_sale_order
2301+msgid "Sales Order"
2302+msgstr "Sales Order"
2303+
2304+#. module: sale_promotions
2305+#: field:promos.rules,expressions:0
2306+msgid "Expressions/Conditions"
2307+msgstr "Expressions/Conditions"
2308+
2309+#. module: sale_promotions
2310+#: field:promos.rules,sequence:0
2311+#: field:promos.rules.actions,sequence:0
2312+#: field:promos.rules.conditions.exps,sequence:0
2313+msgid "Sequence"
2314+msgstr "Sequence"
2315+
2316+#. module: sale_promotions
2317+#: code:addons/sale_promotions/models/rules.py:67
2318+#: selection:promos.rules.conditions.exps,comparator:0
2319+#, python-format
2320+msgid "is in"
2321+msgstr "is in"
2322+
2323+#. module: sale_promotions
2324+#: field:promos.rules.conditions.exps,attribute:0
2325+msgid "Attribute"
2326+msgstr "Attribute"
2327+
2328+#. module: sale_promotions
2329+#: code:addons/sale_promotions/models/rules.py:65
2330+#: selection:promos.rules.conditions.exps,comparator:0
2331+#, python-format
2332+msgid "less than"
2333+msgstr "less than"
2334+
2335+#. module: sale_promotions
2336+#: view:promos.rules:0
2337+#: field:promos.rules,actions:0
2338+msgid "Actions"
2339+msgstr "Actions"
2340+
2341+#. module: sale_promotions
2342+#: help:promos.rules,partner_categories:0
2343+msgid "Applicable to all if none is selected"
2344+msgstr "Applicable to all if none is selected"
2345+
2346+#. module: sale_promotions
2347+#: model:ir.model,name:sale_promotions.model_sale_order_line
2348+msgid "Sales Order Line"
2349+msgstr "Sales Order Line"
2350+
2351+#. module: sale_promotions
2352+#: code:addons/sale_promotions/models/rules.py:63
2353+#: selection:promos.rules.conditions.exps,comparator:0
2354+#, python-format
2355+msgid "greater than"
2356+msgstr "greater than"
2357+
2358+#. module: sale_promotions
2359+#: code:addons/sale_promotions/models/rules.py:72
2360+#: selection:promos.rules.actions,action_type:0
2361+#, python-format
2362+msgid "Discount % on Product"
2363+msgstr "Discount % on Product"
2364+
2365+#. module: sale_promotions
2366+#: help:promos.rules,coupon_used:0
2367+msgid "The number of times this coupon has been used."
2368+msgstr "The number of times this coupon has been used."
2369+
2370+#. module: sale_promotions
2371+#: selection:promos.rules.conditions.exps,attribute:0
2372+msgid "Product Code in order"
2373+msgstr "Product Code in order"
2374+
2375+#. module: sale_promotions
2376+#: view:promos.rules:0
2377+#: view:promos.rules.conditions.expres
2378+ :0
2379+#: view:promos.rules.conditions.exps:0
2380+msgid "Expressions"
2381+msgstr "Expressions"
2382+
2383+#. module: sale_promotions
2384+#: code:addons/sale_promotions/models/rules.py:73
2385+#: selection:promos.rules.actions,action_type:0
2386+#, python-format
2387+msgid "Fixed amount on Product"
2388+msgstr "Fixed amount on Product"
2389+
2390+#. module: sale_promotions
2391+#: selection:promos.rules,logic:0
2392+msgid "Any"
2393+msgstr "Any"
2394+
2395+#. module: sale_promotions
2396+#: view:sale.order:0
2397+msgid "Apply Promotions"
2398+msgstr "Apply Promotions"
2399+
2400+#. module: sale_promotions
2401+#: field:promos.rules,from_date:0
2402+msgid "From Date"
2403+msgstr "From Date"
2404+
2405
2406=== modified file 'models/rules.py'
2407--- models/rules.py 2010-06-11 11:40:30 +0000
2408+++ models/rules.py 2011-11-30 12:20:28 +0000
2409@@ -6,6 +6,7 @@
2410 #########################################################################
2411 # #
2412 # Copyright (C) 2010 Open Labs Business Solutions #
2413+# Copyright (C) 2011 Zikzakmedia #
2414 # Special Credit: Yannick Buron for design evaluation #
2415 # #
2416 #This program is free software: you can redistribute it and/or modify #
2417@@ -27,21 +28,61 @@
2418 from sets import Set as set
2419 except:
2420 pass
2421+
2422 from osv import osv, fields
2423 from tools.misc import ustr
2424 import netsvc
2425+from tools.translate import _
2426
2427 LOGGER = netsvc.Logger()
2428 DEBUG = True
2429 PRODUCT_UOM_ID = 1
2430
2431+ATTRIBUTES = [
2432+ ('amount_untaxed', _('Untaxed Total')),
2433+ ('amount_tax', 'Tax Amount'),
2434+ ('amount_total', 'Total Amount'),
2435+ ('product', 'Product Code in order'),
2436+ ('prod_qty', 'Product Quantity combination'),
2437+ ('prod_unit_price', 'Product UnitPrice combination'),
2438+ ('prod_sub_total', 'Product SubTotal combination'),
2439+# ('prod_net_price', 'Product NetPrice combination'),
2440+ ('prod_discount', 'Product Discount combination'),
2441+ ('prod_weight', 'Product Weight combination'),
2442+ ('comp_sub_total', 'Compute sub total of products'),
2443+ ('comp_sub_total_x', 'Compute sub total excluding products'),
2444+ #('tot_item_qty', 'Total Items Quantity'),
2445+ #('tot_weight', 'Total Weight'),
2446+ #('tot_item_qty', 'Total Items Quantity'),
2447+ ('custom', 'Custom domain expression'),
2448+]
2449+
2450+COMPARATORS = [
2451+ ('==', _('equals')),
2452+ ('!=', _('not equal to')),
2453+ ('>', _('greater than')),
2454+ ('>=', _('greater than or equal to')),
2455+ ('<', _('less than')),
2456+ ('<=', _('less than or equal to')),
2457+ ('in', _('is in')),
2458+ ('not in', _('is not in')),
2459+]
2460+
2461+ACTION_TYPES = [
2462+ ('prod_disc_perc', _('Discount % on Product')),
2463+ ('prod_disc_fix', _('Fixed amount on Product')),
2464+ ('cart_disc_perc', _('Discount % on Sub Total')),
2465+ ('cart_disc_fix', _('Fixed amount on Sub Total')),
2466+ ('prod_x_get_y', _('Buy X get Y free'))
2467+]
2468+
2469 class PromotionsRules(osv.osv):
2470 "Promotion Rules"
2471 _name = "promos.rules"
2472 _description = __doc__
2473 _order = 'sequence'
2474
2475- def _count_coupon_use(self, cursor, user, ids,
2476+ def count_coupon_use(self, cursor, user, ids,
2477 name, arg, context=None):
2478 '''
2479 This function count the number of sale orders(not in cancelled state)
2480@@ -84,11 +125,11 @@
2481 string="Partner Categories",
2482 help="Applicable to all if none is selected"
2483 ),
2484- 'coupon_code':fields.char('Coupon Code', size=20),
2485+ 'coupon_code':fields.char('Coupon Code', size=20, required=True),
2486 'uses_per_coupon':fields.integer('Uses per Coupon'),
2487 'uses_per_partner':fields.integer('Uses per Partner'),
2488 'coupon_used': fields.function(
2489- _count_coupon_use,
2490+ count_coupon_use,
2491 method=True,
2492 type='integer',
2493 string='Number of Coupon Uses',
2494@@ -117,10 +158,11 @@
2495 }
2496 _defaults = {
2497 'logic':lambda * a:'and',
2498- 'expected_logic_result':lambda * a:'True'
2499+ 'expected_logic_result':lambda * a:'True',
2500+ 'active':lambda * a:'True',
2501 }
2502
2503- def _date(self, str_date):
2504+ def promotion_date(self, str_date):
2505 "Converts string date to date"
2506 import time
2507 try:
2508@@ -132,7 +174,7 @@
2509 return str_date
2510
2511
2512- def _check_primary_conditions(self, cursor, user,
2513+ def check_primary_conditions(self, cursor, user,
2514 promotion_rule, order, context):
2515 """
2516 Checks the conditions for
2517@@ -161,9 +203,9 @@
2518 #If the codes don't match then this is not the promo
2519 if not order.coupon_code == promotion_rule.coupon_code:
2520 raise Exception("Coupon codes do not match")
2521- # Calling _count_coupon_use to check whether no. of
2522+ # Calling count_coupon_use to check whether no. of
2523 # uses is greater than allowed uses.
2524- count = self._count_coupon_use(cursor, user, [promotion_rule.id],
2525+ count = self.count_coupon_use(cursor, user, [promotion_rule.id],
2526 True, None, context).values()[0]
2527 if count > promotion_rule.uses_per_coupon:
2528 raise Exception("Coupon is overused")
2529@@ -179,13 +221,13 @@
2530 raise Exception("Customer already used coupon")
2531 #if a start date has been specified
2532 if promotion_rule.from_date and \
2533- not (self._date(
2534- order.date_order) >= self._date(promotion_rule.from_date)):
2535+ not (self.promotion_date(
2536+ order.date_order) >= self.promotion_date(promotion_rule.from_date)):
2537 raise Exception("Order before start of promotion")
2538 #If an end date has been specified
2539 if promotion_rule.to_date and \
2540- not (self._date(
2541- order.date_order) <= self._date(promotion_rule.to_date)):
2542+ not (self.promotion_date(
2543+ order.date_order) <= self.promotion_date(promotion_rule.to_date)):
2544 raise Exception("Order after end of promotion")
2545 #All tests have succeeded
2546 return True
2547@@ -203,7 +245,7 @@
2548 context = {}
2549 expression_obj = self.pool.get('promos.rules.conditions.exps')
2550 try:
2551- self._check_primary_conditions(
2552+ self.check_primary_conditions(
2553 cursor, user,
2554 promotion_rule, order,
2555 context)
2556@@ -326,34 +368,7 @@
2557 _order = "sequence"
2558 _rec_name = 'serialised_expr'
2559
2560- def _get_attributes(self, cursor, user, ids=None, context=None):
2561- """
2562- Gets the attributes in predefined format
2563- @param cursor: Database Cursor
2564- @param user: ID of User
2565- @param ids: ID of current record.
2566- @param context: Context(no direct use).
2567- """
2568- return [
2569- ('amount_untaxed', 'Untaxed Total'),
2570- ('amount_tax', 'Tax Amount'),
2571- ('amount_total', 'Total Amount'),
2572- ('product', 'Product Code in order'),
2573- ('prod_qty', 'Product Quantity combination'),
2574- ('prod_unit_price', 'Product UnitPrice combination'),
2575- ('prod_sub_total', 'Product SubTotal combination'),
2576- ('prod_net_price', 'Product NetPrice combination'),
2577- ('prod_discount', 'Product Discount combination'),
2578- ('prod_weight', 'Product Weight combination'),
2579- ('comp_sub_total', 'Compute sub total of products'),
2580- ('comp_sub_total_x', 'Compute sub total excluding products'),
2581- #('tot_item_qty', 'Total Items Quantity'),
2582- #('tot_weight', 'Total Weight'),
2583- #('tot_item_qty', 'Total Items Quantity'),
2584- ('custom', 'Custom domain expression'),
2585- ]
2586-
2587- def _on_change(self, cursor, user, ids=None,
2588+ def on_change(self, cursor, user, ids=None,
2589 attribute=None, value=None, context=None):
2590 """
2591 Set the value field to the format if nothing is there
2592@@ -420,41 +435,17 @@
2593 }
2594 }
2595 return {}
2596-
2597- def _get_comparators(self, cursor, user, ids=None, context=None):
2598- """
2599- Gets the attributes in predefined format
2600- @param cursor: Database Cursor
2601- @param user: ID of User
2602- @param ids: ID of current record.
2603- @param context: Context(no direct use).
2604- """
2605- return [
2606-# ('is', 'is'),
2607-# ('isnot', 'is not'),
2608- ('==', 'equals'),
2609- ('!=', 'not equal to'),
2610- ('>', 'greater than'),
2611- ('>=', 'greater than or equal to'),
2612- ('<', 'less than'),
2613- ('<=', 'less than or equal to'),
2614- ('in', 'is in'),
2615- ('not in', 'is not in'),
2616- ]
2617-
2618+
2619 _columns = {
2620 'sequence':fields.integer('Sequence'),
2621- 'attribute':fields.selection(_get_attributes,
2622- 'Attribute', size=50, required=True),
2623- 'comparator':fields.selection(_get_comparators,
2624- 'Comparator', required=True),
2625+ 'attribute':fields.selection(ATTRIBUTES,'Attribute', size=50, required=True),
2626+ 'comparator':fields.selection(COMPARATORS, 'Comparator', required=True),
2627 'value':fields.char('Value', size=100),
2628 'serialised_expr':fields.char('Expression', size=255),
2629- 'promotion': fields.many2one('promos.rules',
2630- 'Promotion'),
2631+ 'promotion': fields.many2one('promos.rules', 'Promotion'),
2632 'stop_further':fields.boolean('Stop further checks')
2633-
2634 }
2635+
2636 _defaults = {
2637 'comparator': lambda * a:'==',
2638 'stop_further': lambda * a: '1'
2639@@ -613,9 +604,9 @@
2640 prod_qty[product_code] = prod_qty.get(
2641 product_code, 0.00
2642 ) + line.product_uom_qty
2643- prod_net_price[product_code] = prod_net_price.get(
2644- product_code, 0.00
2645- ) + line.price_net
2646+# prod_net_price[product_code] = prod_net_price.get(
2647+# product_code, 0.00
2648+# ) + line.price_net
2649 prod_unit_price[product_code] = prod_unit_price.get(
2650 product_code, 0.00
2651 ) + line.price_unit
2652@@ -686,7 +677,7 @@
2653 _description = __doc__
2654 _rec_name = 'action_type'
2655
2656- def _on_change(self, cursor, user, ids=None,
2657+ def on_change(self, cursor, user, ids=None,
2658 action_type=None, product_code=None,
2659 arguments=None, context=None):
2660 """
2661@@ -743,37 +734,16 @@
2662 }
2663 #Finally if nothing works
2664 return {}
2665-
2666- def _get_action_types(self, cursor, user, ids=None, context=None):
2667- """
2668- Gets the action types in predefined format
2669- @param cursor: Database Cursor
2670- @param user: ID of User
2671- @param ids: ID current record.
2672- @param context: Context(no direct use).
2673- """
2674- return [
2675- ('prod_disc_perc', 'Discount % on Product'),
2676- ('prod_disc_fix', 'Fixed amount on Product'),
2677- ('cart_disc_perc', 'Discount % on Sub Total'),
2678- ('cart_disc_fix', 'Fixed amount on Sub Total'),
2679- ('prod_x_get_y', 'Buy X get Y free')
2680- ]
2681
2682 _columns = {
2683 'sequence':fields.integer('Sequence', required=True),
2684- 'action_type':fields.selection(_get_action_types,
2685- 'Action',
2686- required=True),
2687- 'product_code':fields.char('Product Code',
2688- size=100,
2689- ),
2690+ 'action_type':fields.selection(ACTION_TYPES, 'Action', required=True),
2691+ 'product_code':fields.char('Product Code', size=100),
2692 'arguments':fields.char('Arguments', size=100),
2693- 'promotion':fields.many2one('promos.rules',
2694- 'Promotion'),
2695+ 'promotion':fields.many2one('promos.rules', 'Promotion'),
2696 }
2697
2698- def _clear_existing_promotion_lines(self, cursor, user,
2699+ def clear_existing_promotion_lines(self, cursor, user,
2700 order, context=None):
2701 """
2702 Deletes existing promotion lines before applying
2703@@ -805,7 +775,7 @@
2704 context=context)
2705 return True
2706
2707- def _action_prod_disc_perc(self, cursor, user,
2708+ def action_prod_disc_perc(self, cursor, user,
2709 action, order, context=None):
2710 """
2711 Action for 'Discount % on Product'
2712@@ -827,7 +797,7 @@
2713 context
2714 )
2715
2716- def _action_prod_disc_fix(self, cursor, user,
2717+ def action_prod_disc_fix(self, cursor, user,
2718 action, order, context=None):
2719 """
2720 Action for 'Fixed amount on Product'
2721@@ -862,7 +832,7 @@
2722 context
2723 )
2724
2725- def _action_cart_disc_perc(self, cursor, user,
2726+ def action_cart_disc_perc(self, cursor, user,
2727 action, order, context=None):
2728 """
2729 'Discount % on Sub Total'
2730@@ -887,7 +857,7 @@
2731 context
2732 )
2733
2734- def _action_cart_disc_fix(self, cursor, user,
2735+ def action_cart_disc_fix(self, cursor, user,
2736 action, order, context=None):
2737 """
2738 'Fixed amount on Sub Total'
2739@@ -912,7 +882,7 @@
2740 context
2741 )
2742
2743- def _create_y_line(self, cursor, user, action,
2744+ def create_y_line(self, cursor, user, action,
2745 order, quantity, product_id, context=None):
2746 """
2747 Create new order line for product
2748@@ -939,7 +909,7 @@
2749 'product_uom':product_y.uom_id.id
2750 }, context)
2751
2752- def _action_prod_x_get_y(self, cursor, user,
2753+ def action_prod_x_get_y(self, cursor, user,
2754 action, order, context=None):
2755 """
2756 'Buy X get Y free:[Only for integers]'
2757@@ -1020,7 +990,7 @@
2758 {
2759 'product_uom_qty': qty_y_in_cart - tot_free_y,
2760 }, context)
2761- self._create_y_line(cursor, user, action,
2762+ self.create_y_line(cursor, user, action,
2763 order,
2764 tot_free_y,
2765 product_id,
2766@@ -1036,7 +1006,7 @@
2767 #Dont create line if quantity is not there
2768 if not tot_free_y:
2769 return True
2770- return self._create_y_line(cursor, user, action,
2771+ return self.create_y_line(cursor, user, action,
2772 order, tot_free_y, product_id, context)
2773
2774 def execute(self, cursor, user, action_id,
2775@@ -1049,9 +1019,9 @@
2776 @param order: sale order
2777 @param context: Context(no direct use).
2778 """
2779- self._clear_existing_promotion_lines(cursor, user, order, context)
2780+ self.clear_existing_promotion_lines(cursor, user, order, context)
2781 action = self.browse(cursor, user, action_id, context)
2782- method_name = '_action_' + action.action_type
2783+ method_name = 'action_' + action.action_type
2784 return getattr(self, method_name).__call__(cursor, user, action,
2785 order, context)
2786
2787
2788=== added file 'security/ir.model.access.csv'
2789--- security/ir.model.access.csv 1970-01-01 00:00:00 +0000
2790+++ security/ir.model.access.csv 2011-11-30 12:20:28 +0000
2791@@ -0,0 +1,4 @@
2792+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2793+"access_promos_rules","sale_promotions_promos_rules","model_promos_rules","base.group_sale_manager",1,1,1,1
2794+"access_promos_rules_conditions_exps","sale_promotions_promos_rules_conditions_exps","model_promos_rules_conditions_exps","base.group_sale_manager",1,1,1,1
2795+"access_promos_rules_actions","sale_promotions_promos_rules_actions","model_promos_rules_actions","base.group_sale_manager",1,1,1,1
2796
2797=== modified file 'views/rule.xml'
2798--- views/rule.xml 2010-06-09 14:44:01 +0000
2799+++ views/rule.xml 2011-11-30 12:20:28 +0000
2800@@ -21,23 +21,23 @@
2801 nolabel="1" />
2802
2803 </group>
2804- <group colspan="6">
2805- <group colspan="2">
2806- <separator colspan="4"
2807- string="Coupon/Voucher Settings" />
2808- <field name="coupon_code" />
2809- <field name="coupon_used" />
2810- <field name="uses_per_coupon"
2811- attrs="{'required':[('coupon_code','!=',False)]}" />
2812- <field name="uses_per_partner"
2813- attrs="{'required':[('coupon_code','!=',False)]}" />
2814- </group>
2815- <group col="2" colspan="2">
2816- <separator colspan="4" string="Applicable Period" />
2817- <field name="from_date" />
2818- <field name="to_date" />
2819- </group>
2820-</group>
2821+ <group colspan="6">
2822+ <group colspan="2">
2823+ <separator colspan="4"
2824+ string="Coupon/Voucher Settings" />
2825+ <field name="coupon_code" />
2826+ <field name="coupon_used" />
2827+ <field name="uses_per_coupon"
2828+ attrs="{'required':[('coupon_code','!=',False)]}" />
2829+ <field name="uses_per_partner"
2830+ attrs="{'required':[('coupon_code','!=',False)]}" />
2831+ </group>
2832+ <group col="2" colspan="2">
2833+ <separator colspan="4" string="Applicable Period" />
2834+ <field name="from_date" />
2835+ <field name="to_date" />
2836+ </group>
2837+ </group>
2838 <notebook colspan="4">
2839 <page string="Conditions">
2840 <group colspan="4" col="8">
2841@@ -55,10 +55,18 @@
2842 <field name="sequence" />
2843 <field name="stop_further" />
2844 <field name="attribute"
2845+ on_change="on_change(attribute, value)" />
2846+ <field name="comparator" />
2847+ <field name="value" />
2848+ </tree>
2849+ <form>
2850+ <field name="sequence" />
2851+ <field name="attribute"
2852 on_change="_on_change(attribute, value)" />
2853 <field name="comparator" />
2854 <field name="value" />
2855- </tree>
2856+ <field name="stop_further" />
2857+ </form>
2858 </field>
2859 </page>
2860 <page string="Actions">
2861@@ -66,10 +74,17 @@
2862 <tree editable="bottom" string="Actions">
2863 <field name="sequence" />
2864 <field name="action_type"
2865+ on_change="on_change(action_type, product_code, arguments)" />
2866+ <field name="product_code" />
2867+ <field name="arguments" />
2868+ </tree>
2869+ <form>
2870+ <field name="sequence" />
2871+ <field name="action_type"
2872 on_change="_on_change(action_type, product_code, arguments)" />
2873 <field name="product_code" />
2874 <field name="arguments" />
2875- </tree>
2876+ </form>
2877 </field>
2878 </page>
2879 <page string="Partner Categories">
2880@@ -105,14 +120,14 @@
2881 <field name="view_mode">tree,form</field>
2882 </record>
2883 <menuitem id="promos" action="act_promotion_rules"
2884- parent="sale.menu_shop_configuration" />
2885+ parent="base.menu_sale_config_sales" />
2886
2887 <record model="ir.ui.view" id="view_promotion_cond_expr_form">
2888 <field name="name">promos.rules.conditions.exps.form</field>
2889 <field name="model">promos.rules.conditions.exps</field>
2890 <field name="type">form</field>
2891 <field name="arch" type="xml">
2892- <form string="Rule Expressions">
2893+ <form string="Expressions">
2894 <field name="sequence" />
2895 <field name="serialised_expr" />
2896 </form>
2897@@ -125,11 +140,11 @@
2898 </field>
2899 <field name="type">tree</field>
2900 <field name="arch" type="xml">
2901- <tree string="Rule Expressions">
2902+ <tree string="Expressions">
2903 <field name="sequence" />
2904 <field name="serialised_expr" />
2905 </tree>
2906 </field>
2907 </record>
2908 </data>
2909-</openerp>
2910\ No newline at end of file
2911+</openerp>
2912
2913=== modified file 'views/sale.xml'
2914--- views/sale.xml 2010-06-08 21:42:30 +0000
2915+++ views/sale.xml 2011-11-30 12:20:28 +0000
2916@@ -7,10 +7,8 @@
2917 <field name="type">form</field>
2918 <field name="inherit_id" ref="sale.view_order_form" />
2919 <field name="arch" type="xml">
2920- <xpath expr="/form/notebook/page[@string='Other data']"
2921- position="inside">
2922- <field name='coupon_code'
2923- attrs="{'readonly':[('state','!=','draft')]}" />
2924+ <xpath expr="/form/notebook/page[@string='Other Information']" position="inside">
2925+ <field name='coupon_code' attrs="{'readonly':[('state','!=','draft')]}" />
2926 </xpath>
2927 </field>
2928 </record>
2929@@ -20,13 +18,12 @@
2930 <field name="type">form</field>
2931 <field name="inherit_id" ref="sale.view_order_form" />
2932 <field name="arch" type="xml">
2933- <xpath
2934- expr="/form/notebook/page[@string='Sale Order']/group/button[@name='order_confirm']"
2935- position="before">
2936- <button name="apply_promotions" type="object"
2937- states="draft" string="Apply Promotions" />
2938+ <xpath expr="/form/notebook/page[@string='Sales Order']/group/button[@name='order_confirm']" position="after">
2939+ <group colspan="4" col="13">
2940+ <button name="apply_promotions" type="object" states="draft" string="Apply Promotions" />
2941+ </group>
2942 </xpath>
2943 </field>
2944 </record>
2945 </data>
2946-</openerp>
2947\ No newline at end of file
2948+</openerp>

Subscribers

People subscribed via source and target branches