Merge lp:~matjaz-6/openerpsl/openerpsl_02_17 into lp:openerpsl/7.0

Proposed by Matjaz Kalic
Status: Merged
Merged at revision: 353
Proposed branch: lp:~matjaz-6/openerpsl/openerpsl_02_17
Merge into: lp:openerpsl/7.0
Diff against target: 268 lines (+155/-17)
7 files modified
m_web_api/static/src/js/core.js (+5/-2)
mrp_procurement_qty/bakery_production.py (+9/-3)
mrp_procurement_qty/bakery_production_view.xml (+16/-0)
mrp_procurement_qty/i18n/en_US.po (+36/-0)
mrp_procurement_qty/i18n/mrp_procurement_qty.pot (+36/-0)
mrp_procurement_qty/i18n/sl.po (+37/-1)
mrp_procurement_qty/mrp_production.py (+16/-11)
To merge this branch: bzr merge lp:~matjaz-6/openerpsl/openerpsl_02_17
Reviewer Review Type Date Requested Status
Mentis Pending
Review via email: mp+209038@code.launchpad.net

Description of the change

[FIX] mrp_procurement_qty/mrp_production.py (get product name) + show it on tablet
[FIX] mrp_procurement_qty/bakery_production.py (translation, filters, check if it was started today)

To post a comment you must log in.
353. By Dušan Laznik (Mentis)

