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

Proposed by Raimon Esteve (www.zikzakmedia.com)
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 Needs Fixing
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.
Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

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
Revision history for this message
Raimon Esteve (www.zikzakmedia.com) (resteve) wrote :

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

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

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?

Revision history for this message
Raimon Esteve (www.zikzakmedia.com) (resteve) wrote :

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

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

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?

Revision history for this message
Raimon Esteve (www.zikzakmedia.com) (resteve) wrote :

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)

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

Unmerged revisions

11. By Raimon Esteve (www.zikzakmedia.com)

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

10. By Raimon Esteve (www.zikzakmedia.com)

[IMP] Translation and security rules

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '__openerp__.py'
--- __openerp__.py 1970-01-01 00:00:00 +0000
+++ __openerp__.py 2011-11-30 12:20:28 +0000
@@ -0,0 +1,54 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2010, Open Labs Business Solution
6# Copyright (C) 2011, Zikzakmedia #
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23{
24 'name' : 'Promotions for OpenERP',
25 'version' : '0.1',
26 'author' : 'Open Labs Business Solutions',
27 'website': 'http://openlabs.co.in',
28 'category' : 'Generic Modules/Sales & Purchases',
29 'depends' : [
30 "base",
31 "sale",
32 ],
33 'init_xml' : [],
34 'demo_xml' : [],
35 'description': """
36 Promotions on Sale Order for OpenERP
37 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
38 Features:
39 1. Promotions based on conditions and coupons
40 2. Web services API compliance
41
42 Credits:
43 This design is based/inspired by the Magento commerce
44 Special Thanks to Yannick Buron for analysis
45 Migration Module OpenERP 6: Zikzakmedia
46 """,
47 'update_xml': [
48 'security/ir.model.access.csv',
49 'views/rule.xml',
50 'views/sale.xml',
51 ],
52 'installable': True,
53 'active': False,
54}
055
=== removed file '__terp__.py'
--- __terp__.py 2010-06-08 09:17:32 +0000
+++ __terp__.py 1970-01-01 00:00:00 +0000
@@ -1,51 +0,0 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2010, Open Labs Business Solution
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22{
23 'name' : 'Promotions for Open ERP',
24 'version' : '0.1',
25 'author' : 'Open Labs Business Solutions',
26 'website': 'http://openlabs.co.in',
27 'category' : 'Customised Modules',
28 'depends' : [
29 "base",
30 "sale",
31 ],
32 'init_xml' : [],
33 'demo_xml' : [],
34 'description': """
35 Promotions on Sale Order for Open ERP
36 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
37 Features:
38 1. Promotions based on conditions and coupons
39 2. Web services API compliance
40
41 Credits:
42 This design is based/inspired by the Magento commerce
43 Special Thanks to Yannick Buron for analysis
44 """,
45 'update_xml': [
46 'views/rule.xml',
47 'views/sale.xml',
48 ],
49 'installable': True,
50 'active': False,
51}
520
=== modified file 'example/xml-rpc-test.py'
--- example/xml-rpc-test.py 2010-06-08 09:17:32 +0000
+++ example/xml-rpc-test.py 2011-11-30 12:20:28 +0000
@@ -11,5 +11,5 @@
11common = xmlrpclib.ServerProxy(url + '/xmlrpc/common')11common = xmlrpclib.ServerProxy(url + '/xmlrpc/common')
12uid = common.login(dbname, username, password)12uid = common.login(dbname, username, password)
13object = xmlrpclib.ServerProxy(url + '/xmlrpc/object')13object = xmlrpclib.ServerProxy(url + '/xmlrpc/object')
14object.execute(dbname, uid, password,'promos.rules', 'evaluate', 1, 3)14#object.execute(dbname, uid, password,'promos.rules', 'evaluate', 1, 3) #TODO: evaluate def need object, not ID values
15object.execute(dbname, uid, password, 'promos.rules', 'apply_promotions', 3)15object.execute(dbname, uid, password, 'promos.rules', 'apply_promotions', 3)
1616
=== added directory 'i18n'
=== added file 'i18n/ca.po'
--- i18n/ca.po 1970-01-01 00:00:00 +0000
+++ i18n/ca.po 2011-11-30 12:20:28 +0000
@@ -0,0 +1,459 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * sale_promotions
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.15\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-03-14 14:53+0000\n"
10"PO-Revision-Date: 2011-10-11 17:39+0100\n"
11"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17
18#. module: sale_promotions
19#: field:promos.rules,name:0
20msgid "Promo Name"
21msgstr "Nom"
22
23#. module: sale_promotions
24#: view:promos.rules:0
25msgid "expressions are"
26msgstr "les expressions son"
27
28#. module: sale_promotions
29#: field:promos.rules.conditions.exps,stop_further:0
30msgid "Stop further checks"
31msgstr "Finalitzar comprovació"
32
33#. module: sale_promotions
34#: field:promos.rules,uses_per_coupon:0
35msgid "Uses per Coupon"
36msgstr "Usos per cupó"
37
38#. module: sale_promotions
39#: field:promos.rules,coupon_used:0
40msgid "Number of Coupon Uses"
41msgstr "Número d'usos per cupó"
42
43#. module: sale_promotions
44#: field:promos.rules.actions,product_code:0
45msgid "Product Code"
46msgstr "Codi producte"
47
48#. module: sale_promotions
49#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
50#: model:ir.model,name:sale_promotions.model_promos_rules
51#: model:ir.ui.menu,name:sale_promotions.promos
52msgid "Promotion Rules"
53msgstr "Regles de promoció"
54
55#. module: sale_promotions
56#: field:sale.order,coupon_code:0
57msgid "Promo Coupon Code"
58msgstr "Codi cupó de la promoció"
59
60#. module: sale_promotions
61#: view:promos.rules:0
62msgid "Applicable Period"
63msgstr "Període aplicable"
64
65#. module: sale_promotions
66#: field:promos.rules,stop_further:0
67msgid "Stop Checks"
68msgstr "Finalitzar procés"
69
70#. module: sale_promotions
71#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
72msgid "Expressions for conditions"
73msgstr "Expressions per les condicions"
74
75#. module: sale_promotions
76#: field:promos.rules,to_date:0
77msgid "To Date"
78msgstr "Fins"
79
80#. module: sale_promotions
81#: code:addons/sale_promotions/models/rules.py:62
82#: selection:promos.rules.conditions.exps,comparator:0
83#, python-format
84msgid "not equal to"
85msgstr "no es igual a"
86
87#. module: sale_promotions
88#: field:promos.rules.actions,arguments:0
89msgid "Arguments"
90msgstr "Arguments"
91
92#. module: sale_promotions
93#: code:addons/sale_promotions/models/rules.py:64
94#: selection:promos.rules.conditions.exps,comparator:0
95#, python-format
96msgid "greater than or equal to"
97msgstr "major o igual a"
98
99#. module: sale_promotions
100#: field:promos.rules,expected_logic_result:0
101msgid "Output"
102msgstr "Sortida"
103
104#. module: sale_promotions
105#: selection:promos.rules.conditions.exps,attribute:0
106msgid "Product UnitPrice combination"
107msgstr "Combinació preu unitat del producte"
108
109#. module: sale_promotions
110#: help:promos.rules,stop_further:0
111msgid "Stops further promotions being checked"
112msgstr "Finalitzar promocions"
113
114#. module: sale_promotions
115#: model:ir.model,name:sale_promotions.model_promos_rules_actions
116msgid "Promotions actions"
117msgstr "Accions de la promoció"
118
119#. module: sale_promotions
120#: selection:promos.rules.conditions.exps,attribute:0
121msgid "Product Discount combination"
122msgstr "Combinació descompte del producte"
123
124#. module: sale_promotions
125#: view:promos.rules:0
126msgid "Conditions"
127msgstr "Condicions"
128
129#. module: sale_promotions
130#: code:addons/sale_promotions/models/rules.py:75
131#: selection:promos.rules.actions,action_type:0
132#, python-format
133msgid "Fixed amount on Sub Total"
134msgstr "Quantitat fixa en subtotal"
135
136#. module: sale_promotions
137#: sql_constraint:sale.order:0
138msgid "Order Reference must be unique !"
139msgstr "Order Reference must be unique !"
140
141#. module: sale_promotions
142#: view:promos.rules:0
143#: field:promos.rules,description:0
144msgid "Description"
145msgstr "Descripció"
146
147#. module: sale_promotions
148#: field:promos.rules.conditions.exps,serialised_expr:0
149msgid "Expression"
150msgstr "Expressió"
151
152#. module: sale_promotions
153#: field:promos.rules,coupon_code:0
154msgid "Coupon Code"
155msgstr "Codi cupó"
156
157#. module: sale_promotions
158#: code:addons/sale_promotions/models/rules.py:68
159#: selection:promos.rules.conditions.exps,comparator:0
160#, python-format
161msgid "is not in"
162msgstr "no està en"
163
164#. module: sale_promotions
165#: selection:promos.rules.conditions.exps,attribute:0
166msgid "Product Weight combination"
167msgstr "Combinació pes del producte"
168
169#. module: sale_promotions
170#: selection:promos.rules.conditions.exps,attribute:0
171msgid "Product SubTotal combination"
172msgstr "Combinació subtotal del producte"
173
174#. module: sale_promotions
175#: help:sale.order.line,promotion_line:0
176msgid "Indicates if the line was created by promotions"
177msgstr "Indicar si aquesta línia es creada per promocions"
178
179#. module: sale_promotions
180#: field:promos.rules,active:0
181msgid "Active"
182msgstr "Actiu"
183
184#. module: sale_promotions
185#: selection:promos.rules,expected_logic_result:0
186msgid "True"
187msgstr "Verdader"
188
189#. module: sale_promotions
190#: view:promos.rules:0
191msgid "Coupon/Voucher Settings"
192msgstr "Configuració dels cupons"
193
194#. module: sale_promotions
195#: view:promos.rules:0
196msgid "Promotions"
197msgstr "Promocions"
198
199#. module: sale_promotions
200#: code:addons/sale_promotions/models/rules.py:76
201#: selection:promos.rules.actions,action_type:0
202#, python-format
203msgid "Buy X get Y free"
204msgstr "Compra X i emportis Y"
205
206#. module: sale_promotions
207#: selection:promos.rules.conditions.exps,attribute:0
208msgid "Compute sub total of products"
209msgstr "Calcula subtotal dels productes"
210
211#. module: sale_promotions
212#: field:promos.rules.conditions.exps,comparator:0
213msgid "Comparator"
214msgstr "Comparador"
215
216#. module: sale_promotions
217#: selection:promos.rules.conditions.exps,attribute:0
218msgid "Tax Amount"
219msgstr "Impostos"
220
221#. module: sale_promotions
222#: code:addons/sale_promotions/models/rules.py:42
223#: selection:promos.rules.conditions.exps,attribute:0
224#, python-format
225msgid "Untaxed Total"
226msgstr "Base imponible"
227
228#. module: sale_promotions
229#: field:promos.rules.conditions.exps,value:0
230msgid "Value"
231msgstr "Valor"
232
233#. module: sale_promotions
234#: code:addons/sale_promotions/models/rules.py:61
235#: selection:promos.rules.conditions.exps,comparator:0
236#, python-format
237msgid "equals"
238msgstr "es igual a"
239
240#. module: sale_promotions
241#: view:promos.rules:0
242#: field:promos.rules,partner_categories:0
243msgid "Partner Categories"
244msgstr "Categories de clients"
245
246#. module: sale_promotions
247#: selection:promos.rules.conditions.exps,attribute:0
248msgid "Product Quantity combination"
249msgstr "Combinació quantitat del producte"
250
251#. module: sale_promotions
252#: field:promos.rules,uses_per_partner:0
253msgid "Uses per Partner"
254msgstr "Usos per client"
255
256#. module: sale_promotions
257#: selection:promos.rules.conditions.exps,attribute:0
258msgid "Compute sub total excluding products"
259msgstr "Calcula subtotal excloent productes"
260
261#. module: sale_promotions
262#: field:promos.rules,logic:0
263msgid "Logic"
264msgstr "Lògica"
265
266#. module: sale_promotions
267#: view:promos.rules:0
268msgid "If"
269msgstr "Si"
270
271#. module: sale_promotions
272#: field:promos.rules.actions,action_type:0
273msgid "Action"
274msgstr "Accions"
275
276#. module: sale_promotions
277#: selection:promos.rules,expected_logic_result:0
278msgid "False"
279msgstr "Fals"
280
281#. module: sale_promotions
282#: field:promos.rules.actions,promotion:0
283#: field:promos.rules.conditions.exps,promotion:0
284msgid "Promotion"
285msgstr "Promoció"
286
287#. module: sale_promotions
288#: selection:promos.rules.conditions.exps,attribute:0
289msgid "Custom domain expression"
290msgstr "Expressió personalitzada"
291
292#. module: sale_promotions
293#: code:addons/sale_promotions/models/rules.py:74
294#: selection:promos.rules.actions,action_type:0
295#, python-format
296msgid "Discount % on Sub Total"
297msgstr "Descompte % en el subtotal"
298
299#. module: sale_promotions
300#: code:addons/sale_promotions/models/rules.py:66
301#: selection:promos.rules.conditions.exps,comparator:0
302#, python-format
303msgid "less than or equal to"
304msgstr "menor o igual a"
305
306#. module: sale_promotions
307#: field:sale.order.line,promotion_line:0
308msgid "Promotion Line"
309msgstr "Línia de promoció"
310
311#. module: sale_promotions
312#: field:promos.rules,shop:0
313msgid "Shop"
314msgstr "Botiga"
315
316#. module: sale_promotions
317#: selection:promos.rules.conditions.exps,attribute:0
318msgid "Total Amount"
319msgstr "Quantitat Total"
320
321#. module: sale_promotions
322#: selection:promos.rules,logic:0
323msgid "All"
324msgstr "Tot"
325
326#. module: sale_promotions
327#: model:ir.model,name:sale_promotions.model_sale_order
328msgid "Sales Order"
329msgstr "Sales Order"
330
331#. module: sale_promotions
332#: field:promos.rules,expressions:0
333msgid "Expressions/Conditions"
334msgstr "Expressions/Condicions"
335
336#. module: sale_promotions
337#: field:promos.rules,sequence:0
338#: field:promos.rules.actions,sequence:0
339#: field:promos.rules.conditions.exps,sequence:0
340msgid "Sequence"
341msgstr "Seqüència"
342
343#. module: sale_promotions
344#: code:addons/sale_promotions/models/rules.py:67
345#: selection:promos.rules.conditions.exps,comparator:0
346#, python-format
347msgid "is in"
348msgstr "es en"
349
350#. module: sale_promotions
351#: field:promos.rules.conditions.exps,attribute:0
352msgid "Attribute"
353msgstr "Atribut"
354
355#. module: sale_promotions
356#: code:addons/sale_promotions/models/rules.py:65
357#: selection:promos.rules.conditions.exps,comparator:0
358#, python-format
359msgid "less than"
360msgstr "menys de"
361
362#. module: sale_promotions
363#: view:promos.rules:0
364#: field:promos.rules,actions:0
365msgid "Actions"
366msgstr "Accions"
367
368#. module: sale_promotions
369#: help:promos.rules,partner_categories:0
370msgid "Applicable to all if none is selected"
371msgstr "Aplicable en tot si cap es seleccionat"
372
373#. module: sale_promotions
374#: model:ir.model,name:sale_promotions.model_sale_order_line
375msgid "Sales Order Line"
376msgstr "Sales Order Line"
377
378#. module: sale_promotions
379#: code:addons/sale_promotions/models/rules.py:63
380#: selection:promos.rules.conditions.exps,comparator:0
381#, python-format
382msgid "greater than"
383msgstr "major que"
384
385#. module: sale_promotions
386#: code:addons/sale_promotions/models/rules.py:72
387#: selection:promos.rules.actions,action_type:0
388#, python-format
389msgid "Discount % on Product"
390msgstr "Descompte % en el producte"
391
392#. module: sale_promotions
393#: help:promos.rules,coupon_used:0
394msgid "The number of times this coupon has been used."
395msgstr "El número de cupons ja s'ha utilitzat."
396
397#. module: sale_promotions
398#: selection:promos.rules.conditions.exps,attribute:0
399msgid "Product Code in order"
400msgstr "Codi producte en la comanda"
401
402#. module: sale_promotions
403#: code:addons/sale_promotions/models/rules.py:73
404#: selection:promos.rules.actions,action_type:0
405#, python-format
406msgid "Fixed amount on Product"
407msgstr "Quantitat fixe del producte"
408
409#. module: sale_promotions
410#: selection:promos.rules,logic:0
411msgid "Any"
412msgstr "Cap"
413
414#. module: sale_promotions
415#: view:sale.order:0
416msgid "Apply Promotions"
417msgstr "Aplicar promocions"
418
419#. module: sale_promotions
420#: field:promos.rules,from_date:0
421msgid "From Date"
422msgstr "Desde"
423
424#~ msgid "Rule Expressions"
425#~ msgstr "Expressió de la regla"
426#~ msgid ""
427#~ "The Object name must start with x_ and not contain any special character !"
428#~ msgstr ""
429#~ "¡El nom del objecte ha de començar amb x_ i no contenir cap caràcter "
430#~ "especial!"
431#~ msgid "Promotions for Open ERP"
432#~ msgstr "Promociones per OpenERP"
433#~ msgid ""
434#~ "\n"
435#~ " Promotions on Sale Order for Open ERP\n"
436#~ " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
437#~ " Features:\n"
438#~ " 1. Promotions based on conditions and coupons\n"
439#~ " 2. Web services API compliance\n"
440#~ " \n"
441#~ " Credits:\n"
442#~ " This design is based/inspired by the Magento commerce\n"
443#~ " Special Thanks to Yannick Buron for analysis\n"
444#~ " "
445#~ msgstr ""
446#~ "\n"
447#~ " Promocions en les comandes de venda d'OpenERP\n"
448#~ " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
449#~ " Característiques:\n"
450#~ " 1. Promociones basades en condicions i cupons\n"
451#~ " 2. Web services API pel seu comerç electrònic\n"
452#~ " \n"
453#~ " Crèdits:\n"
454#~ " Aquest mòdul està dissenyat/inspirat en Magento ecommerce\n"
455#~ " Agraïments a Yannick Buron pel anàlisis\n"
456#~ " "
457#~ msgid "Product NetPrice combination"
458#~ msgstr "Combinació preu net del producte"
459
0460
=== added file 'i18n/ca_ES.po'
--- i18n/ca_ES.po 1970-01-01 00:00:00 +0000
+++ i18n/ca_ES.po 2011-11-30 12:20:28 +0000
@@ -0,0 +1,471 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * sale_promotions
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.15\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-03-14 11:44:29+0000\n"
10"PO-Revision-Date: 2011-03-14 13:21+0100\n"
11"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17
18#. module: sale_promotions
19#: selection:promos.rules,expected_logic_result:0
20msgid "False"
21msgstr "Fals"
22
23#. module: sale_promotions
24#: field:promos.rules,name:0
25msgid "Promo Name"
26msgstr "Nom"
27
28#. module: sale_promotions
29#: constraint:ir.model:0
30msgid "The Object name must start with x_ and not contain any special character !"
31msgstr "¡El nom del objecte ha de començar amb x_ i no contenir cap caràcter especial!"
32
33#. module: sale_promotions
34#: field:promos.rules.conditions.exps,stop_further:0
35msgid "Stop further checks"
36msgstr "Finalitzar comprovació"
37
38#. module: sale_promotions
39#: field:promos.rules,uses_per_coupon:0
40msgid "Uses per Coupon"
41msgstr "Usos per cupó"
42
43#. module: sale_promotions
44#: field:promos.rules,coupon_used:0
45msgid "Number of Coupon Uses"
46msgstr "Número d'usos per cupó"
47
48#. module: sale_promotions
49#: field:promos.rules.actions,product_code:0
50msgid "Product Code"
51msgstr "Codi producte"
52
53#. module: sale_promotions
54#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
55#: model:ir.model,name:sale_promotions.model_promos_rules
56#: model:ir.ui.menu,name:sale_promotions.promos
57msgid "Promotion Rules"
58msgstr "Regles de promoció"
59
60#. module: sale_promotions
61#: field:sale.order,coupon_code:0
62msgid "Promo Coupon Code"
63msgstr "Codi cupó de la promoció"
64
65#. module: sale_promotions
66#: view:promos.rules:0
67msgid "Applicable Period"
68msgstr "Període aplicable"
69
70#. module: sale_promotions
71#: code:addons/sale_promotions/models/rules.py:0
72#: selection:promos.rules.conditions.exps,comparator:0
73#, python-format
74msgid "greater than"
75msgstr "major que"
76
77#. module: sale_promotions
78#: view:promos.rules:0
79msgid "expressions are"
80msgstr "les expressions son"
81
82#. module: sale_promotions
83#: field:promos.rules,stop_further:0
84msgid "Stop Checks"
85msgstr "Finalitzar procés"
86
87#. module: sale_promotions
88#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
89msgid "Expressions for conditions"
90msgstr "Expressions per les condicions"
91
92#. module: sale_promotions
93#: field:promos.rules,to_date:0
94msgid "To Date"
95msgstr "Des de"
96
97#. module: sale_promotions
98#: code:addons/sale_promotions/models/rules.py:0
99#: selection:promos.rules.conditions.exps,comparator:0
100#, python-format
101msgid "not equal to"
102msgstr "no es igual a"
103
104#. module: sale_promotions
105#: field:promos.rules.actions,arguments:0
106msgid "Arguments"
107msgstr "Arguments"
108
109#. module: sale_promotions
110#: constraint:ir.actions.act_window:0
111msgid "Invalid model name in the action definition."
112msgstr "Nom del model invàlid en la definició de la acció."
113
114#. module: sale_promotions
115#: field:promos.rules,expected_logic_result:0
116msgid "Output"
117msgstr "Sortida"
118
119#. module: sale_promotions
120#: selection:promos.rules.conditions.exps,attribute:0
121msgid "Product UnitPrice combination"
122msgstr "Combinació preu unitat del producte"
123
124#. module: sale_promotions
125#: help:promos.rules,stop_further:0
126msgid "Stops further promotions being checked"
127msgstr "Finalitzar promocions"
128
129#. module: sale_promotions
130#: model:ir.model,name:sale_promotions.model_promos_rules_actions
131msgid "Promotions actions"
132msgstr "Accions de la promoció"
133
134#. module: sale_promotions
135#: selection:promos.rules.conditions.exps,attribute:0
136msgid "Product Discount combination"
137msgstr "Combinació descompte del producte"
138
139#. module: sale_promotions
140#: view:promos.rules:0
141msgid "Conditions"
142msgstr "Condicions"
143
144#. module: sale_promotions
145#: code:addons/sale_promotions/models/rules.py:0
146#: selection:promos.rules.conditions.exps,comparator:0
147#, python-format
148msgid "greater than or equal to"
149msgstr "major o igual a"
150
151#. module: sale_promotions
152#: code:addons/sale_promotions/models/rules.py:0
153#: selection:promos.rules.actions,action_type:0
154#, python-format
155msgid "Fixed amount on Sub Total"
156msgstr "Quantitat fixa en subtotal"
157
158#. module: sale_promotions
159#: view:promos.rules:0
160#: field:promos.rules,description:0
161msgid "Description"
162msgstr "Descripció"
163
164#. module: sale_promotions
165#: field:promos.rules.conditions.exps,serialised_expr:0
166msgid "Expression"
167msgstr "Expressió"
168
169#. module: sale_promotions
170#: field:promos.rules,coupon_code:0
171msgid "Coupon Code"
172msgstr "Codi cupó"
173
174#. module: sale_promotions
175#: code:addons/sale_promotions/models/rules.py:0
176#: selection:promos.rules.conditions.exps,comparator:0
177#, python-format
178msgid "is not in"
179msgstr "no està en"
180
181#. module: sale_promotions
182#: selection:promos.rules.conditions.exps,attribute:0
183msgid "Product Weight combination"
184msgstr "Combinació pes del producte"
185
186#. module: sale_promotions
187#: selection:promos.rules.conditions.exps,attribute:0
188msgid "Product SubTotal combination"
189msgstr "Combinació subtotal del producte"
190
191#. module: sale_promotions
192#: help:sale.order.line,promotion_line:0
193msgid "Indicates if the line was created by promotions"
194msgstr "Indicar si aquesta línia es creada per promocions"
195
196#. module: sale_promotions
197#: field:promos.rules,active:0
198msgid "Active"
199msgstr "Actiu"
200
201#. module: sale_promotions
202#: selection:promos.rules,expected_logic_result:0
203msgid "True"
204msgstr "Verdader"
205
206#. module: sale_promotions
207#: selection:promos.rules.conditions.exps,attribute:0
208msgid "Total Amount"
209msgstr "Quantitat Total"
210
211#. module: sale_promotions
212#: view:promos.rules:0
213msgid "Coupon/Voucher Settings"
214msgstr "Configuració dels cupons"
215
216#. module: sale_promotions
217#: view:promos.rules:0
218msgid "Promotions"
219msgstr "Promocions"
220
221#. module: sale_promotions
222#: code:addons/sale_promotions/models/rules.py:0
223#: selection:promos.rules.actions,action_type:0
224#, python-format
225msgid "Buy X get Y free"
226msgstr "Compra X i emportis Y"
227
228#. module: sale_promotions
229#: constraint:ir.ui.view:0
230msgid "Invalid XML for View Architecture!"
231msgstr "¡XML invàlid per la definició de la vista!"
232
233#. module: sale_promotions
234#: selection:promos.rules.conditions.exps,attribute:0
235msgid "Compute sub total of products"
236msgstr "Calcula subtotal dels productes"
237
238#. module: sale_promotions
239#: field:promos.rules.conditions.exps,comparator:0
240msgid "Comparator"
241msgstr "Comparador"
242
243#. module: sale_promotions
244#: selection:promos.rules.conditions.exps,attribute:0
245msgid "Tax Amount"
246msgstr "Impostos"
247
248#. module: sale_promotions
249#: code:addons/sale_promotions/models/rules.py:0
250#: selection:promos.rules.conditions.exps,attribute:0
251#, python-format
252msgid "Untaxed Total"
253msgstr "Base imponible"
254
255#. module: sale_promotions
256#: field:promos.rules.conditions.exps,value:0
257msgid "Value"
258msgstr "Valor"
259
260#. module: sale_promotions
261#: code:addons/sale_promotions/models/rules.py:0
262#: selection:promos.rules.conditions.exps,comparator:0
263#, python-format
264msgid "equals"
265msgstr "es igual a"
266
267#. module: sale_promotions
268#: view:promos.rules:0
269#: field:promos.rules,partner_categories:0
270msgid "Partner Categories"
271msgstr "Categories de clients"
272
273#. module: sale_promotions
274#: selection:promos.rules.conditions.exps,attribute:0
275msgid "Product Quantity combination"
276msgstr "Combinació quantitat del producte"
277
278#. module: sale_promotions
279#: field:promos.rules,uses_per_partner:0
280msgid "Uses per Partner"
281msgstr "Usos per client"
282
283#. module: sale_promotions
284#: selection:promos.rules.conditions.exps,attribute:0
285msgid "Compute sub total excluding products"
286msgstr "Calcula subtotal excloent productes"
287
288#. module: sale_promotions
289#: field:promos.rules,logic:0
290msgid "Logic"
291msgstr "Lògica"
292
293#. module: sale_promotions
294#: view:promos.rules:0
295msgid "If"
296msgstr "Si"
297
298#. module: sale_promotions
299#: field:promos.rules.actions,action_type:0
300msgid "Action"
301msgstr "Accions"
302
303#. module: sale_promotions
304#: field:promos.rules,expressions:0
305msgid "Expressions/Conditions"
306msgstr "Expressions/Condicions"
307
308#. module: sale_promotions
309#: field:promos.rules.actions,promotion:0
310#: field:promos.rules.conditions.exps,promotion:0
311msgid "Promotion"
312msgstr "Promoció"
313
314#. module: sale_promotions
315#: selection:promos.rules.conditions.exps,attribute:0
316msgid "Custom domain expression"
317msgstr "Expressió personalitzada"
318
319#. module: sale_promotions
320#: code:addons/sale_promotions/models/rules.py:0
321#: selection:promos.rules.actions,action_type:0
322#, python-format
323msgid "Discount % on Sub Total"
324msgstr "Descompte % en el subtotal"
325
326#. module: sale_promotions
327#: code:addons/sale_promotions/models/rules.py:0
328#: selection:promos.rules.conditions.exps,comparator:0
329#, python-format
330msgid "less than or equal to"
331msgstr "menor o igual a"
332
333#. module: sale_promotions
334#: field:sale.order.line,promotion_line:0
335msgid "Promotion Line"
336msgstr "Línia de promoció"
337
338#. module: sale_promotions
339#: field:promos.rules,shop:0
340msgid "Shop"
341msgstr "Botiga"
342
343#. module: sale_promotions
344#: model:ir.module.module,shortdesc:sale_promotions.module_meta_information
345msgid "Promotions for Open ERP"
346msgstr "Promociones per OpenERP"
347
348#. module: sale_promotions
349#: selection:promos.rules,logic:0
350msgid "All"
351msgstr "Tot"
352
353#. module: sale_promotions
354#: model:ir.module.module,description:sale_promotions.module_meta_information
355msgid ""
356"\n"
357" Promotions on Sale Order for Open ERP\n"
358" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
359" Features:\n"
360" 1. Promotions based on conditions and coupons\n"
361" 2. Web services API compliance\n"
362" \n"
363" Credits:\n"
364" This design is based/inspired by the Magento commerce\n"
365" Special Thanks to Yannick Buron for analysis\n"
366" "
367msgstr ""
368"\n"
369" Promocions en les comandes de venda d'OpenERP\n"
370" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
371" Característiques:\n"
372" 1. Promociones basades en condicions i cupons\n"
373" 2. Web services API pel seu comerç electrònic\n"
374" \n"
375" Crèdits:\n"
376" Aquest mòdul està dissenyat/inspirat en Magento ecommerce\n"
377" Agraïments a Yannick Buron pel anàlisis\n"
378" "
379
380#. module: sale_promotions
381#: field:promos.rules,sequence:0
382#: field:promos.rules.actions,sequence:0
383#: field:promos.rules.conditions.exps,sequence:0
384msgid "Sequence"
385msgstr "Seqüència"
386
387#. module: sale_promotions
388#: code:addons/sale_promotions/models/rules.py:0
389#: selection:promos.rules.conditions.exps,comparator:0
390#, python-format
391msgid "is in"
392msgstr "es en"
393
394#. module: sale_promotions
395#: field:promos.rules.conditions.exps,attribute:0
396msgid "Attribute"
397msgstr "Atribut"
398
399#. module: sale_promotions
400#: view:promos.rules.conditions.expres
401#: view:promos.rules.conditions.exps:0
402msgid "Rule Expressions"
403msgstr "Expressió de la regla"
404
405#. module: sale_promotions
406#: code:addons/sale_promotions/models/rules.py:0
407#: selection:promos.rules.conditions.exps,comparator:0
408#, python-format
409msgid "less than"
410msgstr "menys de"
411
412#. module: sale_promotions
413#: view:promos.rules:0
414#: field:promos.rules,actions:0
415msgid "Actions"
416msgstr "Accions"
417
418#. module: sale_promotions
419#: help:promos.rules,partner_categories:0
420msgid "Applicable to all if none is selected"
421msgstr "Aplicable en tot si cap es seleccionat"
422
423#. module: sale_promotions
424#: selection:promos.rules.conditions.exps,attribute:0
425msgid "Product NetPrice combination"
426msgstr "Combinació preu net del producte"
427
428#. module: sale_promotions
429#: code:addons/sale_promotions/models/rules.py:0
430#: selection:promos.rules.actions,action_type:0
431#, python-format
432msgid "Discount % on Product"
433msgstr "Descompte % en el producte"
434
435#. module: sale_promotions
436#: help:promos.rules,coupon_used:0
437msgid "The number of times this coupon has been used."
438msgstr "El número de cupons ja s'ha utilitzat."
439
440#. module: sale_promotions
441#: selection:promos.rules.conditions.exps,attribute:0
442msgid "Product Code in order"
443msgstr "Codi producte en la comanda"
444
445#. module: sale_promotions
446#: view:promos.rules:0
447msgid "Expressions"
448msgstr "Expressions"
449
450#. module: sale_promotions
451#: code:addons/sale_promotions/models/rules.py:0
452#: selection:promos.rules.actions,action_type:0
453#, python-format
454msgid "Fixed amount on Product"
455msgstr "Quantitat fixe del producte"
456
457#. module: sale_promotions
458#: selection:promos.rules,logic:0
459msgid "Any"
460msgstr "Cap"
461
462#. module: sale_promotions
463#: view:sale.order:0
464msgid "Apply Promotions"
465msgstr "Aplicar promocions"
466
467#. module: sale_promotions
468#: field:promos.rules,from_date:0
469msgid "From Date"
470msgstr "Fins a"
471
0472
=== added file 'i18n/es.po'
--- i18n/es.po 1970-01-01 00:00:00 +0000
+++ i18n/es.po 2011-11-30 12:20:28 +0000
@@ -0,0 +1,421 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * sale_promotions
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.15\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-03-14 14:53+0000\n"
10"PO-Revision-Date: 2011-10-11 17:39+0100\n"
11"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17
18#. module: sale_promotions
19#: field:promos.rules,name:0
20msgid "Promo Name"
21msgstr "Nombre"
22
23#. module: sale_promotions
24#: view:promos.rules:0
25msgid "expressions are"
26msgstr "las expresiones son"
27
28#. module: sale_promotions
29#: field:promos.rules.conditions.exps,stop_further:0
30msgid "Stop further checks"
31msgstr "Finalizar comprobación"
32
33#. module: sale_promotions
34#: field:promos.rules,uses_per_coupon:0
35msgid "Uses per Coupon"
36msgstr "Usos por cupón"
37
38#. module: sale_promotions
39#: field:promos.rules,coupon_used:0
40msgid "Number of Coupon Uses"
41msgstr "Número de usos por cupón"
42
43#. module: sale_promotions
44#: field:promos.rules.actions,product_code:0
45msgid "Product Code"
46msgstr "Código producto"
47
48#. module: sale_promotions
49#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
50#: model:ir.model,name:sale_promotions.model_promos_rules
51#: model:ir.ui.menu,name:sale_promotions.promos
52msgid "Promotion Rules"
53msgstr "Reglas de promoción"
54
55#. module: sale_promotions
56#: field:sale.order,coupon_code:0
57msgid "Promo Coupon Code"
58msgstr "Código cupón de la promoción"
59
60#. module: sale_promotions
61#: view:promos.rules:0
62msgid "Applicable Period"
63msgstr "Periodo aplicable"
64
65#. module: sale_promotions
66#: field:promos.rules,stop_further:0
67msgid "Stop Checks"
68msgstr "Finalizar proceso"
69
70#. module: sale_promotions
71#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
72msgid "Expressions for conditions"
73msgstr "Expresiones para las condiciones"
74
75#. module: sale_promotions
76#: field:promos.rules,to_date:0
77msgid "To Date"
78msgstr "Hasta"
79
80#. module: sale_promotions
81#: code:addons/sale_promotions/models/rules.py:62
82#: selection:promos.rules.conditions.exps,comparator:0
83#, python-format
84msgid "not equal to"
85msgstr "no es igual a"
86
87#. module: sale_promotions
88#: field:promos.rules.actions,arguments:0
89msgid "Arguments"
90msgstr "Argumentos"
91
92#. module: sale_promotions
93#: code:addons/sale_promotions/models/rules.py:64
94#: selection:promos.rules.conditions.exps,comparator:0
95#, python-format
96msgid "greater than or equal to"
97msgstr "mayor o igual a"
98
99#. module: sale_promotions
100#: field:promos.rules,expected_logic_result:0
101msgid "Output"
102msgstr "Salida"
103
104#. module: sale_promotions
105#: selection:promos.rules.conditions.exps,attribute:0
106msgid "Product UnitPrice combination"
107msgstr "Combinación precio unidad del producto"
108
109#. module: sale_promotions
110#: help:promos.rules,stop_further:0
111msgid "Stops further promotions being checked"
112msgstr "Finalizar promociones"
113
114#. module: sale_promotions
115#: model:ir.model,name:sale_promotions.model_promos_rules_actions
116msgid "Promotions actions"
117msgstr "Acciones de la promoción"
118
119#. module: sale_promotions
120#: selection:promos.rules.conditions.exps,attribute:0
121msgid "Product Discount combination"
122msgstr "Combinación descuento del producto"
123
124#. module: sale_promotions
125#: view:promos.rules:0
126msgid "Conditions"
127msgstr "Condiciones"
128
129#. module: sale_promotions
130#: code:addons/sale_promotions/models/rules.py:75
131#: selection:promos.rules.actions,action_type:0
132#, python-format
133msgid "Fixed amount on Sub Total"
134msgstr "Cantidad fija en subtotal"
135
136#. module: sale_promotions
137#: sql_constraint:sale.order:0
138msgid "Order Reference must be unique !"
139msgstr "Order Reference must be unique !"
140
141#. module: sale_promotions
142#: view:promos.rules:0
143#: field:promos.rules,description:0
144msgid "Description"
145msgstr "Descripción"
146
147#. module: sale_promotions
148#: field:promos.rules,coupon_code:0
149msgid "Coupon Code"
150msgstr "Código cupón"
151
152#. module: sale_promotions
153#: code:addons/sale_promotions/models/rules.py:68
154#: selection:promos.rules.conditions.exps,comparator:0
155#, python-format
156msgid "is not in"
157msgstr "no está en"
158
159#. module: sale_promotions
160#: selection:promos.rules.conditions.exps,attribute:0
161msgid "Product Weight combination"
162msgstr "Combinación peso del producto"
163
164#. module: sale_promotions
165#: selection:promos.rules.conditions.exps,attribute:0
166msgid "Product SubTotal combination"
167msgstr "Combinación subtotal del producto"
168
169#. module: sale_promotions
170#: help:sale.order.line,promotion_line:0
171msgid "Indicates if the line was created by promotions"
172msgstr "Indicar si esta línea es creada por promociones"
173
174#. module: sale_promotions
175#: field:promos.rules,active:0
176msgid "Active"
177msgstr "Activo"
178
179#. module: sale_promotions
180#: selection:promos.rules,expected_logic_result:0
181msgid "True"
182msgstr "Verdadero"
183
184#. module: sale_promotions
185#: view:promos.rules:0
186msgid "Coupon/Voucher Settings"
187msgstr "Configuración de los cupones"
188
189#. module: sale_promotions
190#: view:promos.rules:0
191msgid "Promotions"
192msgstr "Promociones"
193
194#. module: sale_promotions
195#: code:addons/sale_promotions/models/rules.py:76
196#: selection:promos.rules.actions,action_type:0
197#, python-format
198msgid "Buy X get Y free"
199msgstr "Compre X y llévate Y"
200
201#. module: sale_promotions
202#: selection:promos.rules.conditions.exps,attribute:0
203msgid "Compute sub total of products"
204msgstr "Calcula subtotal de los productos"
205
206#. module: sale_promotions
207#: field:promos.rules.conditions.exps,comparator:0
208msgid "Comparator"
209msgstr "Comparador"
210
211#. module: sale_promotions
212#: selection:promos.rules.conditions.exps,attribute:0
213msgid "Tax Amount"
214msgstr "Impuestos"
215
216#. module: sale_promotions
217#: code:addons/sale_promotions/models/rules.py:42
218#: selection:promos.rules.conditions.exps,attribute:0
219#, python-format
220msgid "Untaxed Total"
221msgstr "Base imponible"
222
223#. module: sale_promotions
224#: field:promos.rules.conditions.exps,value:0
225msgid "Value"
226msgstr "Valor"
227
228#. module: sale_promotions
229#: code:addons/sale_promotions/models/rules.py:61
230#: selection:promos.rules.conditions.exps,comparator:0
231#, python-format
232msgid "equals"
233msgstr "es igual a"
234
235#. module: sale_promotions
236#: view:promos.rules:0
237#: field:promos.rules,partner_categories:0
238msgid "Partner Categories"
239msgstr "Categorias de clientes"
240
241#. module: sale_promotions
242#: selection:promos.rules.conditions.exps,attribute:0
243msgid "Product Quantity combination"
244msgstr "Combinación cantidad del producto"
245
246#. module: sale_promotions
247#: field:promos.rules,uses_per_partner:0
248msgid "Uses per Partner"
249msgstr "Usos por cliente"
250
251#. module: sale_promotions
252#: selection:promos.rules.conditions.exps,attribute:0
253msgid "Compute sub total excluding products"
254msgstr "Calcula subtotal excluyendo productos"
255
256#. module: sale_promotions
257#: field:promos.rules,logic:0
258msgid "Logic"
259msgstr "Lógica"
260
261#. module: sale_promotions
262#: view:promos.rules:0
263msgid "If"
264msgstr "Si"
265
266#. module: sale_promotions
267#: field:promos.rules.actions,action_type:0
268msgid "Action"
269msgstr "Acciones"
270
271#. module: sale_promotions
272#: selection:promos.rules,expected_logic_result:0
273msgid "False"
274msgstr "Falso"
275
276#. module: sale_promotions
277#: field:promos.rules.actions,promotion:0
278#: field:promos.rules.conditions.exps,promotion:0
279msgid "Promotion"
280msgstr "Promoción"
281
282#. module: sale_promotions
283#: selection:promos.rules.conditions.exps,attribute:0
284msgid "Custom domain expression"
285msgstr "Expresión personalizada"
286
287#. module: sale_promotions
288#: code:addons/sale_promotions/models/rules.py:74
289#: selection:promos.rules.actions,action_type:0
290#, python-format
291msgid "Discount % on Sub Total"
292msgstr "Descuento % en el subtotal"
293
294#. module: sale_promotions
295#: code:addons/sale_promotions/models/rules.py:66
296#: selection:promos.rules.conditions.exps,comparator:0
297#, python-format
298msgid "less than or equal to"
299msgstr "menor o igual a"
300
301#. module: sale_promotions
302#: field:sale.order.line,promotion_line:0
303msgid "Promotion Line"
304msgstr "Línia de promoción"
305
306#. module: sale_promotions
307#: field:promos.rules,shop:0
308msgid "Shop"
309msgstr "Tienda"
310
311#. module: sale_promotions
312#: selection:promos.rules.conditions.exps,attribute:0
313msgid "Total Amount"
314msgstr "Cantidad Total"
315
316#. module: sale_promotions
317#: selection:promos.rules,logic:0
318msgid "All"
319msgstr "Todo"
320
321#. module: sale_promotions
322#: model:ir.model,name:sale_promotions.model_sale_order
323msgid "Sales Order"
324msgstr "Sales Order"
325
326#. module: sale_promotions
327#: field:promos.rules,expressions:0
328msgid "Expressions/Conditions"
329msgstr "Expresiones/Condiciones"
330
331#. module: sale_promotions
332#: field:promos.rules,sequence:0
333#: field:promos.rules.actions,sequence:0
334#: field:promos.rules.conditions.exps,sequence:0
335msgid "Sequence"
336msgstr "Secuencia"
337
338#. module: sale_promotions
339#: code:addons/sale_promotions/models/rules.py:67
340#: selection:promos.rules.conditions.exps,comparator:0
341#, python-format
342msgid "is in"
343msgstr "es en"
344
345#. module: sale_promotions
346#: field:promos.rules.conditions.exps,attribute:0
347msgid "Attribute"
348msgstr "Atributo"
349
350#. module: sale_promotions
351#: code:addons/sale_promotions/models/rules.py:65
352#: selection:promos.rules.conditions.exps,comparator:0
353#, python-format
354msgid "less than"
355msgstr "menos de"
356
357#. module: sale_promotions
358#: view:promos.rules:0
359#: field:promos.rules,actions:0
360msgid "Actions"
361msgstr "Acciones"
362
363#. module: sale_promotions
364#: help:promos.rules,partner_categories:0
365msgid "Applicable to all if none is selected"
366msgstr "Aplicable en todo si ninguno es seleccionado"
367
368#. module: sale_promotions
369#: model:ir.model,name:sale_promotions.model_sale_order_line
370msgid "Sales Order Line"
371msgstr "Sales Order Line"
372
373#. module: sale_promotions
374#: code:addons/sale_promotions/models/rules.py:63
375#: selection:promos.rules.conditions.exps,comparator:0
376#, python-format
377msgid "greater than"
378msgstr "mayor que"
379
380#. module: sale_promotions
381#: code:addons/sale_promotions/models/rules.py:72
382#: selection:promos.rules.actions,action_type:0
383#, python-format
384msgid "Discount % on Product"
385msgstr "Descuento % en el producto"
386
387#. module: sale_promotions
388#: help:promos.rules,coupon_used:0
389msgid "The number of times this coupon has been used."
390msgstr "El número de cupones ya se han utilizado."
391
392#. module: sale_promotions
393#: selection:promos.rules.conditions.exps,attribute:0
394msgid "Product Code in order"
395msgstr "Código producto en orden"
396
397#. module: sale_promotions
398#: code:addons/sale_promotions/models/rules.py:73
399#: selection:promos.rules.actions,action_type:0
400#, python-format
401msgid "Fixed amount on Product"
402msgstr "Cantidad fija del producto"
403
404#. module: sale_promotions
405#: selection:promos.rules,logic:0
406msgid "Any"
407msgstr "Ninguno"
408
409#. module: sale_promotions
410#: view:sale.order:0
411msgid "Apply Promotions"
412msgstr "Aplicar promociones"
413
414#. module: sale_promotions
415#: field:promos.rules,from_date:0
416msgid "From Date"
417msgstr "Desde"
418
419#~ msgid "Rule Expressions"
420#~ msgstr "Expresión de la regla"
421
0422
=== added file 'i18n/es_ES.po'
--- i18n/es_ES.po 1970-01-01 00:00:00 +0000
+++ i18n/es_ES.po 2011-11-30 12:20:28 +0000
@@ -0,0 +1,471 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * sale_promotions
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.15\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-03-14 11:44:29+0000\n"
10"PO-Revision-Date: 2011-03-14 13:17+0100\n"
11"Last-Translator: Raimon Esteve <resteve@zikzakmedia.com>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17
18#. module: sale_promotions
19#: selection:promos.rules,expected_logic_result:0
20msgid "False"
21msgstr "Falso"
22
23#. module: sale_promotions
24#: field:promos.rules,name:0
25msgid "Promo Name"
26msgstr "Nombre"
27
28#. module: sale_promotions
29#: constraint:ir.model:0
30msgid "The Object name must start with x_ and not contain any special character !"
31msgstr "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter especial!"
32
33#. module: sale_promotions
34#: field:promos.rules.conditions.exps,stop_further:0
35msgid "Stop further checks"
36msgstr "Finalizar comprobación"
37
38#. module: sale_promotions
39#: field:promos.rules,uses_per_coupon:0
40msgid "Uses per Coupon"
41msgstr "Usos por cupón"
42
43#. module: sale_promotions
44#: field:promos.rules,coupon_used:0
45msgid "Number of Coupon Uses"
46msgstr "Número de usos por cupón"
47
48#. module: sale_promotions
49#: field:promos.rules.actions,product_code:0
50msgid "Product Code"
51msgstr "Código producto"
52
53#. module: sale_promotions
54#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
55#: model:ir.model,name:sale_promotions.model_promos_rules
56#: model:ir.ui.menu,name:sale_promotions.promos
57msgid "Promotion Rules"
58msgstr "Reglas de promoción"
59
60#. module: sale_promotions
61#: field:sale.order,coupon_code:0
62msgid "Promo Coupon Code"
63msgstr "Código cupón de la promoción"
64
65#. module: sale_promotions
66#: view:promos.rules:0
67msgid "Applicable Period"
68msgstr "Periodo aplicable"
69
70#. module: sale_promotions
71#: code:addons/sale_promotions/models/rules.py:0
72#: selection:promos.rules.conditions.exps,comparator:0
73#, python-format
74msgid "greater than"
75msgstr "mayor que"
76
77#. module: sale_promotions
78#: view:promos.rules:0
79msgid "expressions are"
80msgstr "las expresiones son"
81
82#. module: sale_promotions
83#: field:promos.rules,stop_further:0
84msgid "Stop Checks"
85msgstr "Finalizar proceso"
86
87#. module: sale_promotions
88#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
89msgid "Expressions for conditions"
90msgstr "Expresiones para las condiciones"
91
92#. module: sale_promotions
93#: field:promos.rules,to_date:0
94msgid "To Date"
95msgstr "Desde"
96
97#. module: sale_promotions
98#: code:addons/sale_promotions/models/rules.py:0
99#: selection:promos.rules.conditions.exps,comparator:0
100#, python-format
101msgid "not equal to"
102msgstr "no es igual a"
103
104#. module: sale_promotions
105#: field:promos.rules.actions,arguments:0
106msgid "Arguments"
107msgstr "Argumentos"
108
109#. module: sale_promotions
110#: constraint:ir.actions.act_window:0
111msgid "Invalid model name in the action definition."
112msgstr "Nombre del modelo inválido en la definición de la acción."
113
114#. module: sale_promotions
115#: field:promos.rules,expected_logic_result:0
116msgid "Output"
117msgstr "Salida"
118
119#. module: sale_promotions
120#: selection:promos.rules.conditions.exps,attribute:0
121msgid "Product UnitPrice combination"
122msgstr "Combinación precio unidad del producto"
123
124#. module: sale_promotions
125#: help:promos.rules,stop_further:0
126msgid "Stops further promotions being checked"
127msgstr "Finalizar promociones"
128
129#. module: sale_promotions
130#: model:ir.model,name:sale_promotions.model_promos_rules_actions
131msgid "Promotions actions"
132msgstr "Acciones de la promoción"
133
134#. module: sale_promotions
135#: selection:promos.rules.conditions.exps,attribute:0
136msgid "Product Discount combination"
137msgstr "Combinación descuento del producto"
138
139#. module: sale_promotions
140#: view:promos.rules:0
141msgid "Conditions"
142msgstr "Condiciones"
143
144#. module: sale_promotions
145#: code:addons/sale_promotions/models/rules.py:0
146#: selection:promos.rules.conditions.exps,comparator:0
147#, python-format
148msgid "greater than or equal to"
149msgstr "mayor o igual a"
150
151#. module: sale_promotions
152#: code:addons/sale_promotions/models/rules.py:0
153#: selection:promos.rules.actions,action_type:0
154#, python-format
155msgid "Fixed amount on Sub Total"
156msgstr "Cantidad fija en subtotal"
157
158#. module: sale_promotions
159#: view:promos.rules:0
160#: field:promos.rules,description:0
161msgid "Description"
162msgstr "Descripción"
163
164#. module: sale_promotions
165#: field:promos.rules.conditions.exps,serialised_expr:0
166msgid "Expression"
167msgstr "Expresión"
168
169#. module: sale_promotions
170#: field:promos.rules,coupon_code:0
171msgid "Coupon Code"
172msgstr "Código cupón"
173
174#. module: sale_promotions
175#: code:addons/sale_promotions/models/rules.py:0
176#: selection:promos.rules.conditions.exps,comparator:0
177#, python-format
178msgid "is not in"
179msgstr "no está en"
180
181#. module: sale_promotions
182#: selection:promos.rules.conditions.exps,attribute:0
183msgid "Product Weight combination"
184msgstr "Combinación peso del producto"
185
186#. module: sale_promotions
187#: selection:promos.rules.conditions.exps,attribute:0
188msgid "Product SubTotal combination"
189msgstr "Combinación subtotal del producto"
190
191#. module: sale_promotions
192#: help:sale.order.line,promotion_line:0
193msgid "Indicates if the line was created by promotions"
194msgstr "Indicar si esta línea es creada por promociones"
195
196#. module: sale_promotions
197#: field:promos.rules,active:0
198msgid "Active"
199msgstr "Activo"
200
201#. module: sale_promotions
202#: selection:promos.rules,expected_logic_result:0
203msgid "True"
204msgstr "Verdadero"
205
206#. module: sale_promotions
207#: selection:promos.rules.conditions.exps,attribute:0
208msgid "Total Amount"
209msgstr "Cantidad Total"
210
211#. module: sale_promotions
212#: view:promos.rules:0
213msgid "Coupon/Voucher Settings"
214msgstr "Configuración de los cupones"
215
216#. module: sale_promotions
217#: view:promos.rules:0
218msgid "Promotions"
219msgstr "Promociones"
220
221#. module: sale_promotions
222#: code:addons/sale_promotions/models/rules.py:0
223#: selection:promos.rules.actions,action_type:0
224#, python-format
225msgid "Buy X get Y free"
226msgstr "Compre X y llévate Y"
227
228#. module: sale_promotions
229#: constraint:ir.ui.view:0
230msgid "Invalid XML for View Architecture!"
231msgstr "¡XML inválido para la definición de la vista!"
232
233#. module: sale_promotions
234#: selection:promos.rules.conditions.exps,attribute:0
235msgid "Compute sub total of products"
236msgstr "Calcula subtotal de los productos"
237
238#. module: sale_promotions
239#: field:promos.rules.conditions.exps,comparator:0
240msgid "Comparator"
241msgstr "Comparador"
242
243#. module: sale_promotions
244#: selection:promos.rules.conditions.exps,attribute:0
245msgid "Tax Amount"
246msgstr "Impuestos"
247
248#. module: sale_promotions
249#: code:addons/sale_promotions/models/rules.py:0
250#: selection:promos.rules.conditions.exps,attribute:0
251#, python-format
252msgid "Untaxed Total"
253msgstr "Base imponible"
254
255#. module: sale_promotions
256#: field:promos.rules.conditions.exps,value:0
257msgid "Value"
258msgstr "Valor"
259
260#. module: sale_promotions
261#: code:addons/sale_promotions/models/rules.py:0
262#: selection:promos.rules.conditions.exps,comparator:0
263#, python-format
264msgid "equals"
265msgstr "es igual a"
266
267#. module: sale_promotions
268#: view:promos.rules:0
269#: field:promos.rules,partner_categories:0
270msgid "Partner Categories"
271msgstr "Categorias de clientes"
272
273#. module: sale_promotions
274#: selection:promos.rules.conditions.exps,attribute:0
275msgid "Product Quantity combination"
276msgstr "Combinación cantidad del producto"
277
278#. module: sale_promotions
279#: field:promos.rules,uses_per_partner:0
280msgid "Uses per Partner"
281msgstr "Usos por cliente"
282
283#. module: sale_promotions
284#: selection:promos.rules.conditions.exps,attribute:0
285msgid "Compute sub total excluding products"
286msgstr "Calcula subtotal excluyendo productos"
287
288#. module: sale_promotions
289#: field:promos.rules,logic:0
290msgid "Logic"
291msgstr "Lógica"
292
293#. module: sale_promotions
294#: view:promos.rules:0
295msgid "If"
296msgstr "Si"
297
298#. module: sale_promotions
299#: field:promos.rules.actions,action_type:0
300msgid "Action"
301msgstr "Acciones"
302
303#. module: sale_promotions
304#: field:promos.rules,expressions:0
305msgid "Expressions/Conditions"
306msgstr "Expresiones/Condiciones"
307
308#. module: sale_promotions
309#: field:promos.rules.actions,promotion:0
310#: field:promos.rules.conditions.exps,promotion:0
311msgid "Promotion"
312msgstr "Promoción"
313
314#. module: sale_promotions
315#: selection:promos.rules.conditions.exps,attribute:0
316msgid "Custom domain expression"
317msgstr "Expresión personalizada"
318
319#. module: sale_promotions
320#: code:addons/sale_promotions/models/rules.py:0
321#: selection:promos.rules.actions,action_type:0
322#, python-format
323msgid "Discount % on Sub Total"
324msgstr "Descuento % en el subtotal"
325
326#. module: sale_promotions
327#: code:addons/sale_promotions/models/rules.py:0
328#: selection:promos.rules.conditions.exps,comparator:0
329#, python-format
330msgid "less than or equal to"
331msgstr "menor o igual a"
332
333#. module: sale_promotions
334#: field:sale.order.line,promotion_line:0
335msgid "Promotion Line"
336msgstr "Línia de promoción"
337
338#. module: sale_promotions
339#: field:promos.rules,shop:0
340msgid "Shop"
341msgstr "Tienda"
342
343#. module: sale_promotions
344#: model:ir.module.module,shortdesc:sale_promotions.module_meta_information
345msgid "Promotions for Open ERP"
346msgstr "Promociones para OpenERP"
347
348#. module: sale_promotions
349#: selection:promos.rules,logic:0
350msgid "All"
351msgstr "Todo"
352
353#. module: sale_promotions
354#: model:ir.module.module,description:sale_promotions.module_meta_information
355msgid ""
356"\n"
357" Promotions on Sale Order for Open ERP\n"
358" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
359" Features:\n"
360" 1. Promotions based on conditions and coupons\n"
361" 2. Web services API compliance\n"
362" \n"
363" Credits:\n"
364" This design is based/inspired by the Magento commerce\n"
365" Special Thanks to Yannick Buron for analysis\n"
366" "
367msgstr ""
368"\n"
369" Promociones en los pedidos de venta de OpenERP\n"
370" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n"
371" Características:\n"
372" 1. Promociones basadas en condiciones y cupones\n"
373" 2. Web services API para su comercio electrónico\n"
374" \n"
375" Créditos:\n"
376" Este módulo se ha diseñado/inspirado de Magento ecommerce\n"
377" Agradecimientos a Yannick Buron para el análisis\n"
378" "
379
380#. module: sale_promotions
381#: field:promos.rules,sequence:0
382#: field:promos.rules.actions,sequence:0
383#: field:promos.rules.conditions.exps,sequence:0
384msgid "Sequence"
385msgstr "Secuencia"
386
387#. module: sale_promotions
388#: code:addons/sale_promotions/models/rules.py:0
389#: selection:promos.rules.conditions.exps,comparator:0
390#, python-format
391msgid "is in"
392msgstr "es en"
393
394#. module: sale_promotions
395#: field:promos.rules.conditions.exps,attribute:0
396msgid "Attribute"
397msgstr "Atributo"
398
399#. module: sale_promotions
400#: view:promos.rules.conditions.expres
401#: view:promos.rules.conditions.exps:0
402msgid "Rule Expressions"
403msgstr "Expresión de la regla"
404
405#. module: sale_promotions
406#: code:addons/sale_promotions/models/rules.py:0
407#: selection:promos.rules.conditions.exps,comparator:0
408#, python-format
409msgid "less than"
410msgstr "menos de"
411
412#. module: sale_promotions
413#: view:promos.rules:0
414#: field:promos.rules,actions:0
415msgid "Actions"
416msgstr "Acciones"
417
418#. module: sale_promotions
419#: help:promos.rules,partner_categories:0
420msgid "Applicable to all if none is selected"
421msgstr "Aplicable en todo si ninguno es seleccionado"
422
423#. module: sale_promotions
424#: selection:promos.rules.conditions.exps,attribute:0
425msgid "Product NetPrice combination"
426msgstr "Combinación precio neto del producto"
427
428#. module: sale_promotions
429#: code:addons/sale_promotions/models/rules.py:0
430#: selection:promos.rules.actions,action_type:0
431#, python-format
432msgid "Discount % on Product"
433msgstr "Descuento % en el producto"
434
435#. module: sale_promotions
436#: help:promos.rules,coupon_used:0
437msgid "The number of times this coupon has been used."
438msgstr "El número de cupones ya se han utilizado."
439
440#. module: sale_promotions
441#: selection:promos.rules.conditions.exps,attribute:0
442msgid "Product Code in order"
443msgstr "Código producto en orden"
444
445#. module: sale_promotions
446#: view:promos.rules:0
447msgid "Expressions"
448msgstr "Expresiones"
449
450#. module: sale_promotions
451#: code:addons/sale_promotions/models/rules.py:0
452#: selection:promos.rules.actions,action_type:0
453#, python-format
454msgid "Fixed amount on Product"
455msgstr "Cantidad fija del producto"
456
457#. module: sale_promotions
458#: selection:promos.rules,logic:0
459msgid "Any"
460msgstr "Ninguno"
461
462#. module: sale_promotions
463#: view:sale.order:0
464msgid "Apply Promotions"
465msgstr "Aplicar promociones"
466
467#. module: sale_promotions
468#: field:promos.rules,from_date:0
469msgid "From Date"
470msgstr "Hasta"
471
0472
=== added file 'i18n/sale_promotions.pot'
--- i18n/sale_promotions.pot 1970-01-01 00:00:00 +0000
+++ i18n/sale_promotions.pot 2011-11-30 12:20:28 +0000
@@ -0,0 +1,431 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * sale_promotions
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.1\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-03-14 14:53+0000\n"
10"PO-Revision-Date: 2011-03-14 14:53+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: sale_promotions
19#: field:promos.rules,name:0
20msgid "Promo Name"
21msgstr "Promo Name"
22
23#. module: sale_promotions
24#: view:promos.rules:0
25msgid "expressions are"
26msgstr "expressions are"
27
28#. module: sale_promotions
29#: field:promos.rules.conditions.exps,stop_further:0
30msgid "Stop further checks"
31msgstr "Stop further checks"
32
33#. module: sale_promotions
34#: field:promos.rules,uses_per_coupon:0
35msgid "Uses per Coupon"
36msgstr "Uses per Coupon"
37
38#. module: sale_promotions
39#: field:promos.rules,coupon_used:0
40msgid "Number of Coupon Uses"
41msgstr "Number of Coupon Uses"
42
43#. module: sale_promotions
44#: field:promos.rules.actions,product_code:0
45msgid "Product Code"
46msgstr "Product Code"
47
48#. module: sale_promotions
49#: model:ir.actions.act_window,name:sale_promotions.act_promotion_rules
50#: model:ir.model,name:sale_promotions.model_promos_rules
51#: model:ir.ui.menu,name:sale_promotions.promos
52msgid "Promotion Rules"
53msgstr "Promotion Rules"
54
55#. module: sale_promotions
56#: field:sale.order,coupon_code:0
57msgid "Promo Coupon Code"
58msgstr "Promo Coupon Code"
59
60#. module: sale_promotions
61#: view:promos.rules:0
62msgid "Applicable Period"
63msgstr "Applicable Period"
64
65#. module: sale_promotions
66#: field:promos.rules,stop_further:0
67msgid "Stop Checks"
68msgstr "Stop Checks"
69
70#. module: sale_promotions
71#: model:ir.model,name:sale_promotions.model_promos_rules_conditions_exps
72msgid "Expressions for conditions"
73msgstr "Expressions for conditions"
74
75#. module: sale_promotions
76#: field:promos.rules,to_date:0
77msgid "To Date"
78msgstr "To Date"
79
80#. module: sale_promotions
81#: code:addons/sale_promotions/models/rules.py:62
82#: selection:promos.rules.conditions.exps,comparator:0
83#, python-format
84msgid "not equal to"
85msgstr "not equal to"
86
87#. module: sale_promotions
88#: field:promos.rules.actions,arguments:0
89msgid "Arguments"
90msgstr "Arguments"
91
92#. module: sale_promotions
93#: code:addons/sale_promotions/models/rules.py:64
94#: selection:promos.rules.conditions.exps,comparator:0
95#, python-format
96msgid "greater than or equal to"
97msgstr "greater than or equal to"
98
99#. module: sale_promotions
100#: field:promos.rules,expected_logic_result:0
101msgid "Output"
102msgstr "Output"
103
104#. module: sale_promotions
105#: selection:promos.rules.conditions.exps,attribute:0
106msgid "Product UnitPrice combination"
107msgstr "Product UnitPrice combination"
108
109#. module: sale_promotions
110#: help:promos.rules,stop_further:0
111msgid "Stops further promotions being checked"
112msgstr "Stops further promotions being checked"
113
114#. module: sale_promotions
115#: model:ir.model,name:sale_promotions.model_promos_rules_actions
116msgid "Promotions actions"
117msgstr "Promotions actions"
118
119#. module: sale_promotions
120#: selection:promos.rules.conditions.exps,attribute:0
121msgid "Product Discount combination"
122msgstr "Product Discount combination"
123
124#. module: sale_promotions
125#: view:promos.rules:0
126msgid "Conditions"
127msgstr "Conditions"
128
129#. module: sale_promotions
130#: code:addons/sale_promotions/models/rules.py:75
131#: selection:promos.rules.actions,action_type:0
132#, python-format
133msgid "Fixed amount on Sub Total"
134msgstr "Fixed amount on Sub Total"
135
136#. module: sale_promotions
137#: sql_constraint:sale.order:0
138msgid "Order Reference must be unique !"
139msgstr "Order Reference must be unique !"
140
141#. module: sale_promotions
142#: view:promos.rules:0
143#: field:promos.rules,description:0
144msgid "Description"
145msgstr "Description"
146
147#. module: sale_promotions
148#: field:promos.rules.conditions.exps,serialised_expr:0
149msgid "Expression"
150msgstr "Expression"
151
152#. module: sale_promotions
153#: field:promos.rules,coupon_code:0
154msgid "Coupon Code"
155msgstr "Coupon Code"
156
157#. module: sale_promotions
158#: code:addons/sale_promotions/models/rules.py:68
159#: selection:promos.rules.conditions.exps,comparator:0
160#, python-format
161msgid "is not in"
162msgstr "is not in"
163
164#. module: sale_promotions
165#: selection:promos.rules.conditions.exps,attribute:0
166msgid "Product Weight combination"
167msgstr "Product Weight combination"
168
169#. module: sale_promotions
170#: selection:promos.rules.conditions.exps,attribute:0
171msgid "Product SubTotal combination"
172msgstr "Product SubTotal combination"
173
174#. module: sale_promotions
175#: help:sale.order.line,promotion_line:0
176msgid "Indicates if the line was created by promotions"
177msgstr "Indicates if the line was created by promotions"
178
179#. module: sale_promotions
180#: field:promos.rules,active:0
181msgid "Active"
182msgstr "Active"
183
184#. module: sale_promotions
185#: selection:promos.rules,expected_logic_result:0
186msgid "True"
187msgstr "True"
188
189#. module: sale_promotions
190#: view:promos.rules:0
191msgid "Coupon/Voucher Settings"
192msgstr "Coupon/Voucher Settings"
193
194#. module: sale_promotions
195#: view:promos.rules:0
196msgid "Promotions"
197msgstr "Promotions"
198
199#. module: sale_promotions
200#: code:addons/sale_promotions/models/rules.py:76
201#: selection:promos.rules.actions,action_type:0
202#, python-format
203msgid "Buy X get Y free"
204msgstr "Buy X get Y free"
205
206#. module: sale_promotions
207#: selection:promos.rules.conditions.exps,attribute:0
208msgid "Compute sub total of products"
209msgstr "Compute sub total of products"
210
211#. module: sale_promotions
212#: field:promos.rules.conditions.exps,comparator:0
213msgid "Comparator"
214msgstr "Comparator"
215
216#. module: sale_promotions
217#: selection:promos.rules.conditions.exps,attribute:0
218msgid "Tax Amount"
219msgstr "Tax Amount"
220
221#. module: sale_promotions
222#: code:addons/sale_promotions/models/rules.py:42
223#: selection:promos.rules.conditions.exps,attribute:0
224#, python-format
225msgid "Untaxed Total"
226msgstr "Untaxed Total"
227
228#. module: sale_promotions
229#: field:promos.rules.conditions.exps,value:0
230msgid "Value"
231msgstr "Value"
232
233#. module: sale_promotions
234#: code:addons/sale_promotions/models/rules.py:61
235#: selection:promos.rules.conditions.exps,comparator:0
236#, python-format
237msgid "equals"
238msgstr "equals"
239
240#. module: sale_promotions
241#: view:promos.rules:0
242#: field:promos.rules,partner_categories:0
243msgid "Partner Categories"
244msgstr "Partner Categories"
245
246#. module: sale_promotions
247#: selection:promos.rules.conditions.exps,attribute:0
248msgid "Product Quantity combination"
249msgstr "Product Quantity combination"
250
251#. module: sale_promotions
252#: field:promos.rules,uses_per_partner:0
253msgid "Uses per Partner"
254msgstr "Uses per Partner"
255
256#. module: sale_promotions
257#: selection:promos.rules.conditions.exps,attribute:0
258msgid "Compute sub total excluding products"
259msgstr "Compute sub total excluding products"
260
261#. module: sale_promotions
262#: field:promos.rules,logic:0
263msgid "Logic"
264msgstr "Logic"
265
266#. module: sale_promotions
267#: view:promos.rules:0
268msgid "If"
269msgstr "If"
270
271#. module: sale_promotions
272#: field:promos.rules.actions,action_type:0
273msgid "Action"
274msgstr "Action"
275
276#. module: sale_promotions
277#: selection:promos.rules,expected_logic_result:0
278msgid "False"
279msgstr "False"
280
281#. module: sale_promotions
282#: field:promos.rules.actions,promotion:0
283#: field:promos.rules.conditions.exps,promotion:0
284msgid "Promotion"
285msgstr "Promotion"
286
287#. module: sale_promotions
288#: selection:promos.rules.conditions.exps,attribute:0
289msgid "Custom domain expression"
290msgstr "Custom domain expression"
291
292#. module: sale_promotions
293#: code:addons/sale_promotions/models/rules.py:74
294#: selection:promos.rules.actions,action_type:0
295#, python-format
296msgid "Discount % on Sub Total"
297msgstr "Discount % on Sub Total"
298
299#. module: sale_promotions
300#: code:addons/sale_promotions/models/rules.py:66
301#: selection:promos.rules.conditions.exps,comparator:0
302#, python-format
303msgid "less than or equal to"
304msgstr "less than or equal to"
305
306#. module: sale_promotions
307#: field:sale.order.line,promotion_line:0
308msgid "Promotion Line"
309msgstr "Promotion Line"
310
311#. module: sale_promotions
312#: field:promos.rules,shop:0
313msgid "Shop"
314msgstr "Shop"
315
316#. module: sale_promotions
317#: selection:promos.rules.conditions.exps,attribute:0
318msgid "Total Amount"
319msgstr "Total Amount"
320
321#. module: sale_promotions
322#: selection:promos.rules,logic:0
323msgid "All"
324msgstr "All"
325
326#. module: sale_promotions
327#: model:ir.model,name:sale_promotions.model_sale_order
328msgid "Sales Order"
329msgstr "Sales Order"
330
331#. module: sale_promotions
332#: field:promos.rules,expressions:0
333msgid "Expressions/Conditions"
334msgstr "Expressions/Conditions"
335
336#. module: sale_promotions
337#: field:promos.rules,sequence:0
338#: field:promos.rules.actions,sequence:0
339#: field:promos.rules.conditions.exps,sequence:0
340msgid "Sequence"
341msgstr "Sequence"
342
343#. module: sale_promotions
344#: code:addons/sale_promotions/models/rules.py:67
345#: selection:promos.rules.conditions.exps,comparator:0
346#, python-format
347msgid "is in"
348msgstr "is in"
349
350#. module: sale_promotions
351#: field:promos.rules.conditions.exps,attribute:0
352msgid "Attribute"
353msgstr "Attribute"
354
355#. module: sale_promotions
356#: code:addons/sale_promotions/models/rules.py:65
357#: selection:promos.rules.conditions.exps,comparator:0
358#, python-format
359msgid "less than"
360msgstr "less than"
361
362#. module: sale_promotions
363#: view:promos.rules:0
364#: field:promos.rules,actions:0
365msgid "Actions"
366msgstr "Actions"
367
368#. module: sale_promotions
369#: help:promos.rules,partner_categories:0
370msgid "Applicable to all if none is selected"
371msgstr "Applicable to all if none is selected"
372
373#. module: sale_promotions
374#: model:ir.model,name:sale_promotions.model_sale_order_line
375msgid "Sales Order Line"
376msgstr "Sales Order Line"
377
378#. module: sale_promotions
379#: code:addons/sale_promotions/models/rules.py:63
380#: selection:promos.rules.conditions.exps,comparator:0
381#, python-format
382msgid "greater than"
383msgstr "greater than"
384
385#. module: sale_promotions
386#: code:addons/sale_promotions/models/rules.py:72
387#: selection:promos.rules.actions,action_type:0
388#, python-format
389msgid "Discount % on Product"
390msgstr "Discount % on Product"
391
392#. module: sale_promotions
393#: help:promos.rules,coupon_used:0
394msgid "The number of times this coupon has been used."
395msgstr "The number of times this coupon has been used."
396
397#. module: sale_promotions
398#: selection:promos.rules.conditions.exps,attribute:0
399msgid "Product Code in order"
400msgstr "Product Code in order"
401
402#. module: sale_promotions
403#: view:promos.rules:0
404#: view:promos.rules.conditions.expres
405 :0
406#: view:promos.rules.conditions.exps:0
407msgid "Expressions"
408msgstr "Expressions"
409
410#. module: sale_promotions
411#: code:addons/sale_promotions/models/rules.py:73
412#: selection:promos.rules.actions,action_type:0
413#, python-format
414msgid "Fixed amount on Product"
415msgstr "Fixed amount on Product"
416
417#. module: sale_promotions
418#: selection:promos.rules,logic:0
419msgid "Any"
420msgstr "Any"
421
422#. module: sale_promotions
423#: view:sale.order:0
424msgid "Apply Promotions"
425msgstr "Apply Promotions"
426
427#. module: sale_promotions
428#: field:promos.rules,from_date:0
429msgid "From Date"
430msgstr "From Date"
431
0432
=== modified file 'models/rules.py'
--- models/rules.py 2010-06-11 11:40:30 +0000
+++ models/rules.py 2011-11-30 12:20:28 +0000
@@ -6,6 +6,7 @@
6#########################################################################6#########################################################################
7# #7# #
8# Copyright (C) 2010 Open Labs Business Solutions #8# Copyright (C) 2010 Open Labs Business Solutions #
9# Copyright (C) 2011 Zikzakmedia #
9# Special Credit: Yannick Buron for design evaluation #10# Special Credit: Yannick Buron for design evaluation #
10# #11# #
11#This program is free software: you can redistribute it and/or modify #12#This program is free software: you can redistribute it and/or modify #
@@ -27,21 +28,61 @@
27 from sets import Set as set28 from sets import Set as set
28except:29except:
29 pass30 pass
31
30from osv import osv, fields32from osv import osv, fields
31from tools.misc import ustr33from tools.misc import ustr
32import netsvc34import netsvc
35from tools.translate import _
3336
34LOGGER = netsvc.Logger()37LOGGER = netsvc.Logger()
35DEBUG = True38DEBUG = True
36PRODUCT_UOM_ID = 139PRODUCT_UOM_ID = 1
3740
41ATTRIBUTES = [
42 ('amount_untaxed', _('Untaxed Total')),
43 ('amount_tax', 'Tax Amount'),
44 ('amount_total', 'Total Amount'),
45 ('product', 'Product Code in order'),
46 ('prod_qty', 'Product Quantity combination'),
47 ('prod_unit_price', 'Product UnitPrice combination'),
48 ('prod_sub_total', 'Product SubTotal combination'),
49# ('prod_net_price', 'Product NetPrice combination'),
50 ('prod_discount', 'Product Discount combination'),
51 ('prod_weight', 'Product Weight combination'),
52 ('comp_sub_total', 'Compute sub total of products'),
53 ('comp_sub_total_x', 'Compute sub total excluding products'),
54 #('tot_item_qty', 'Total Items Quantity'),
55 #('tot_weight', 'Total Weight'),
56 #('tot_item_qty', 'Total Items Quantity'),
57 ('custom', 'Custom domain expression'),
58]
59
60COMPARATORS = [
61 ('==', _('equals')),
62 ('!=', _('not equal to')),
63 ('>', _('greater than')),
64 ('>=', _('greater than or equal to')),
65 ('<', _('less than')),
66 ('<=', _('less than or equal to')),
67 ('in', _('is in')),
68 ('not in', _('is not in')),
69]
70
71ACTION_TYPES = [
72 ('prod_disc_perc', _('Discount % on Product')),
73 ('prod_disc_fix', _('Fixed amount on Product')),
74 ('cart_disc_perc', _('Discount % on Sub Total')),
75 ('cart_disc_fix', _('Fixed amount on Sub Total')),
76 ('prod_x_get_y', _('Buy X get Y free'))
77]
78
38class PromotionsRules(osv.osv):79class PromotionsRules(osv.osv):
39 "Promotion Rules"80 "Promotion Rules"
40 _name = "promos.rules"81 _name = "promos.rules"
41 _description = __doc__82 _description = __doc__
42 _order = 'sequence'83 _order = 'sequence'
43 84
44 def _count_coupon_use(self, cursor, user, ids, 85 def count_coupon_use(self, cursor, user, ids,
45 name, arg, context=None):86 name, arg, context=None):
46 '''87 '''
47 This function count the number of sale orders(not in cancelled state)88 This function count the number of sale orders(not in cancelled state)
@@ -84,11 +125,11 @@
84 string="Partner Categories",125 string="Partner Categories",
85 help="Applicable to all if none is selected"126 help="Applicable to all if none is selected"
86 ),127 ),
87 'coupon_code':fields.char('Coupon Code', size=20),128 'coupon_code':fields.char('Coupon Code', size=20, required=True),
88 'uses_per_coupon':fields.integer('Uses per Coupon'),129 'uses_per_coupon':fields.integer('Uses per Coupon'),
89 'uses_per_partner':fields.integer('Uses per Partner'),130 'uses_per_partner':fields.integer('Uses per Partner'),
90 'coupon_used': fields.function(131 'coupon_used': fields.function(
91 _count_coupon_use, 132 count_coupon_use,
92 method=True, 133 method=True,
93 type='integer',134 type='integer',
94 string='Number of Coupon Uses',135 string='Number of Coupon Uses',
@@ -117,10 +158,11 @@
117 }158 }
118 _defaults = {159 _defaults = {
119 'logic':lambda * a:'and',160 'logic':lambda * a:'and',
120 'expected_logic_result':lambda * a:'True'161 'expected_logic_result':lambda * a:'True',
162 'active':lambda * a:'True',
121 }163 }
122 164
123 def _date(self, str_date):165 def promotion_date(self, str_date):
124 "Converts string date to date"166 "Converts string date to date"
125 import time167 import time
126 try:168 try:
@@ -132,7 +174,7 @@
132 return str_date174 return str_date
133 175
134 176
135 def _check_primary_conditions(self, cursor, user,177 def check_primary_conditions(self, cursor, user,
136 promotion_rule, order, context):178 promotion_rule, order, context):
137 """179 """
138 Checks the conditions for 180 Checks the conditions for
@@ -161,9 +203,9 @@
161 #If the codes don't match then this is not the promo 203 #If the codes don't match then this is not the promo
162 if not order.coupon_code == promotion_rule.coupon_code:204 if not order.coupon_code == promotion_rule.coupon_code:
163 raise Exception("Coupon codes do not match")205 raise Exception("Coupon codes do not match")
164 # Calling _count_coupon_use to check whether no. of 206 # Calling count_coupon_use to check whether no. of
165 # uses is greater than allowed uses.207 # uses is greater than allowed uses.
166 count = self._count_coupon_use(cursor, user, [promotion_rule.id], 208 count = self.count_coupon_use(cursor, user, [promotion_rule.id],
167 True, None, context).values()[0]209 True, None, context).values()[0]
168 if count > promotion_rule.uses_per_coupon:210 if count > promotion_rule.uses_per_coupon:
169 raise Exception("Coupon is overused")211 raise Exception("Coupon is overused")
@@ -179,13 +221,13 @@
179 raise Exception("Customer already used coupon")221 raise Exception("Customer already used coupon")
180 #if a start date has been specified222 #if a start date has been specified
181 if promotion_rule.from_date and \223 if promotion_rule.from_date and \
182 not (self._date(224 not (self.promotion_date(
183 order.date_order) >= self._date(promotion_rule.from_date)):225 order.date_order) >= self.promotion_date(promotion_rule.from_date)):
184 raise Exception("Order before start of promotion")226 raise Exception("Order before start of promotion")
185 #If an end date has been specified227 #If an end date has been specified
186 if promotion_rule.to_date and \228 if promotion_rule.to_date and \
187 not (self._date(229 not (self.promotion_date(
188 order.date_order) <= self._date(promotion_rule.to_date)):230 order.date_order) <= self.promotion_date(promotion_rule.to_date)):
189 raise Exception("Order after end of promotion")231 raise Exception("Order after end of promotion")
190 #All tests have succeeded232 #All tests have succeeded
191 return True233 return True
@@ -203,7 +245,7 @@
203 context = {}245 context = {}
204 expression_obj = self.pool.get('promos.rules.conditions.exps')246 expression_obj = self.pool.get('promos.rules.conditions.exps')
205 try:247 try:
206 self._check_primary_conditions(248 self.check_primary_conditions(
207 cursor, user,249 cursor, user,
208 promotion_rule, order,250 promotion_rule, order,
209 context)251 context)
@@ -326,34 +368,7 @@
326 _order = "sequence"368 _order = "sequence"
327 _rec_name = 'serialised_expr'369 _rec_name = 'serialised_expr'
328 370
329 def _get_attributes(self, cursor, user, ids=None, context=None):371 def on_change(self, cursor, user, ids=None,
330 """
331 Gets the attributes in predefined format
332 @param cursor: Database Cursor
333 @param user: ID of User
334 @param ids: ID of current record.
335 @param context: Context(no direct use).
336 """
337 return [
338 ('amount_untaxed', 'Untaxed Total'),
339 ('amount_tax', 'Tax Amount'),
340 ('amount_total', 'Total Amount'),
341 ('product', 'Product Code in order'),
342 ('prod_qty', 'Product Quantity combination'),
343 ('prod_unit_price', 'Product UnitPrice combination'),
344 ('prod_sub_total', 'Product SubTotal combination'),
345 ('prod_net_price', 'Product NetPrice combination'),
346 ('prod_discount', 'Product Discount combination'),
347 ('prod_weight', 'Product Weight combination'),
348 ('comp_sub_total', 'Compute sub total of products'),
349 ('comp_sub_total_x', 'Compute sub total excluding products'),
350 #('tot_item_qty', 'Total Items Quantity'),
351 #('tot_weight', 'Total Weight'),
352 #('tot_item_qty', 'Total Items Quantity'),
353 ('custom', 'Custom domain expression'),
354 ]
355
356 def _on_change(self, cursor, user, ids=None,
357 attribute=None, value=None, context=None):372 attribute=None, value=None, context=None):
358 """373 """
359 Set the value field to the format if nothing is there374 Set the value field to the format if nothing is there
@@ -420,41 +435,17 @@
420 }435 }
421 }436 }
422 return {}437 return {}
423 438
424 def _get_comparators(self, cursor, user, ids=None, context=None):
425 """
426 Gets the attributes in predefined format
427 @param cursor: Database Cursor
428 @param user: ID of User
429 @param ids: ID of current record.
430 @param context: Context(no direct use).
431 """
432 return [
433# ('is', 'is'),
434# ('isnot', 'is not'),
435 ('==', 'equals'),
436 ('!=', 'not equal to'),
437 ('>', 'greater than'),
438 ('>=', 'greater than or equal to'),
439 ('<', 'less than'),
440 ('<=', 'less than or equal to'),
441 ('in', 'is in'),
442 ('not in', 'is not in'),
443 ]
444
445 _columns = {439 _columns = {
446 'sequence':fields.integer('Sequence'),440 'sequence':fields.integer('Sequence'),
447 'attribute':fields.selection(_get_attributes,441 'attribute':fields.selection(ATTRIBUTES,'Attribute', size=50, required=True),
448 'Attribute', size=50, required=True),442 'comparator':fields.selection(COMPARATORS, 'Comparator', required=True),
449 'comparator':fields.selection(_get_comparators,
450 'Comparator', required=True),
451 'value':fields.char('Value', size=100),443 'value':fields.char('Value', size=100),
452 'serialised_expr':fields.char('Expression', size=255),444 'serialised_expr':fields.char('Expression', size=255),
453 'promotion': fields.many2one('promos.rules',445 'promotion': fields.many2one('promos.rules', 'Promotion'),
454 'Promotion'),
455 'stop_further':fields.boolean('Stop further checks')446 'stop_further':fields.boolean('Stop further checks')
456
457 }447 }
448
458 _defaults = {449 _defaults = {
459 'comparator': lambda * a:'==',450 'comparator': lambda * a:'==',
460 'stop_further': lambda * a: '1'451 'stop_further': lambda * a: '1'
@@ -613,9 +604,9 @@
613 prod_qty[product_code] = prod_qty.get(604 prod_qty[product_code] = prod_qty.get(
614 product_code, 0.00605 product_code, 0.00
615 ) + line.product_uom_qty606 ) + line.product_uom_qty
616 prod_net_price[product_code] = prod_net_price.get(607# prod_net_price[product_code] = prod_net_price.get(
617 product_code, 0.00608# product_code, 0.00
618 ) + line.price_net609# ) + line.price_net
619 prod_unit_price[product_code] = prod_unit_price.get(610 prod_unit_price[product_code] = prod_unit_price.get(
620 product_code, 0.00611 product_code, 0.00
621 ) + line.price_unit612 ) + line.price_unit
@@ -686,7 +677,7 @@
686 _description = __doc__677 _description = __doc__
687 _rec_name = 'action_type'678 _rec_name = 'action_type'
688679
689 def _on_change(self, cursor, user, ids=None,680 def on_change(self, cursor, user, ids=None,
690 action_type=None, product_code=None,681 action_type=None, product_code=None,
691 arguments=None, context=None):682 arguments=None, context=None):
692 """683 """
@@ -743,37 +734,16 @@
743 }734 }
744 #Finally if nothing works735 #Finally if nothing works
745 return {}736 return {}
746
747 def _get_action_types(self, cursor, user, ids=None, context=None):
748 """
749 Gets the action types in predefined format
750 @param cursor: Database Cursor
751 @param user: ID of User
752 @param ids: ID current record.
753 @param context: Context(no direct use).
754 """
755 return [
756 ('prod_disc_perc', 'Discount % on Product'),
757 ('prod_disc_fix', 'Fixed amount on Product'),
758 ('cart_disc_perc', 'Discount % on Sub Total'),
759 ('cart_disc_fix', 'Fixed amount on Sub Total'),
760 ('prod_x_get_y', 'Buy X get Y free')
761 ]
762 737
763 _columns = {738 _columns = {
764 'sequence':fields.integer('Sequence', required=True),739 'sequence':fields.integer('Sequence', required=True),
765 'action_type':fields.selection(_get_action_types,740 'action_type':fields.selection(ACTION_TYPES, 'Action', required=True),
766 'Action',741 'product_code':fields.char('Product Code', size=100),
767 required=True),
768 'product_code':fields.char('Product Code',
769 size=100,
770 ),
771 'arguments':fields.char('Arguments', size=100),742 'arguments':fields.char('Arguments', size=100),
772 'promotion':fields.many2one('promos.rules',743 'promotion':fields.many2one('promos.rules', 'Promotion'),
773 'Promotion'),
774 }744 }
775 745
776 def _clear_existing_promotion_lines(self, cursor, user,746 def clear_existing_promotion_lines(self, cursor, user,
777 order, context=None):747 order, context=None):
778 """748 """
779 Deletes existing promotion lines before applying749 Deletes existing promotion lines before applying
@@ -805,7 +775,7 @@
805 context=context)775 context=context)
806 return True776 return True
807 777
808 def _action_prod_disc_perc(self, cursor, user,778 def action_prod_disc_perc(self, cursor, user,
809 action, order, context=None):779 action, order, context=None):
810 """780 """
811 Action for 'Discount % on Product'781 Action for 'Discount % on Product'
@@ -827,7 +797,7 @@
827 context797 context
828 )798 )
829 799
830 def _action_prod_disc_fix(self, cursor, user,800 def action_prod_disc_fix(self, cursor, user,
831 action, order, context=None):801 action, order, context=None):
832 """802 """
833 Action for 'Fixed amount on Product'803 Action for 'Fixed amount on Product'
@@ -862,7 +832,7 @@
862 context832 context
863 )833 )
864 834
865 def _action_cart_disc_perc(self, cursor, user,835 def action_cart_disc_perc(self, cursor, user,
866 action, order, context=None):836 action, order, context=None):
867 """837 """
868 'Discount % on Sub Total'838 'Discount % on Sub Total'
@@ -887,7 +857,7 @@
887 context857 context
888 )858 )
889 859
890 def _action_cart_disc_fix(self, cursor, user,860 def action_cart_disc_fix(self, cursor, user,
891 action, order, context=None):861 action, order, context=None):
892 """862 """
893 'Fixed amount on Sub Total'863 'Fixed amount on Sub Total'
@@ -912,7 +882,7 @@
912 context882 context
913 )883 )
914 884
915 def _create_y_line(self, cursor, user, action,885 def create_y_line(self, cursor, user, action,
916 order, quantity, product_id, context=None):886 order, quantity, product_id, context=None):
917 """887 """
918 Create new order line for product888 Create new order line for product
@@ -939,7 +909,7 @@
939 'product_uom':product_y.uom_id.id909 'product_uom':product_y.uom_id.id
940 }, context)910 }, context)
941911
942 def _action_prod_x_get_y(self, cursor, user,912 def action_prod_x_get_y(self, cursor, user,
943 action, order, context=None):913 action, order, context=None):
944 """914 """
945 'Buy X get Y free:[Only for integers]'915 'Buy X get Y free:[Only for integers]'
@@ -1020,7 +990,7 @@
1020 {990 {
1021 'product_uom_qty': qty_y_in_cart - tot_free_y,991 'product_uom_qty': qty_y_in_cart - tot_free_y,
1022 }, context)992 }, context)
1023 self._create_y_line(cursor, user, action,993 self.create_y_line(cursor, user, action,
1024 order,994 order,
1025 tot_free_y,995 tot_free_y,
1026 product_id,996 product_id,
@@ -1036,7 +1006,7 @@
1036 #Dont create line if quantity is not there1006 #Dont create line if quantity is not there
1037 if not tot_free_y:1007 if not tot_free_y:
1038 return True1008 return True
1039 return self._create_y_line(cursor, user, action,1009 return self.create_y_line(cursor, user, action,
1040 order, tot_free_y, product_id, context)1010 order, tot_free_y, product_id, context)
1041 1011
1042 def execute(self, cursor, user, action_id,1012 def execute(self, cursor, user, action_id,
@@ -1049,9 +1019,9 @@
1049 @param order: sale order1019 @param order: sale order
1050 @param context: Context(no direct use).1020 @param context: Context(no direct use).
1051 """1021 """
1052 self._clear_existing_promotion_lines(cursor, user, order, context)1022 self.clear_existing_promotion_lines(cursor, user, order, context)
1053 action = self.browse(cursor, user, action_id, context)1023 action = self.browse(cursor, user, action_id, context)
1054 method_name = '_action_' + action.action_type1024 method_name = 'action_' + action.action_type
1055 return getattr(self, method_name).__call__(cursor, user, action,1025 return getattr(self, method_name).__call__(cursor, user, action,
1056 order, context)1026 order, context)
1057 1027
10581028
=== added file 'security/ir.model.access.csv'
--- security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ security/ir.model.access.csv 2011-11-30 12:20:28 +0000
@@ -0,0 +1,4 @@
1"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2"access_promos_rules","sale_promotions_promos_rules","model_promos_rules","base.group_sale_manager",1,1,1,1
3"access_promos_rules_conditions_exps","sale_promotions_promos_rules_conditions_exps","model_promos_rules_conditions_exps","base.group_sale_manager",1,1,1,1
4"access_promos_rules_actions","sale_promotions_promos_rules_actions","model_promos_rules_actions","base.group_sale_manager",1,1,1,1
05
=== modified file 'views/rule.xml'
--- views/rule.xml 2010-06-09 14:44:01 +0000
+++ views/rule.xml 2011-11-30 12:20:28 +0000
@@ -21,23 +21,23 @@
21 nolabel="1" />21 nolabel="1" />
2222
23 </group>23 </group>
24 <group colspan="6">24 <group colspan="6">
25 <group colspan="2">25 <group colspan="2">
26 <separator colspan="4"26 <separator colspan="4"
27 string="Coupon/Voucher Settings" />27 string="Coupon/Voucher Settings" />
28 <field name="coupon_code" />28 <field name="coupon_code" />
29 <field name="coupon_used" />29 <field name="coupon_used" />
30 <field name="uses_per_coupon"30 <field name="uses_per_coupon"
31 attrs="{'required':[('coupon_code','!=',False)]}" />31 attrs="{'required':[('coupon_code','!=',False)]}" />
32 <field name="uses_per_partner"32 <field name="uses_per_partner"
33 attrs="{'required':[('coupon_code','!=',False)]}" />33 attrs="{'required':[('coupon_code','!=',False)]}" />
34 </group>34 </group>
35 <group col="2" colspan="2">35 <group col="2" colspan="2">
36 <separator colspan="4" string="Applicable Period" />36 <separator colspan="4" string="Applicable Period" />
37 <field name="from_date" />37 <field name="from_date" />
38 <field name="to_date" />38 <field name="to_date" />
39 </group>39 </group>
40</group>40 </group>
41 <notebook colspan="4">41 <notebook colspan="4">
42 <page string="Conditions">42 <page string="Conditions">
43 <group colspan="4" col="8">43 <group colspan="4" col="8">
@@ -55,10 +55,18 @@
55 <field name="sequence" />55 <field name="sequence" />
56 <field name="stop_further" />56 <field name="stop_further" />
57 <field name="attribute"57 <field name="attribute"
58 on_change="on_change(attribute, value)" />
59 <field name="comparator" />
60 <field name="value" />
61 </tree>
62 <form>
63 <field name="sequence" />
64 <field name="attribute"
58 on_change="_on_change(attribute, value)" />65 on_change="_on_change(attribute, value)" />
59 <field name="comparator" />66 <field name="comparator" />
60 <field name="value" />67 <field name="value" />
61 </tree>68 <field name="stop_further" />
69 </form>
62 </field>70 </field>
63 </page>71 </page>
64 <page string="Actions">72 <page string="Actions">
@@ -66,10 +74,17 @@
66 <tree editable="bottom" string="Actions">74 <tree editable="bottom" string="Actions">
67 <field name="sequence" />75 <field name="sequence" />
68 <field name="action_type"76 <field name="action_type"
77 on_change="on_change(action_type, product_code, arguments)" />
78 <field name="product_code" />
79 <field name="arguments" />
80 </tree>
81 <form>
82 <field name="sequence" />
83 <field name="action_type"
69 on_change="_on_change(action_type, product_code, arguments)" />84 on_change="_on_change(action_type, product_code, arguments)" />
70 <field name="product_code" />85 <field name="product_code" />
71 <field name="arguments" />86 <field name="arguments" />
72 </tree>87 </form>
73 </field>88 </field>
74 </page>89 </page>
75 <page string="Partner Categories">90 <page string="Partner Categories">
@@ -105,14 +120,14 @@
105 <field name="view_mode">tree,form</field>120 <field name="view_mode">tree,form</field>
106 </record>121 </record>
107 <menuitem id="promos" action="act_promotion_rules"122 <menuitem id="promos" action="act_promotion_rules"
108 parent="sale.menu_shop_configuration" />123 parent="base.menu_sale_config_sales" />
109124
110 <record model="ir.ui.view" id="view_promotion_cond_expr_form">125 <record model="ir.ui.view" id="view_promotion_cond_expr_form">
111 <field name="name">promos.rules.conditions.exps.form</field>126 <field name="name">promos.rules.conditions.exps.form</field>
112 <field name="model">promos.rules.conditions.exps</field>127 <field name="model">promos.rules.conditions.exps</field>
113 <field name="type">form</field>128 <field name="type">form</field>
114 <field name="arch" type="xml">129 <field name="arch" type="xml">
115 <form string="Rule Expressions">130 <form string="Expressions">
116 <field name="sequence" />131 <field name="sequence" />
117 <field name="serialised_expr" />132 <field name="serialised_expr" />
118 </form>133 </form>
@@ -125,11 +140,11 @@
125 </field>140 </field>
126 <field name="type">tree</field>141 <field name="type">tree</field>
127 <field name="arch" type="xml">142 <field name="arch" type="xml">
128 <tree string="Rule Expressions">143 <tree string="Expressions">
129 <field name="sequence" />144 <field name="sequence" />
130 <field name="serialised_expr" />145 <field name="serialised_expr" />
131 </tree>146 </tree>
132 </field>147 </field>
133 </record>148 </record>
134 </data>149 </data>
135</openerp>
136\ No newline at end of file150\ No newline at end of file
151</openerp>
137152
=== modified file 'views/sale.xml'
--- views/sale.xml 2010-06-08 21:42:30 +0000
+++ views/sale.xml 2011-11-30 12:20:28 +0000
@@ -7,10 +7,8 @@
7 <field name="type">form</field>7 <field name="type">form</field>
8 <field name="inherit_id" ref="sale.view_order_form" />8 <field name="inherit_id" ref="sale.view_order_form" />
9 <field name="arch" type="xml">9 <field name="arch" type="xml">
10 <xpath expr="/form/notebook/page[@string='Other data']"10 <xpath expr="/form/notebook/page[@string='Other Information']" position="inside">
11 position="inside">11 <field name='coupon_code' attrs="{'readonly':[('state','!=','draft')]}" />
12 <field name='coupon_code'
13 attrs="{'readonly':[('state','!=','draft')]}" />
14 </xpath>12 </xpath>
15 </field>13 </field>
16 </record>14 </record>
@@ -20,13 +18,12 @@
20 <field name="type">form</field>18 <field name="type">form</field>
21 <field name="inherit_id" ref="sale.view_order_form" />19 <field name="inherit_id" ref="sale.view_order_form" />
22 <field name="arch" type="xml">20 <field name="arch" type="xml">
23 <xpath21 <xpath expr="/form/notebook/page[@string='Sales Order']/group/button[@name='order_confirm']" position="after">
24 expr="/form/notebook/page[@string='Sale Order']/group/button[@name='order_confirm']"22 <group colspan="4" col="13">
25 position="before">23 <button name="apply_promotions" type="object" states="draft" string="Apply Promotions" />
26 <button name="apply_promotions" type="object"24 </group>
27 states="draft" string="Apply Promotions" />
28 </xpath>25 </xpath>
29 </field>26 </field>
30 </record>27 </record>
31 </data>28 </data>
32</openerp>
33\ No newline at end of file29\ No newline at end of file
30</openerp>

Subscribers

People subscribed via source and target branches