[FIX] mrp_procurement_qty/mrp_production.py (get product name) + show it on tablet
[FIX] mrp_procurement_qty/bakery_production.py (translation, filters, check if it was started today)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'm_web_api/static/src/js/core.js'
2--- m_web_api/static/src/js/core.js 2014-02-27 18:33:07 +0000
3+++ m_web_api/static/src/js/core.js 2014-03-03 10:53:58 +0000
4@@ -365,7 +365,7 @@
5 //------------------------------------------------//
6
7 //Prikaz podjetja in verzije
8- $("#podjetje").text('Podjetje: ' + document.getElementById("s1").options[so].text + ', Verzija: v.02.27');
9+ $("#podjetje").text('Podjetje: ' + document.getElementById("s1").options[so].text + ', Verzija: v.03.03');
10
11 openERP_user = '';
12 if (document.getElementById("u").value == 'Testo-Polizdelki'){
13@@ -896,7 +896,10 @@
14 //results[i].product_code = '';
15 results[i].product_qty_onstock=results[i].product_on_bom_qty_stock;
16 results[i].product_on_bom_qty_ready = results[i].product_on_bom_qty_O_ready;
17- product_name = results[i].product_is_product;
18+ //product_name = results[i].product_is_product;
19+
20+ //alert(results[i].product_is_product);
21+ product_name = results[i].product_is_product.toString().substring(results[i].product_is_product.toString().indexOf(',')+1);
22 }
23
24 product_code = product_name.substring(0,product_name.indexOf(' '));
25
26=== modified file 'mrp_procurement_qty/bakery_production.py'
27--- mrp_procurement_qty/bakery_production.py 2014-02-25 17:15:39 +0000
28+++ mrp_procurement_qty/bakery_production.py 2014-03-03 10:53:58 +0000
29@@ -45,6 +45,7 @@
30 'date_start': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
31 'running': 1,
32 }
33+ _order = 'id desc'
34
35 def process_start(self, cr, uid, process, context=None):
36 res = self.create(cr, uid,
37@@ -106,10 +107,14 @@
38 running_id = self.search(cr, uid, [('process','=',process)], order='id desc', limit=1, context=context)
39 for line in self.browse(cr, uid, running_id):
40 if line.running:
41- d_date = datetime.strptime(line.date_start, ('%Y-%m-%d %H:%M:%S'))
42- d_date = d_date + timedelta(hours=1)
43+ #Preverimo ali je bil tekoci proces zagnan vceraj
44+ d_start = datetime.strptime(line.date_start, ('%Y-%m-%d %H:%M:%S')).date()
45+ d_now = datetime.now().date()
46+ if d_start == d_now:
47+ d_date = datetime.strptime(line.date_start, ('%Y-%m-%d %H:%M:%S'))
48+ d_date = d_date + timedelta(hours=1)
49
50- res = 'Process started by %s, on %s' %(line.user_id.name, d_date)
51+ res = 'Process started by %s, on %s' %(line.user_id.name, d_date)
52 return res
53
54 bakery_process()
55@@ -132,6 +137,7 @@
56 'date_start': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
57 'running': 1,
58 }
59+ _order = 'id desc'
60
61 def production_start(self, cr, uid, context=None):
62 res = self.create(cr, uid, {})
63
64=== modified file 'mrp_procurement_qty/bakery_production_view.xml'
65--- mrp_procurement_qty/bakery_production_view.xml 2014-02-25 17:15:39 +0000
66+++ mrp_procurement_qty/bakery_production_view.xml 2014-03-03 10:53:58 +0000
67@@ -93,6 +93,22 @@
68 </field>
69 </record>
70
71+ <record id="search_bakery_process" model="ir.ui.view">
72+ <field name="name">bakery.process.search</field>
73+ <field name="model">bakery.process</field>
74+ <field eval="50" name="priority"/>
75+ <field name="arch" type="xml">
76+ <search string="Stock Moves">
77+ <filter string="Confirm sale orders" name="sale" domain="[('process','=',10)]" />
78+ <filter string="Procurement" name="sale" domain="[('process','=',20)]" />
79+ <filter string="Procurement with OP" name="sale" domain="[('process','=',30)]" />
80+ <filter string="Deliver delivery orders" name="sale" domain="[('process','=',40)]" />
81+ <filter string="Produce manufacturing orders" name="sale" domain="[('process','=',50)]" />
82+ <filter string="Stock moved" name="sale" domain="[('process','=',60)]" />
83+ </search>
84+ </field>
85+ </record>
86+
87 <record id="action_bakery_process" model="ir.actions.act_window">
88 <field name="name">Bakery Process</field>
89 <field name="type">ir.actions.act_window</field>
90
91=== modified file 'mrp_procurement_qty/i18n/en_US.po'
92--- mrp_procurement_qty/i18n/en_US.po 2014-02-17 17:10:14 +0000
93+++ mrp_procurement_qty/i18n/en_US.po 2014-03-03 10:53:58 +0000
94@@ -474,3 +474,39 @@
95 #: view:procurement.order.orderpoint.run.wizard:0
96 msgid "Run Orderpoint Scheduler multiple times"
97 msgstr ""
98+
99+
100+
101+
102+
103+#. module: mrp_procurement_qty
104+#: selection:bakery.process,process:0
105+msgid "Confirm sale orders"
106+msgstr ""
107+
108+#. module: mrp_procurement_qty
109+#: selection:bakery.process,process:0
110+msgid "Procurement"
111+msgstr ""
112+
113+#. module: mrp_procurement_qty
114+#: selection:bakery.process,process:0
115+msgid "Procurement with OP"
116+msgstr ""
117+
118+#. module: mrp_procurement_qty
119+#: selection:bakery.process,process:0
120+msgid "Deliver delivery orders"
121+msgstr ""
122+
123+#. module: mrp_procurement_qty
124+#: selection:bakery.process,process:0
125+msgid "Produce manufacturing orders"
126+msgstr ""
127+
128+#. module: mrp_procurement_qty
129+#: selection:bakery.process,process:0
130+#: field:bakery.production,stock_moved:0
131+#: field:procurement.order.move.stock.wizard,status_move:0
132+msgid "Stock moved"
133+msgstr ""
134
135=== modified file 'mrp_procurement_qty/i18n/mrp_procurement_qty.pot'
136--- mrp_procurement_qty/i18n/mrp_procurement_qty.pot 2014-02-17 17:10:14 +0000
137+++ mrp_procurement_qty/i18n/mrp_procurement_qty.pot 2014-03-03 10:53:58 +0000
138@@ -473,3 +473,39 @@
139 #: view:procurement.order.orderpoint.run.wizard:0
140 msgid "Run Orderpoint Scheduler multiple times"
141 msgstr ""
142+
143+
144+
145+
146+
147+#. module: mrp_procurement_qty
148+#: selection:bakery.process,process:0
149+msgid "Confirm sale orders"
150+msgstr ""
151+
152+#. module: mrp_procurement_qty
153+#: selection:bakery.process,process:0
154+msgid "Procurement"
155+msgstr ""
156+
157+#. module: mrp_procurement_qty
158+#: selection:bakery.process,process:0
159+msgid "Procurement with OP"
160+msgstr ""
161+
162+#. module: mrp_procurement_qty
163+#: selection:bakery.process,process:0
164+msgid "Deliver delivery orders"
165+msgstr ""
166+
167+#. module: mrp_procurement_qty
168+#: selection:bakery.process,process:0
169+msgid "Produce manufacturing orders"
170+msgstr ""
171+
172+#. module: mrp_procurement_qty
173+#: selection:bakery.process,process:0
174+#: field:bakery.production,stock_moved:0
175+#: field:procurement.order.move.stock.wizard,status_move:0
176+msgid "Stock moved"
177+msgstr ""
178
179=== modified file 'mrp_procurement_qty/i18n/sl.po'
180--- mrp_procurement_qty/i18n/sl.po 2014-02-17 17:10:14 +0000
181+++ mrp_procurement_qty/i18n/sl.po 2014-03-03 10:53:58 +0000
182@@ -443,7 +443,7 @@
183 #. module: mrp_procurement_qty
184 #: field:bakery.production,manufactury_done:0
185 msgid "Manufactury done"
186-msgstr "Proizvodnja zaključena"
187+msgstr "Delovni nal. zaključeni"
188
189
190 #. module: mrp_procurement_qty
191@@ -474,3 +474,39 @@
192 #: view:procurement.order.orderpoint.run.wizard:0
193 msgid "Run Orderpoint Scheduler multiple times"
194 msgstr "Lansiranje proizvodnje iz zaloge"
195+
196+
197+
198+
199+
200+#. module: mrp_procurement_qty
201+#: selection:bakery.process,process:0
202+msgid "Confirm sale orders"
203+msgstr "Prodaja potrjena"
204+
205+#. module: mrp_procurement_qty
206+#: selection:bakery.process,process:0
207+msgid "Procurement"
208+msgstr "Proizvodnja lansirana"
209+
210+#. module: mrp_procurement_qty
211+#: selection:bakery.process,process:0
212+msgid "Procurement with OP"
213+msgstr "Proizvodnja lans. iz zaloge"
214+
215+#. module: mrp_procurement_qty
216+#: selection:bakery.process,process:0
217+msgid "Deliver delivery orders"
218+msgstr "Dobava opravljena"
219+
220+#. module: mrp_procurement_qty
221+#: selection:bakery.process,process:0
222+msgid "Produce manufacturing orders"
223+msgstr "Delovni nal. zaključeni"
224+
225+#. module: mrp_procurement_qty
226+#: selection:bakery.process,process:0
227+#: field:bakery.production,stock_moved:0
228+#: field:procurement.order.move.stock.wizard,status_move:0
229+msgid "Stock moved"
230+msgstr "Zaloga umaknjena"
231
232=== modified file 'mrp_procurement_qty/mrp_production.py'
233--- mrp_procurement_qty/mrp_production.py 2014-02-27 11:43:23 +0000
234+++ mrp_procurement_qty/mrp_production.py 2014-03-03 10:53:58 +0000
235@@ -176,17 +176,22 @@
236
237 if order.product_id.product_tmpl_id.categ_id.parent_id.id == 38:
238 if order.product_with_bom_relation:
239- tmp_name = '['
240- if order.product_with_bom_relation.default_code:
241- tmp_name = tmp_name + order.product_with_bom_relation.default_code
242-
243- if order.product_with_bom_relation.name_template:
244- tmp_name = tmp_name + '] >'+ order.product_with_bom_relation.name_template
245-
246- if order.product_with_bom_relation.variants:
247- tmp_name = tmp_name + ' - ' + order.product_with_bom_relation.variants
248-
249- res_tmp['product_is_product'] = tmp_name
250+ #_____________________________________
251+
252+ product_obj = self.pool.get('product.product')
253+ pro_name = product_obj.name_get(cr, uid, [order.product_with_bom_relation.id], context)
254+
255+# tmp_name = '['
256+# if order.product_with_bom_relation.default_code:
257+# tmp_name = tmp_name + order.product_with_bom_relation.default_code
258+#
259+# if order.product_with_bom_relation.name_template:
260+# tmp_name = tmp_name + '] >'+ order.product_with_bom_relation.name_template
261+#
262+# if order.product_with_bom_relation.variants:
263+# tmp_name = tmp_name + ' - ' + order.product_with_bom_relation.variants
264+
265+ res_tmp['product_is_product'] = pro_name
266 else:
267 res_tmp['product_is_product'] = '[' + order.product_id.default_code + '] <'+ order.product_id.name_template + '[Osnova] - ' + order.product_id.variants
268 else:

Subscribers

People subscribed via source and target branches