Merge lp:~unifield-team/unifield-server/us-966 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 3778
Proposed branch: lp:~unifield-team/unifield-server/us-966
Merge into: lp:unifield-server
Diff against target: 4098 lines (+1824/-654) (has conflicts)
63 files modified
bin/addons/account/account_move_line.py (+6/-15)
bin/addons/account/report/account_balance_sheet.py (+7/-9)
bin/addons/account/report/account_balance_sheet_xls.mako (+4/-4)
bin/addons/account/report/account_general_ledger.py (+8/-38)
bin/addons/account/report/account_general_ledger_landscape.rml (+5/-11)
bin/addons/account/report/account_general_ledger_xls.mako (+21/-27)
bin/addons/account/report/account_profit_loss.py (+2/-4)
bin/addons/account/report/common_report_header.py (+0/-15)
bin/addons/account/wizard/account_report_balance_sheet_view.xml (+1/-1)
bin/addons/account/wizard/account_report_general_ledger.py (+3/-1)
bin/addons/account/wizard/account_report_profit_loss_view.xml (+1/-1)
bin/addons/account_mcdb/account_view.xml (+4/-4)
bin/addons/analytic_distribution/analytic_line.py (+1/-9)
bin/addons/analytic_override/analytic_line.py (+3/-6)
bin/addons/delivery_mechanism/delivery_mechanism.py (+1/-1)
bin/addons/finance/account_drill.py (+43/-33)
bin/addons/import_data/import_data.py (+78/-53)
bin/addons/mission_stock/mission_stock.py (+36/-49)
bin/addons/msf_accrual/msf_accrual_line.py (+8/-6)
bin/addons/msf_accrual/wizard/wizard_accrual_validation.py (+0/-2)
bin/addons/msf_cross_docking/cross_docking.py (+2/-6)
bin/addons/msf_doc_import/account.py (+0/-8)
bin/addons/msf_doc_import/view/internal_request_import_line_view.xml (+1/-3)
bin/addons/msf_doc_import/view/purchase_order_import_line_view.xml (+0/-1)
bin/addons/msf_doc_import/view/sale_order_import_lines_view.xml (+1/-2)
bin/addons/msf_doc_import/wizard/wiz_common_import.py (+1/-1)
bin/addons/msf_doc_import/wizard/wizard_import_ir_line.py (+1/-1)
bin/addons/msf_homere_interface/hr.py (+15/-0)
bin/addons/msf_homere_interface/wizard/hr_expat_import.py (+22/-6)
bin/addons/msf_instance/add_instance.py (+21/-0)
bin/addons/msf_outgoing/msf_outgoing.py (+5/-64)
bin/addons/msf_profile/data/patches.xml (+3/-0)
bin/addons/msf_profile/i18n/fr_MF.po (+1/-15)
bin/addons/msf_profile/msf_profile.py (+3/-9)
bin/addons/msf_sync_data_server/__openerp__.py (+2/-1)
bin/addons/msf_sync_data_server/data/automated_import_sync_groups.xml (+18/-0)
bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv (+15/-15)
bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+12/-1)
bin/addons/msf_tools/__init__.py (+4/-1)
bin/addons/msf_tools/__openerp__.py (+8/-1)
bin/addons/msf_tools/automated_import.py (+513/-0)
bin/addons/msf_tools/automated_import_data.xml (+102/-0)
bin/addons/msf_tools/automated_import_function.py (+107/-0)
bin/addons/msf_tools/automated_import_job.py (+366/-0)
bin/addons/msf_tools/msf_tools.py (+1/-4)
bin/addons/msf_tools/views/automated_import_function_view.xml (+58/-0)
bin/addons/msf_tools/views/automated_import_job_view.xml (+120/-0)
bin/addons/msf_tools/views/automated_import_view.xml (+77/-0)
bin/addons/procurement_request/procurement_request.py (+2/-7)
bin/addons/purchase_override/purchase.py (+7/-14)
bin/addons/register_accounting/account_move_line.py (+1/-1)
bin/addons/sale_override/sale.py (+11/-60)
bin/addons/sourcing/procurement_order.py (+3/-9)
bin/addons/sourcing/sale_order_line.py (+1/-7)
bin/addons/specific_rules/specific_rules.py (+7/-7)
bin/addons/stock/stock.py (+2/-12)
bin/addons/stock_override/stock.py (+16/-48)
bin/addons/stock_override/stock_view.xml (+1/-1)
bin/addons/sync_client/sync_client.py (+0/-1)
bin/addons/tender_flow/tender_flow.py (+16/-50)
bin/osv/orm.py (+43/-8)
bin/release.py (+2/-1)
bin/unifield-version.txt (+1/-0)
Text conflict in bin/addons/finance/account_drill.py
Text conflict in bin/addons/mission_stock/mission_stock.py
Text conflict in bin/addons/msf_profile/data/patches.xml
Text conflict in bin/addons/msf_profile/msf_profile.py
Text conflict in bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-966
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+295556@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/account/account_move_line.py'
--- bin/addons/account/account_move_line.py 2016-04-13 07:43:33 +0000
+++ bin/addons/account/account_move_line.py 2016-05-24 07:58:03 +0000
@@ -1240,32 +1240,24 @@
1240 move_obj.write(cr, uid, [line.move_id.id], {'date': todo_date}, context=context)1240 move_obj.write(cr, uid, [line.move_id.id], {'date': todo_date}, context=context)
1241 return result1241 return result
12421242
1243 def _hook_check_period_state(self, cr, uid, result=False, context=None, raise_hq_closed=True, *args, **kargs):1243 def _hook_check_period_state(self, cr, uid, result=False, context=None, *args, **kargs):
1244 """1244 """
1245 Check period state1245 Check period state
1246 """1246 """
1247 if not result:1247 if not result:
1248 return False1248 return False
1249 res = True
1250 for (state,) in result:1249 for (state,) in result:
1251 if state == 'done':1250 if state == 'done':
1252 if raise_hq_closed:1251 raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.'))
1253 raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.'))
1254 res = False
1255 break
1256 return res
12571252
1258 def _update_journal_check(self, cr, uid, journal_id, period_id,1253 def _update_journal_check(self, cr, uid, journal_id, period_id, context=None):
1259 context=None, raise_hq_closed=True):
1260 journal_obj = self.pool.get('account.journal')1254 journal_obj = self.pool.get('account.journal')
1261 period_obj = self.pool.get('account.period')1255 period_obj = self.pool.get('account.period')
1262 jour_period_obj = self.pool.get('account.journal.period')1256 jour_period_obj = self.pool.get('account.journal.period')
1263 cr.execute('SELECT state FROM account_journal_period WHERE journal_id = %s AND period_id = %s', (journal_id, period_id))1257 cr.execute('SELECT state FROM account_journal_period WHERE journal_id = %s AND period_id = %s', (journal_id, period_id))
1264 result = cr.fetchall()1258 result = cr.fetchall()
1265 if result:1259 self._hook_check_period_state(cr, uid, result, context=context)
1266 res = self._hook_check_period_state(cr, uid, result,1260 if not result:
1267 context=context, raise_hq_closed=raise_hq_closed)
1268 else:
1269 journal = journal_obj.browse(cr, uid, journal_id, context=context)1261 journal = journal_obj.browse(cr, uid, journal_id, context=context)
1270 period = period_obj.browse(cr, uid, period_id, context=context)1262 period = period_obj.browse(cr, uid, period_id, context=context)
1271 jour_period_obj.create(cr, uid, {1263 jour_period_obj.create(cr, uid, {
@@ -1273,8 +1265,7 @@
1273 'journal_id': journal.id,1265 'journal_id': journal.id,
1274 'period_id': period.id1266 'period_id': period.id
1275 })1267 })
1276 res = True1268 return True
1277 return res
12781269
1279 def _update_check(self, cr, uid, ids, context=None):1270 def _update_check(self, cr, uid, ids, context=None):
1280 done = {}1271 done = {}
12811272
=== modified file 'bin/addons/account/report/account_balance_sheet.py'
--- bin/addons/account/report/account_balance_sheet.py 2016-05-19 07:21:22 +0000
+++ bin/addons/account/report/account_balance_sheet.py 2016-05-24 07:58:03 +0000
@@ -77,13 +77,13 @@
77 return res77 return res
7878
79 def sum_dr(self):79 def sum_dr(self):
80 if self.res_bl['type'] == _('Net Loss'):80 if self.res_bl['type'] == _('Net Profit'):
81 self.result_sum_dr += self.res_bl['balance']81 self.result_sum_dr += self.res_bl['balance']*-1
82 return self.result_sum_dr82 return self.result_sum_dr
8383
84 def sum_cr(self):84 def sum_cr(self):
85 if self.res_bl['type'] == _('Net Profit'):85 if self.res_bl['type'] == _('Net Loss'):
86 self.result_sum_dr += self.res_bl['balance']86 self.result_sum_cr += self.res_bl['balance']
87 return self.result_sum_cr87 return self.result_sum_cr
8888
89 def get_pl_balance(self):89 def get_pl_balance(self):
@@ -137,7 +137,7 @@
137 'code': self.res_bl['type'],137 'code': self.res_bl['type'],
138 'name': self.res_bl['type'],138 'name': self.res_bl['type'],
139 'level': False,139 'level': False,
140 'balance': self.res_bl['balance'],140 'balance':self.res_bl['balance'],
141 }141 }
142 for typ in types:142 for typ in types:
143 accounts_temp = []143 accounts_temp = []
@@ -331,11 +331,9 @@
331 if data['form'].get('instance_ids', False):331 if data['form'].get('instance_ids', False):
332 self.cr.execute('select code from msf_instance where id IN %s',332 self.cr.execute('select code from msf_instance where id IN %s',
333 (tuple(data['form']['instance_ids']),))333 (tuple(data['form']['instance_ids']),))
334 instances = [x for x, in self.cr.fetchall()]
335 else:334 else:
336 # US-1166: mission only instances if none provided335 self.cr.execute('select code from msf_instance')
337 instances = self._get_instances(get_code=True,336 instances = [x for x, in self.cr.fetchall()]
338 mission_filter=True)
339 return ', '.join(instances)337 return ', '.join(instances)
340338
341report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',339report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',
342340
=== modified file 'bin/addons/account/report/account_balance_sheet_xls.mako'
--- bin/addons/account/report/account_balance_sheet_xls.mako 2016-04-07 15:55:20 +0000
+++ bin/addons/account/report/account_balance_sheet_xls.mako 2016-05-24 07:58:03 +0000
@@ -162,24 +162,24 @@
162%>162%>
163<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('code1', False) or '')|x}</Data></Cell>163<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('code1', False) or '')|x}</Data></Cell>
164<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('name1', False) or '')|x}</Data></Cell>164<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('name1', False) or '')|x}</Data></Cell>
165<Cell ss:StyleID="ssAccountLineNumber${strong}"><Data ss:Type="Number">${(o.get('balance1', False) or 0.0)}</Data></Cell>165<Cell ss:StyleID="ssAccountLineNumber${strong}"><Data ss:Type="Number">${(abs(o.get('balance1', False)) or 0.0)}</Data></Cell>
166## liabilities166## liabilities
167<%167<%
168strong = o.get('level', False) and o['level'] < 4 and 'Strong' or ''168strong = o.get('level', False) and o['level'] < 4 and 'Strong' or ''
169%>169%>
170<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('code', False) or '')|x}</Data></Cell>170<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('code', False) or '')|x}</Data></Cell>
171<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('name', False) or '')|x}</Data></Cell>171<Cell ss:StyleID="ssAccountLine${strong}"><Data ss:Type="String">${(o.get('name', False) or '')|x}</Data></Cell>
172<Cell ss:StyleID="ssAccountLineNumber${strong}"><Data ss:Type="Number">${(o.get('balance', False) or 0.0)}</Data></Cell>172<Cell ss:StyleID="ssAccountLineNumber${strong}"><Data ss:Type="Number">${(abs(o.get('balance', False)) or 0.0)}</Data></Cell>
173</Row>173</Row>
174% endfor174% endfor
175175
176<Row>176<Row>
177<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String">Balance ${company.currency_id.symbol or ''|x}</Data></Cell>177<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String">Balance ${company.currency_id.symbol or ''|x}</Data></Cell>
178<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String"></Data></Cell>178<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String"></Data></Cell>
179<Cell ss:StyleID="ssAccountLineNumberStrong"><Data ss:Type="Number">${sum_cr()}</Data></Cell>179<Cell ss:StyleID="ssAccountLineNumberStrong"><Data ss:Type="Number">${abs(sum_cr())}</Data></Cell>
180<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String">Balance ${company.currency_id.symbol or ''|x}</Data></Cell>180<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String">Balance ${company.currency_id.symbol or ''|x}</Data></Cell>
181<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String"></Data></Cell>181<Cell ss:StyleID="ssAccountLineStrong"><Data ss:Type="String"></Data></Cell>
182<Cell ss:StyleID="ssAccountLineNumberStrong"><Data ss:Type="Number">${sum_dr()}</Data></Cell>182<Cell ss:StyleID="ssAccountLineNumberStrong"><Data ss:Type="Number">${abs(sum_dr())}</Data></Cell>
183</Row>183</Row>
184184
185</Table>185</Table>
186186
=== modified file 'bin/addons/account/report/account_general_ledger.py'
--- bin/addons/account/report/account_general_ledger.py 2016-05-11 05:57:29 +0000
+++ bin/addons/account/report/account_general_ledger.py 2016-05-24 07:58:03 +0000
@@ -66,18 +66,6 @@
66 'show_period_0': 1,66 'show_period_0': 1,
67 'state_agnostic': 1,67 'state_agnostic': 1,
68 })68 })
69 # US-1197/4: IB entries for yearly closing always in 1th Jan
70 # => get rid of regular period/dates filters for _query_get
71 # => if self.init_balance is True, note that filtering is OK
72 # validated at wizard report level
73 ib_local_context.update({
74 'date_from': False,
75 'date_to': False,
76 'date_fromto_docdate': False,
77 'period_from': False,
78 'period_to': False,
79 'periods': False,
80 })
81 self.init_query = obj_move._query_get(self.cr, self.uid, obj='l',69 self.init_query = obj_move._query_get(self.cr, self.uid, obj='l',
82 context=ib_local_context)70 context=ib_local_context)
83 else:71 else:
@@ -237,18 +225,12 @@
237225
238 def _show_node_in_report(self, node):226 def _show_node_in_report(self, node):
239 res = True227 res = True
240 if node.parent is None:228 if self.account_ids or self.unreconciled_filter:
241 return res # always show root account MSF229 # hide if zero bal and any by account or unreconciled filter on
242 if self.account_ids or self.account_report_types \230 bal = node.data.get('*', {}).get('debit', 0.) \
243 or self.unreconciled_filter:231 - node.data.get('*', {}).get('credit', 0.)
244 res = not node.skip232 if bal == 0.:
245 if res:233 res = False
246 # hide if zero bal and any by account or unreconciled filter on
247 bal = node.data.get('*', {}).get('debit', 0.) \
248 - node.data.get('*', {}).get('credit', 0.)
249 if bal == 0.:
250 res = False
251
252 return res234 return res
253235
254 def _get_journals_str(self, data):236 def _get_journals_str(self, data):
@@ -410,7 +392,6 @@
410 line = self.get_start_period(data) + ' - ' + self.get_end_period(data)392 line = self.get_start_period(data) + ' - ' + self.get_end_period(data)
411 if line:393 if line:
412 infos.append(line)394 infos.append(line)
413
414 return infos and ", \n".join(infos) or _('No Filter')395 return infos and ", \n".join(infos) or _('No Filter')
415 396
416 def _get_line_debit(self, line, booking=False):397 def _get_line_debit(self, line, booking=False):
@@ -455,11 +436,9 @@
455 if data['form'].get('instance_ids', False):436 if data['form'].get('instance_ids', False):
456 self.cr.execute('select code from msf_instance where id IN %s',437 self.cr.execute('select code from msf_instance where id IN %s',
457 (tuple(data['form']['instance_ids']),))438 (tuple(data['form']['instance_ids']),))
458 instances = [x for x, in self.cr.fetchall()]
459 else:439 else:
460 # US-1166: mission only instances if none provided440 self.cr.execute('select code from msf_instance')
461 instances = self._get_instances(get_code=True,441 instances = [x for x, in self.cr.fetchall()]
462 mission_filter=True)
463 return ', '.join(instances)442 return ', '.join(instances)
464443
465 # internal filter functions444 # internal filter functions
@@ -497,15 +476,6 @@
497 display_account = _('With balance is not equal to 0')476 display_account = _('With balance is not equal to 0')
498 info_data.append((_('Accounts'), display_account, ))477 info_data.append((_('Accounts'), display_account, ))
499478
500 account_ids = list(set(self._get_data_form(data, 'account_ids')))
501 if account_ids:
502 # US-1197/2: display filtered accounts
503 account_obj = self.pool.get('account.account')
504 info_data.append((_('Selected Accounts'), ', '.join(
505 [ a.code for a in account_obj.browse(
506 self.cr, self.uid, account_ids) \
507 if a.type != 'view' ], )))
508
509 res = [ "%s: %s" % (label, val, ) for label, val in info_data ]479 res = [ "%s: %s" % (label, val, ) for label, val in info_data ]
510 return ', \n'.join(res)480 return ', \n'.join(res)
511481
512482
=== modified file 'bin/addons/account/report/account_general_ledger_landscape.rml'
--- bin/addons/account/report/account_general_ledger_landscape.rml 2016-04-13 15:35:05 +0000
+++ bin/addons/account/report/account_general_ledger_landscape.rml 2016-05-24 07:58:03 +0000
@@ -248,7 +248,7 @@
248 [[ get_show_move_lines() or removeParentNode('blockTable') ]]248 [[ get_show_move_lines() or removeParentNode('blockTable') ]]
249 <tr>249 <tr>
250 <td>250 <td>
251 <para style="terp_tblheader_Details">Account/Entry Seq</para>251 <para style="terp_tblheader_Details">Entry Seq</para>
252 </td>252 </td>
253 <td>253 <td>
254 <para style="terp_tblheader_Details">Posting Date</para>254 <para style="terp_tblheader_Details">Posting Date</para>
@@ -330,17 +330,14 @@
330330
331 <section>331 <section>
332 <para style="terp_default_8">[[ repeatIn(lines(o, initial_balance_mode=True), 'line') ]]</para>332 <para style="terp_default_8">[[ repeatIn(lines(o, initial_balance_mode=True), 'line') ]]</para>
333 <blockTable colWidths="40.0,246.0,60.0,110.0,110.0,110.0,110.0" style="Table9">333 <blockTable colWidths="286.0,60.0,110.0,110.0,110.0,110.0" style="Table9">
334 [[ show_node_in_report(o) or removeParentNode('blockTable') ]]334 [[ show_node_in_report(o) or removeParentNode('blockTable') ]]
335 <tr>335 <tr>
336 <td>336 <td>
337 <para style="terp_default_9_Right">[[ o.code or '' ]]</para>
338 </td>
339 <td>
340 <para style="terp_default_9_Right">[[ line['move'] or '' ]]</para>337 <para style="terp_default_9_Right">[[ line['move'] or '' ]]</para>
341 </td>338 </td>
342 <td>339 <td>
343 <para style="terp_default_9_Right">[[ line['currency_name'] or '' ]]</para>340 <para style="terp_def114.0,80.0,92.0,60.0,110.0,110.0,110.0,110.0ault_9_Right">[[ line['currency_name'] or '' ]]</para>
344 </td>341 </td>
345 <td>342 <td>
346 <para style="terp_default_9_Right">[[ formatLang(get_line_debit(line, booking=True), digits=get_digits(dp='Account')) ]]</para>343 <para style="terp_default_9_Right">[[ formatLang(get_line_debit(line, booking=True), digits=get_digits(dp='Account')) ]]</para>
@@ -393,14 +390,11 @@
393390
394 <section>391 <section>
395 <para style="terp_default_8">[[ repeatIn(o.get_currencies(), 'ccy') ]]</para>392 <para style="terp_default_8">[[ repeatIn(o.get_currencies(), 'ccy') ]]</para>
396 <blockTable colWidths="40.0,246.0,60.0,110.0,110.0,110.0,110.0" style="Table8_subtotal_ccy">393 <blockTable colWidths="286.0,60.0,110.0,110.0,110.0,110.0" style="Table8_subtotal_ccy">
397 [[ show_node_in_report(o) or removeParentNode('blockTable') ]]394 [[ show_node_in_report(o) or removeParentNode('blockTable') ]]
398 <tr>395 <tr>
399 <td>396 <td>
400 <para style="terp_default_9_Right">[[ o.code or '' ]]</para>397 <para style="terp_default_9_Right">[[ o.code ]]</para>
401 </td>
402 <td>
403 <para style="terp_default_9_Right">Sub Total</para>
404 </td>398 </td>
405 <td>399 <td>
406 <para style="terp_default_9_Right">[[ ccy ]]</para>400 <para style="terp_default_9_Right">[[ ccy ]]</para>
407401
=== modified file 'bin/addons/account/report/account_general_ledger_xls.mako'
--- bin/addons/account/report/account_general_ledger_xls.mako 2016-04-13 15:35:05 +0000
+++ bin/addons/account/report/account_general_ledger_xls.mako 2016-05-24 07:58:03 +0000
@@ -187,15 +187,21 @@
187 display_account = (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0'187 display_account = (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0'
188%>188%>
189<Table x:FullColumns="1" x:FullRows="1">189<Table x:FullColumns="1" x:FullRows="1">
190<Column ss:AutoFitWidth="1" ss:Width="50" />190<Column ss:AutoFitWidth="1" ss:Width="64" />
191<Column ss:AutoFitWidth="1" ss:Width="80" />191<Column ss:AutoFitWidth="1" ss:Width="120" />
192<Column ss:AutoFitWidth="1" ss:Width="55" />192<Column ss:AutoFitWidth="1" ss:Width="64" />
193<Column ss:AutoFitWidth="1" ss:Width="80" />193% if get_show_move_lines():
194<Column ss:AutoFitWidth="1" ss:Width="50" />194<Column ss:AutoFitWidth="1" ss:Width="300" />
195<Column ss:Width="90" />195% endif
196<Column ss:Width="90" />196% if not get_show_move_lines():
197<Column ss:Width="90" />197<Column ss:AutoFitWidth="1" ss:Width="150" />
198<Column ss:Width="90" />198% endif
199<Column ss:AutoFitWidth="1" ss:Width="50" />
200<Column ss:AutoFitWidth="1" ss:Width="64" />
201<Column ss:AutoFitWidth="1" ss:Width="64" />
202<Column ss:AutoFitWidth="1" ss:Width="64" />
203<Column ss:AutoFitWidth="1" ss:Width="64" />
204<Column ss:AutoFitWidth="1" ss:Width="64" />
199<Row>205<Row>
200<Cell ss:StyleID="ssH"><Data ss:Type="String">${header_company_or_chart_of_account}</Data></Cell>206<Cell ss:StyleID="ssH"><Data ss:Type="String">${header_company_or_chart_of_account}</Data></Cell>
201<Cell ss:StyleID="ssH"><Data ss:Type="String">Fiscal Year</Data></Cell>207<Cell ss:StyleID="ssH"><Data ss:Type="String">Fiscal Year</Data></Cell>
@@ -240,14 +246,13 @@
240</Row>246</Row>
241<Row>247<Row>
242% if get_show_move_lines():248% if get_show_move_lines():
243<Cell ss:StyleID="ssH"><Data ss:Type="String">Account</Data></Cell>249<Cell ss:StyleID="ssH" ss:MergeAcross="1"><Data ss:Type="String">Entry Seq</Data></Cell>
244<Cell ss:StyleID="ssH"><Data ss:Type="String">Entry Seq</Data></Cell>
245<Cell ss:StyleID="ssH"><Data ss:Type="String">Posting Date</Data></Cell>250<Cell ss:StyleID="ssH"><Data ss:Type="String">Posting Date</Data></Cell>
246<Cell ss:StyleID="ssH"><Data ss:Type="String">Description</Data></Cell>251<Cell ss:StyleID="ssH"><Data ss:Type="String">Description</Data></Cell>
247<Cell ss:StyleID="ssH"><Data ss:Type="String">Currency</Data></Cell>252<Cell ss:StyleID="ssH"><Data ss:Type="String">Currency</Data></Cell>
248% endif253% endif
249% if not get_show_move_lines():254% if not get_show_move_lines():
250<Cell ss:StyleID="ssH"><Data ss:Type="String">Account</Data></Cell>255<Cell ss:StyleID="ssH"><Data ss:Type="String">Account / CCY</Data></Cell>
251<Cell ss:StyleID="ssH" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>256<Cell ss:StyleID="ssH" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
252<Cell ss:StyleID="ssH"><Data ss:Type="String">Currency</Data></Cell>257<Cell ss:StyleID="ssH"><Data ss:Type="String">Currency</Data></Cell>
253% endif258% endif
@@ -296,10 +301,7 @@
296301
297% for line in lines(o, initial_balance_mode=True):302% for line in lines(o, initial_balance_mode=True):
298<Row>303<Row>
299<Cell ss:StyleID="ssBorder${ccy_sub_total_style_suffix}${ccy_sub_total_style_right_suffix}">304<Cell ss:StyleID="ssBorder${ccy_sub_total_style_suffix}${ccy_sub_total_style_right_suffix}" ss:MergeAcross="3">
300 <Data ss:Type="String">${(o.code or '')|x}</Data>
301</Cell>
302<Cell ss:StyleID="ssBorder${ccy_sub_total_style_suffix}${ccy_sub_total_style_right_suffix}" ss:MergeAcross="2">
303 <Data ss:Type="String">${(line['move'] or '' or '')|x}</Data>305 <Data ss:Type="String">${(line['move'] or '' or '')|x}</Data>
304</Cell>306</Cell>
305<Cell ss:StyleID="ssAccountLine${ccy_sub_total_style_suffix}">307<Cell ss:StyleID="ssAccountLine${ccy_sub_total_style_suffix}">
@@ -331,7 +333,7 @@
331<Cell ss:StyleID="ssAccountLine">333<Cell ss:StyleID="ssAccountLine">
332 <Data ss:Type="String">${(formatLang(line['ldate'],date=True)) or ''}</Data>334 <Data ss:Type="String">${(formatLang(line['ldate'],date=True)) or ''}</Data>
333</Cell>335</Cell>
334<Cell ss:StyleID="ssAccountLine">336<Cell ss:StyleID="ssAccountLineNoWrap">
335 <Data ss:Type="String">${(line['lname'] or '')|x}</Data>337 <Data ss:Type="String">${(line['lname'] or '')|x}</Data>
336</Cell>338</Cell>
337<Cell ss:StyleID="ssAccountLine">339<Cell ss:StyleID="ssAccountLine">
@@ -354,12 +356,9 @@
354356
355% for ccy in o.get_currencies():357% for ccy in o.get_currencies():
356<Row>358<Row>
357<Cell ss:StyleID="ssBorder${ccy_sub_total_style_suffix}${ccy_sub_total_style_right_suffix}">359<Cell ss:StyleID="ssBorder${ccy_sub_total_style_suffix}${ccy_sub_total_style_right_suffix}" ss:MergeAcross="3">
358 <Data ss:Type="String">${(o.code or '')|x}</Data>360 <Data ss:Type="String">${(o.code or '')|x}</Data>
359</Cell>361</Cell>
360<Cell ss:StyleID="ssBorder${ccy_sub_total_style_suffix}${ccy_sub_total_style_right_suffix}" ss:MergeAcross="2">
361 <Data ss:Type="String">Sub Total</Data>
362</Cell>
363<Cell ss:StyleID="ssAccountLine${ccy_sub_total_style_suffix}">362<Cell ss:StyleID="ssAccountLine${ccy_sub_total_style_suffix}">
364 <Data ss:Type="String">${(ccy or '')|x}</Data>363 <Data ss:Type="String">${(ccy or '')|x}</Data>
365</Cell>364</Cell>
@@ -384,12 +383,7 @@
384<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">383<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
385 <PageSetup>384 <PageSetup>
386 <Layout x:Orientation="Landscape"/>385 <Layout x:Orientation="Landscape"/>
387% if get_show_move_lines():386 <Header x:Data="&amp;C&amp;&quot;Arial,Bold&quot;&amp;14General Ledger"/>
388 <Header x:Data="&amp;C&amp;&quot;Arial,Bold&quot;&amp;14General Ledger"/>0
389% endif
390% if not get_show_move_lines():
391 <Header x:Data="&amp;C&amp;&quot;Arial,Bold&quot;&amp;14Trial Balance"/>0
392% endif
393 <Footer x:Data="Page &amp;P of &amp;N"/>387 <Footer x:Data="Page &amp;P of &amp;N"/>
394 </PageSetup>388 </PageSetup>
395 <Print>389 <Print>
396390
=== modified file 'bin/addons/account/report/account_profit_loss.py'
--- bin/addons/account/report/account_profit_loss.py 2016-04-06 13:40:48 +0000
+++ bin/addons/account/report/account_profit_loss.py 2016-05-24 07:58:03 +0000
@@ -239,11 +239,9 @@
239 if data['form'].get('instance_ids', False):239 if data['form'].get('instance_ids', False):
240 self.cr.execute('select code from msf_instance where id IN %s',240 self.cr.execute('select code from msf_instance where id IN %s',
241 (tuple(data['form']['instance_ids']),))241 (tuple(data['form']['instance_ids']),))
242 instances = [x for x, in self.cr.fetchall()]
243 else:242 else:
244 # US-1166: mission only instances if none provided243 self.cr.execute('select code from msf_instance')
245 instances = self._get_instances(get_code=True,244 instances = [x for x, in self.cr.fetchall()]
246 mission_filter=True)
247 return ', '.join(instances)245 return ', '.join(instances)
248246
249report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',247report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',
250248
=== modified file 'bin/addons/account/report/common_report_header.py'
--- bin/addons/account/report/common_report_header.py 2016-04-06 13:40:48 +0000
+++ bin/addons/account/report/common_report_header.py 2016-05-24 07:58:03 +0000
@@ -192,19 +192,4 @@
192 return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol192 return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol
193 return ''193 return ''
194194
195 def _get_instances(self, get_code=False, mission_filter=False):
196 """
197 :param get_code: True to return code list vs ids list
198 :type get_code: boolean
199 :param mission_filter: only mission instance ?
200 :type mission_filter: boolean
201 :rtype : list/False
202 """
203 instance_obj = pooler.get_pool(self.cr.dbname).get('msf.instance')
204 ids = instance_obj.search(self.cr, self.uid,
205 mission_filter and [('instance_to_display_ids','=',True)] or [])
206 if not get_code or not ids:
207 return ids
208 return [ i.code for i in instance_obj.browse(self.cr, self.uid, ids) ]
209
210#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:195#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
211196
=== modified file 'bin/addons/account/wizard/account_report_balance_sheet_view.xml'
--- bin/addons/account/wizard/account_report_balance_sheet_view.xml 2016-04-06 13:40:48 +0000
+++ bin/addons/account/wizard/account_report_balance_sheet_view.xml 2016-05-24 07:58:03 +0000
@@ -20,7 +20,7 @@
20 <field name="display_account"/>20 <field name="display_account"/>
21 <field name="export_format"/>21 <field name="export_format"/>
22 <newline />22 <newline />
23 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">23 <field name="instance_ids">
24 <tree noteditable="1" editable="top" string="Proprietary Instances">24 <tree noteditable="1" editable="top" string="Proprietary Instances">
25 <field name="code" />25 <field name="code" />
26 <field name="name" />26 <field name="name" />
2727
=== modified file 'bin/addons/account/wizard/account_report_general_ledger.py'
--- bin/addons/account/wizard/account_report_general_ledger.py 2016-04-07 12:44:59 +0000
+++ bin/addons/account/wizard/account_report_general_ledger.py 2016-05-24 07:58:03 +0000
@@ -128,7 +128,9 @@
128 fy_rec = self.pool.get('account.fiscalyear').browse(cr, uid,128 fy_rec = self.pool.get('account.fiscalyear').browse(cr, uid,
129 fiscalyear_id, context=context)129 fiscalyear_id, context=context)
130 if filter in ('filter_date_doc', 'filter_date', ):130 if filter in ('filter_date_doc', 'filter_date', ):
131 ib_available = date_from and date_from == fy_rec.date_start131 ib_available = date_from and date_to \
132 and date_from == fy_rec.date_start \
133 and date_to <= fy_rec.date_stop
132 elif filter in 'filter_period':134 elif filter in 'filter_period':
133 if not period_from or not period_to:135 if not period_from or not period_to:
134 ib_available = False136 ib_available = False
135137
=== modified file 'bin/addons/account/wizard/account_report_profit_loss_view.xml'
--- bin/addons/account/wizard/account_report_profit_loss_view.xml 2016-04-06 13:40:48 +0000
+++ bin/addons/account/wizard/account_report_profit_loss_view.xml 2016-05-24 07:58:03 +0000
@@ -20,7 +20,7 @@
20 <field name="display_account"/>20 <field name="display_account"/>
21 <field name="export_format"/>21 <field name="export_format"/>
22 <newline/>22 <newline/>
23 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">23 <field name="instance_ids">
24 <tree noteditable="1" editable="top" string="Proprietary Instances">24 <tree noteditable="1" editable="top" string="Proprietary Instances">
25 <field name="code" />25 <field name="code" />
26 <field name="name" />26 <field name="name" />
2727
=== modified file 'bin/addons/account_mcdb/account_view.xml'
--- bin/addons/account_mcdb/account_view.xml 2016-04-05 08:49:12 +0000
+++ bin/addons/account_mcdb/account_view.xml 2016-05-24 07:58:03 +0000
@@ -31,8 +31,8 @@
31 <field name="transfer_journal_id" invisible="1"/>31 <field name="transfer_journal_id" invisible="1"/>
32 <field name="partner_txt"/>32 <field name="partner_txt"/>
33 <field name="partner_type" invisible="1"/>33 <field name="partner_type" invisible="1"/>
34 <field name="debit_currency" sum="Total Booking Debit"/>34 <field name="debit_currency"/>
35 <field name="credit_currency" sum="Total Booking Credit"/>35 <field name="credit_currency"/>
36 <field name="currency_id"/>36 <field name="currency_id"/>
37 <field name="debit" sum="Total Functional Debit"/>37 <field name="debit" sum="Total Functional Debit"/>
38 <field name="credit" sum="Total Functional Credit"/>38 <field name="credit" sum="Total Functional Credit"/>
@@ -74,9 +74,9 @@
74 <field name="cost_center_id" string="Cost Center" invisible="not context.get('display_fp', False)"/>74 <field name="cost_center_id" string="Cost Center" invisible="not context.get('display_fp', False)"/>
75 <field name="account_id"/>75 <field name="account_id"/>
76 <field name="partner_txt"/>76 <field name="partner_txt"/>
77 <field name="amount_currency" sum="Total Booking Amount"/>77 <field name="amount_currency"/>
78 <field name="currency_id"/>78 <field name="currency_id"/>
79 <field name="amount" sum="Total Functional Amount"/>79 <field name="amount"/>
80 <field name="functional_currency_id"/>80 <field name="functional_currency_id"/>
81 <field name="output_amount"/>81 <field name="output_amount"/>
82 <field name="output_currency"/>82 <field name="output_currency"/>
8383
=== modified file 'bin/addons/analytic_distribution/analytic_line.py'
--- bin/addons/analytic_distribution/analytic_line.py 2016-04-12 08:17:35 +0000
+++ bin/addons/analytic_distribution/analytic_line.py 2016-05-24 07:58:03 +0000
@@ -338,7 +338,7 @@
338 self.pool.get('account.move.line').corrected_upstream_marker(cr, uid, [aline.move_id.id], context=context)338 self.pool.get('account.move.line').corrected_upstream_marker(cr, uid, [aline.move_id.id], context=context)
339 return True339 return True
340340
341 def check_analytic_account(self, cr, uid, ids, account_id, wiz_date, context=None):341 def check_analytic_account(self, cr, uid, ids, account_id, context=None):
342 """342 """
343 Analytic distribution validity verification with given account for given ids.343 Analytic distribution validity verification with given account for given ids.
344 Return all valid ids.344 Return all valid ids.
@@ -372,14 +372,6 @@
372 # since US-711 date_stop is to be excluded itself as a frontier372 # since US-711 date_stop is to be excluded itself as a frontier
373 # => >= date_stop vs > date_stop373 # => >= date_stop vs > date_stop
374 # => http://jira.unifield.org/browse/US-711?focusedCommentId=45744&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-45744374 # => http://jira.unifield.org/browse/US-711?focusedCommentId=45744&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-45744
375 if account_type in ['OC', 'DEST']:
376 if aline.journal_id.type == 'hq' or aline.period_id and aline.period_id.state in ['done', 'mission-closed']:
377 aline_cmp_date = wiz_date
378 # these lines will be reverted, check if the reverted line is active
379 oc_dest_date_start = max(aline.cost_center_id.date_start, aline.destination_id.date_start)
380 oc_dest_date_stop = min(aline.cost_center_id.date or '9999-01-01', aline.destination_id.date or '9999-01-01')
381 if (oc_dest_date_start and wiz_date < oc_dest_date_start) or (oc_dest_date_stop and wiz_date >= oc_dest_date_stop):
382 expired_date_ids.append(aline.id)
383 if (date_start and aline_cmp_date < date_start) or (date_stop and aline_cmp_date >= date_stop):375 if (date_start and aline_cmp_date < date_start) or (date_stop and aline_cmp_date >= date_stop):
384 expired_date_ids.append(aline.id)376 expired_date_ids.append(aline.id)
385 # Process regarding account_type377 # Process regarding account_type
386378
=== modified file 'bin/addons/analytic_override/analytic_line.py'
--- bin/addons/analytic_override/analytic_line.py 2016-04-12 07:14:13 +0000
+++ bin/addons/analytic_override/analytic_line.py 2016-05-24 07:58:03 +0000
@@ -135,27 +135,24 @@
135 if not 'account_id' in vals:135 if not 'account_id' in vals:
136 raise osv.except_osv(_('Error'), _('No account_id found in given values!'))136 raise osv.except_osv(_('Error'), _('No account_id found in given values!'))
137137
138 account_obj = self.pool.get('account.analytic.account')
139
140 #US-419: Use the document date and not posting date when checking the validity of analytic account138 #US-419: Use the document date and not posting date when checking the validity of analytic account
141 # tech: replaced all date by document_date139 # tech: replaced all date by document_date
142 if 'document_date' in vals and vals['document_date'] is not False:140 if 'document_date' in vals and vals['document_date'] is not False:
141 account_obj = self.pool.get('account.analytic.account')
143 document_date = vals['document_date']142 document_date = vals['document_date']
144 account = account_obj.browse(cr, uid, vals['account_id'], context=context)143 account = account_obj.browse(cr, uid, vals['account_id'], context=context)
145 # FIXME: refactoring of next code144 # FIXME: refactoring of next code
146 if document_date < account.date_start or (account.date != False and document_date >= account.date):145 if document_date < account.date_start or (account.date != False and document_date >= account.date):
147 if 'from' not in context or context.get('from') != 'mass_reallocation':146 if 'from' not in context or context.get('from') != 'mass_reallocation':
148 raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (account.name or '',))147 raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (account.name or '',))
149 if 'date' in vals and vals['date'] is not False:
150 date = vals['date']
151 if vals.get('cost_center_id', False):148 if vals.get('cost_center_id', False):
152 cc = account_obj.browse(cr, uid, vals['cost_center_id'], context=context)149 cc = account_obj.browse(cr, uid, vals['cost_center_id'], context=context)
153 if date < cc.date_start or (cc.date != False and date >= cc.date):150 if document_date < cc.date_start or (cc.date != False and document_date >= cc.date):
154 if 'from' not in context or context.get('from') != 'mass_reallocation':151 if 'from' not in context or context.get('from') != 'mass_reallocation':
155 raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (cc.name or '',))152 raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (cc.name or '',))
156 if vals.get('destination_id', False):153 if vals.get('destination_id', False):
157 dest = account_obj.browse(cr, uid, vals['destination_id'], context=context)154 dest = account_obj.browse(cr, uid, vals['destination_id'], context=context)
158 if date < dest.date_start or (dest.date != False and date >= dest.date):155 if document_date < dest.date_start or (dest.date != False and document_date >= dest.date):
159 if 'from' not in context or context.get('from') != 'mass_reallocation':156 if 'from' not in context or context.get('from') != 'mass_reallocation':
160 raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (dest.name or '',))157 raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (dest.name or '',))
161 return True158 return True
162159
=== modified file 'bin/addons/delivery_mechanism/delivery_mechanism.py'
--- bin/addons/delivery_mechanism/delivery_mechanism.py 2016-05-02 07:56:36 +0000
+++ bin/addons/delivery_mechanism/delivery_mechanism.py 2016-05-24 07:58:03 +0000
@@ -1181,7 +1181,7 @@
1181 # UTP-9671181 # UTP-967
1182 if move.state != 'cancel' and move.purchase_line_id and move.purchase_line_id.procurement_id:1182 if move.state != 'cancel' and move.purchase_line_id and move.purchase_line_id.procurement_id:
1183 proc = move.purchase_line_id.procurement_id1183 proc = move.purchase_line_id.procurement_id
1184 if proc.move_id and proc.move_id.location_id.id == proc_loc_id:1184 if proc.move_id and proc.move_id.location_id.id == proc_loc_id and count > 0.00:
1185 if diff_qty > 0:1185 if diff_qty > 0:
1186 # REF-59: move of partial in,1186 # REF-59: move of partial in,
1187 # adapt proc order's move qty (for correct virtual stock)1187 # adapt proc order's move qty (for correct virtual stock)
11881188
=== modified file 'bin/addons/finance/account_drill.py'
--- bin/addons/finance/account_drill.py 2016-05-12 08:30:44 +0000
+++ bin/addons/finance/account_drill.py 2016-05-24 07:58:03 +0000
@@ -41,7 +41,6 @@
41 # set during map/reduce41 # set during map/reduce
42 self.data = {}42 self.data = {}
43 self.zero_bal = False43 self.zero_bal = False
44 self.skip = False
4544
46 # set during next_node() calls45 # set during next_node() calls
47 self.code = ''46 self.code = ''
@@ -80,11 +79,12 @@
80 JOIN res_currency c ON (c.id = l.currency_id)79 JOIN res_currency c ON (c.id = l.currency_id)
81 JOIN account_journal j on (l.journal_id=j.id)80 JOIN account_journal j on (l.journal_id=j.id)
82 JOIN account_account a on (a.id=l.account_id)81 JOIN account_account a on (a.id=l.account_id)
83 WHERE l.account_id = %s{reconcile}{query}82 JOIN account_account_type at on (at.id=a.user_type)
83 WHERE l.account_id = %s{reconcile}{options}{query}
84 GROUP BY l.currency_id'''84 GROUP BY l.currency_id'''
8585
86 # initial balance move lines base query (from IB journal period 0)86 # initial balance move lines base query (from IB journal period 0)
87 _sql_ib = '''SELECT sum(debit), sum(credit),87 _sql_ib = '''SELECT sum(debit), sum(credit),
88 sum(debit_currency), sum(credit_currency),88 sum(debit_currency), sum(credit_currency),
89 max(c.name)89 max(c.name)
90 FROM account_move_line l90 FROM account_move_line l
@@ -113,28 +113,8 @@
113 self.query_ib = query_ib or ''113 self.query_ib = query_ib or ''
114 self.move_states = move_states or [ 'draft', 'posted', ]114 self.move_states = move_states or [ 'draft', 'posted', ]
115 self.include_accounts = include_accounts115 self.include_accounts = include_accounts
116 self.account_report_types = account_report_types
117 self.with_balance_only = with_balance_only116 self.with_balance_only = with_balance_only
118 self.reconcile_filter = reconcile_filter117 self.reconcile_filter = reconcile_filter
119 if self.account_report_types and not self.include_accounts:
120 # deduce included accounts from report type filter
121 domain = [
122 ('report_type', 'in' , self.account_report_types),
123 ]
124 if 'asset' in self.account_report_types \
125 or 'liability' in self.account_report_types:
126 # US-227 include tax account for BS accounts selection
127 domain = [ '|', ('code', '=', 'tax') ] + domain
128 account_types_ids = self.pool.get('account.account.type').search(
129 self.cr, self.uid, domain, context=self.context)
130
131 if account_types_ids:
132 domain = [
133 ('type', '!=', 'view'),
134 ('user_type', 'in' , account_types_ids),
135 ]
136 self.include_accounts = self.pool.get('account.account').search(
137 self.cr, self.uid, domain, context=self.context) or []
138118
139 # nodes119 # nodes
140 self.root = None120 self.root = None
@@ -146,6 +126,18 @@
146 # JI base query: constructed via _sql126 # JI base query: constructed via _sql
147 self.sql = self._sql127 self.sql = self._sql
148 self.sql = self.sql.replace('{reconcile}', self.reconcile_filter)128 self.sql = self.sql.replace('{reconcile}', self.reconcile_filter)
129 if account_report_types:
130 report_types = [ "'%s'" % (rt, ) for rt in account_report_types ]
131 options = " AND (at.report_type in (%s)" % (
132 ','.join(report_types), )
133 if 'asset' in account_report_types \
134 or 'liability' in account_report_types:
135 # US-227 include tax account for BS accounts selection
136 options += " OR at.code = 'tax'"
137 options += ')'
138 else:
139 options = ''
140 self.sql = self.sql.replace('{options}', options)
149141
150 def output(self):142 def output(self):
151 """143 """
@@ -177,6 +169,7 @@
177169
178 level = max(self.nodes_by_level.keys())170 level = max(self.nodes_by_level.keys())
179 while level > 0:171 while level > 0:
172<<<<<<< TREE
180 nodes = self.nodes_by_level.get(level)173 nodes = self.nodes_by_level.get(level)
181 if nodes:174 if nodes:
182 for n in nodes:175 for n in nodes:
@@ -194,16 +187,30 @@
194 n.skip = not n.childs187 n.skip = not n.childs
195 #elif level == self._move_level - 1:188 #elif level == self._move_level - 1:
196 # n.skip = not n.childs # no entries due to filtering189 # n.skip = not n.childs # no entries due to filtering
190=======
191 nodes = self.nodes_by_level[level]
192 for n in nodes:
193 if level == self._move_level:
194 if self.with_balance_only:
195 bal = n.data.get('*', {}).get('debit', 0.) \
196 - n.data.get('*', {}).get('credit', 0.)
197 if bal == 0.:
198 # JI level:
199 # with only balance filter: do not agregate account
200 # debit/credit with a zero balance
201 n.zero_bal = True
202 continue
203>>>>>>> MERGE-SOURCE
197204
198 parent = n.parent205 parent = n.parent
199 if parent:206 if parent:
200 for ccy in n.data:207 for ccy in n.data:
201 if not ccy in parent.data:208 if not ccy in parent.data:
202 parent.data[ccy] = {}209 parent.data[ccy] = {}
203 for f in fields:
204 parent.data[ccy][f] = 0.
205 for f in fields:210 for f in fields:
206 parent.data[ccy][f] += n.data[ccy].get(f, 0.)211 parent.data[ccy][f] = 0.
212 for f in fields:
213 parent.data[ccy][f] += n.data[ccy].get(f, 0.)
207 level -= 1 # upper level (upper level by uper level)214 level -= 1 # upper level (upper level by uper level)
208215
209 # uncomment to explore reduced nodes216 # uncomment to explore reduced nodes
@@ -223,11 +230,14 @@
223 child_ids = self._search(domain)230 child_ids = self._search(domain)
224 if child_ids:231 if child_ids:
225 for id in child_ids:232 for id in child_ids:
233<<<<<<< TREE
226 if self.is_view(id) or not self.include_accounts or id in self.include_accounts:234 if self.is_view(id) or not self.include_accounts or id in self.include_accounts:
235=======
236 if not self.include_accounts or id in self.include_accounts:
237>>>>>>> MERGE-SOURCE
227 node = self._create_node(parent=parent, level=level,238 node = self._create_node(parent=parent, level=level,
228 account_id=id)239 account_id=id)
229 if node:240 self._map_dive(node, level + 1)
230 self._map_dive(node, level + 1)
231241
232 def _create_node(self, parent=None, level=0, account_id=False):242 def _create_node(self, parent=None, level=0, account_id=False):
233 """243 """
234244
=== modified file 'bin/addons/import_data/import_data.py'
--- bin/addons/import_data/import_data.py 2016-01-05 14:50:57 +0000
+++ bin/addons/import_data/import_data.py 2016-05-24 07:58:03 +0000
@@ -190,12 +190,23 @@
190 'import_mode': lambda *a: 'create',190 'import_mode': lambda *a: 'create',
191 }191 }
192192
193 def _import(self, dbname, uid, ids, context=None):193 def _import(self, cr, uid, ids, context=None, use_new_cursor=True, auto_import=False):
194 """if context includes 'import_data_field_max_size' dict,194 """if context includes 'import_data_field_max_size' dict,
195 this dict specifies the max tolerated field length at import195 this dict specifies the max tolerated field length at import
196 (key: field name, value: field size)196 (key: field name, value: field size)
197 """197 """
198 cr = pooler.get_db(dbname).cursor()198 dbname = cr.dbname
199 if use_new_cursor:
200 cr = pooler.get_db(cr.dbname).cursor()
201
202 if context is None:
203 context = {}
204
205 if isinstance(ids, (int, long)):
206 ids = [ids]
207
208 processed = []
209 rejected = []
199210
200 obj = self.read(cr, uid, ids[0])211 obj = self.read(cr, uid, ids[0])
201 import_mode = obj.get('import_mode')212 import_mode = obj.get('import_mode')
@@ -282,7 +293,8 @@
282 self._cache[dbname]['product.international.status']['name'].update({iv['name']: iv['id']})293 self._cache[dbname]['product.international.status']['name'].update({iv['name']: iv['id']})
283294
284 errorfile = TemporaryFile('w+')295 errorfile = TemporaryFile('w+')
285 writer = csv.writer(errorfile, quotechar='"', delimiter=';')296 if not auto_import:
297 writer = csv.writer(errorfile, quotechar='"', delimiter=';')
286298
287 fields_def = impobj.fields_get(cr, uid, context=context)299 fields_def = impobj.fields_get(cr, uid, context=context)
288 i = 0300 i = 0
@@ -342,6 +354,13 @@
342354
343 raise osv.except_osv(_('Warning !'), _('%s does not exist')%(value,))355 raise osv.except_osv(_('Warning !'), _('%s does not exist')%(value,))
344356
357 def write_error_row(row, index, error=""):
358 if not auto_import:
359 row.append(error)
360 writer.writerow(row)
361 else:
362 rejected.append((index, row, error))
363
345 i = 1364 i = 1
346 nb_error = 0365 nb_error = 0
347 nb_succes = 0366 nb_succes = 0
@@ -350,7 +369,8 @@
350 if self.pre_hook.get(impobj._name):369 if self.pre_hook.get(impobj._name):
351 # for headers mod.370 # for headers mod.
352 col_datas = self.pre_hook[impobj._name](impobj, cr, uid, headers, {}, col_datas)371 col_datas = self.pre_hook[impobj._name](impobj, cr, uid, headers, {}, col_datas)
353 writer.writerow(headers)372 if not auto_import:
373 writer.writerow(headers)
354374
355 for row in reader:375 for row in reader:
356 newo2m = False376 newo2m = False
@@ -394,9 +414,8 @@
394 logging.getLogger('import data').info(414 logging.getLogger('import data').info(
395 'Error %s'% (msg, ))415 'Error %s'% (msg, ))
396 cr.rollback()416 cr.rollback()
397 row.append("Line %s, row: %s, %s" % (i, n,417 error = "Line %s, row: %s, %s" % (i, n, msg, )
398 msg, ))418 write_error_row(row, i, error)
399 writer.writerow(row)
400 nb_error += 1419 nb_error += 1
401 line_ok = False420 line_ok = False
402 break421 break
@@ -464,62 +483,64 @@
464 impobj.create(cr, uid, data, context={'from_import_menu': True})483 impobj.create(cr, uid, data, context={'from_import_menu': True})
465 nb_succes += 1484 nb_succes += 1
466 cr.commit()485 cr.commit()
486 processed.append((i, row))
467 except osv.except_osv, e:487 except osv.except_osv, e:
468 logging.getLogger('import data').info('Error %s'%e.value)488 logging.getLogger('import data').info('Error %s'%e.value)
469 cr.rollback()489 cr.rollback()
470 row.append("Line %s, row: %s, %s"%(i, n, e.value))490 error = "Line %s, row: %s, %s"%(i, n, e.value)
471 writer.writerow(row)491 write_error_row(row, i, error)
472 nb_error += 1492 nb_error += 1
473 except Exception, e:493 except Exception, e:
474 cr.rollback()494 cr.rollback()
475 logging.getLogger('import data').info('Error %s'%e)495 logging.getLogger('import data').info('Error %s'%e)
476 row.append("Line %s, row: %s, %s"%(i, n, e))496 error = "Line %s, row: %s, %s"%(i, n, e)
477 writer.writerow(row)497 write_error_row(row, i, error)
478 nb_error += 1498 nb_error += 1
479499
480 if self.post_load_hook.get(impobj._name):500 if self.post_load_hook.get(impobj._name):
481 self.post_load_hook[impobj._name](impobj, cr, uid)501 self.post_load_hook[impobj._name](impobj, cr, uid)
482 fileobj.close()502 fileobj.close()
483 import_type = 'Import'503 if not auto_import:
484 if import_mode == 'update':504 import_type = 'Import'
485 import_type = 'Update'505 if import_mode == 'update':
486 summary = '''Datas Import Summary:506 import_type = 'Update'
487Object: %s507 summary = '''Datas Import Summary:
488Records updated: %s508 Object: %s
489Records created: %s509 Records updated: %s
490'''%(objname, nb_update_success, nb_succes)510 Records created: %s
491 else:511 '''%(objname, nb_update_success, nb_succes)
492 summary = '''Datas Import Summary:512 else:
493Object: %s513 summary = '''Datas Import Summary:
494Records created: %s514 Object: %s
495'''%(objname, nb_succes)515 Records created: %s
496516 '''%(objname, nb_succes)
497 if nb_error:517
498 summary += '''Records rejected: %s518 if nb_error:
499519 summary += '''Records rejected: %s
500Find in attachment the rejected lines'''%(nb_error)520
501521 Find in attachment the rejected lines'''%(nb_error)
502 request_obj = self.pool.get('res.request')522
503 req_id = request_obj.create(cr, uid,523 request_obj = self.pool.get('res.request')
504 {'name': "%s %s"%(import_type, objname,),524 req_id = request_obj.create(cr, uid,
505 'act_from': uid,525 {'name': "%s %s"%(import_type, objname,),
506 'act_to': uid,526 'act_from': uid,
507 'body': summary,527 'act_to': uid,
508 })528 'body': summary,
509 if req_id:529 })
510 request_obj.request_send(cr, uid, [req_id])530 if req_id:
511531 request_obj.request_send(cr, uid, [req_id])
512 if nb_error:532
513 errorfile.seek(0)533 if nb_error:
514 attachment = self.pool.get('ir.attachment')534 errorfile.seek(0)
515 attachment.create(cr, uid, {535 attachment = self.pool.get('ir.attachment')
516 'name': 'rejected-lines.csv',536 attachment.create(cr, uid, {
517 'datas_fname': 'rejected-lines.csv',537 'name': 'rejected-lines.csv',
518 'description': 'Rejected Lines',538 'datas_fname': 'rejected-lines.csv',
519 'res_model': 'res.request',539 'description': 'Rejected Lines',
520 'res_id': req_id,540 'res_model': 'res.request',
521 'datas': base64.encodestring(errorfile.read()),541 'res_id': req_id,
522 })542 'datas': base64.encodestring(errorfile.read()),
543 })
523544
524 if impobj == 'product.product':545 if impobj == 'product.product':
525 # Clear the cache546 # Clear the cache
@@ -528,10 +549,14 @@
528549
529 errorfile.close()550 errorfile.close()
530 cr.commit()551 cr.commit()
531 cr.close(True)552 if use_new_cursor:
553 cr.close(True)
554
555 if auto_import:
556 return processed, rejected, headers
532557
533 def import_csv(self, cr, uid, ids, context=None):558 def import_csv(self, cr, uid, ids, context=None):
534 thread = threading.Thread(target=self._import, args=(cr.dbname, uid, ids, context))559 thread = threading.Thread(target=self._import, args=(cr, uid, ids, context))
535 thread.start()560 thread.start()
536 return {'type': 'ir.actions.act_window_close'}561 return {'type': 'ir.actions.act_window_close'}
537562
538563
=== modified file 'bin/addons/mission_stock/mission_stock.py'
--- bin/addons/mission_stock/mission_stock.py 2016-05-12 08:16:15 +0000
+++ bin/addons/mission_stock/mission_stock.py 2016-05-24 07:58:03 +0000
@@ -39,6 +39,7 @@
39 return text39 return text
4040
4141
42<<<<<<< TREE
42class msr_in_progress(osv.osv_memory):43class msr_in_progress(osv.osv_memory):
43 '''44 '''
44 US-1218: This memory class is used to store temporary values regarding the report process, when a report is in progress, at it into the table45 US-1218: This memory class is used to store temporary values regarding the report process, when a report is in progress, at it into the table
@@ -84,6 +85,8 @@
8485
85msr_in_progress()86msr_in_progress()
8687
88=======
89>>>>>>> MERGE-SOURCE
87class stock_mission_report(osv.osv):90class stock_mission_report(osv.osv):
88 _name = 'stock.mission.report'91 _name = 'stock.mission.report'
89 _description = 'Mission stock report'92 _description = 'Mission stock report'
@@ -185,21 +188,11 @@
185 def update_newthread(self, cr, uid, ids=[], context=None):188 def update_newthread(self, cr, uid, ids=[], context=None):
186 # Open a new cursor : Don't forget to close it at the end of method189 # Open a new cursor : Don't forget to close it at the end of method
187 cr = pooler.get_db(cr.dbname).cursor()190 cr = pooler.get_db(cr.dbname).cursor()
188 msr_in_progress = self.pool.get('msr_in_progress')
189 try:191 try:
190 if msr_in_progress._is_in_progress(cr, uid, context):
191 logging.getLogger('MSR').info("""____________________ Another process is progress, this request is ignore: %s""" % time.strftime('%Y-%m-%d %H:%M:%S'))
192 return
193
194 logging.getLogger('MSR').info("""____________________ Start the update process of MSR, at %s""" % time.strftime('%Y-%m-%d %H:%M:%S'))
195 self.update(cr, uid, ids=[], context=None)192 self.update(cr, uid, ids=[], context=None)
196 msr_in_progress._delete_all(cr, uid, context)
197 cr.commit()193 cr.commit()
198 logging.getLogger('MSR').info("""____________________ Finished the update process of MSR, at %s""" % time.strftime('%Y-%m-%d %H:%M:%S'))194 except Exception:
199 except Exception as e:
200 cr.rollback()195 cr.rollback()
201 logging.getLogger('MSR').error("""____________________ Error while running the update process of MSR, at %s - Error: %s""" % (time.strftime('%Y-%m-%d %H:%M:%S'), str(e)))
202 msr_in_progress._delete_all(cr, uid, context)
203 finally:196 finally:
204 cr.close(True)197 cr.close(True)
205198
@@ -214,11 +207,9 @@
214 ids = [ids]207 ids = [ids]
215208
216 line_obj = self.pool.get('stock.mission.report.line')209 line_obj = self.pool.get('stock.mission.report.line')
217 msr_in_progress = self.pool.get('msr_in_progress')
218210
219 report_ids = self.search(cr, uid, [('local_report', '=', True), ('full_view', '=', False)], context=context)211 report_ids = self.search(cr, uid, [('local_report', '=', True)], context=context)
220 full_report_ids = self.search(cr, uid, [('full_view', '=', True)], context=context)212 full_report_ids = self.search(cr, uid, [('full_view', '=', True)], context=context)
221
222 instance_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.instance_id213 instance_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.instance_id
223 line_ids = []214 line_ids = []
224215
@@ -251,15 +242,12 @@
251242
252 product_ids = self.pool.get('product.product').search(cr, uid, [], context=context)243 product_ids = self.pool.get('product.product').search(cr, uid, [], context=context)
253 product_values = {}244 product_values = {}
254 temp_prods = self.pool.get('product.product').read(cr, uid, product_ids, ['product_amc', 'reviewed_consumption'], context=context)245 for product in self.pool.get('product.product').read(cr, uid, product_ids, ['product_amc', 'reviewed_consumption'], context=context):
255
256 logging.getLogger('MSR').info("""___ Number of MSR lines to be updated: %s, at %s""" % (len(temp_prods), time.strftime('%Y-%m-%d %H:%M:%S')))
257
258 for product in temp_prods:
259 product_values.setdefault(product['id'], {})246 product_values.setdefault(product['id'], {})
260 product_values[product['id']].setdefault('product_amc', product['product_amc'])247 product_values[product['id']].setdefault('product_amc', product['product_amc'])
261 product_values[product['id']].setdefault('reviewed_consumption', product['reviewed_consumption'])248 product_values[product['id']].setdefault('reviewed_consumption', product['reviewed_consumption'])
262249
250
263 # Check in each report if new products are in the database and not in the report251 # Check in each report if new products are in the database and not in the report
264 for report in self.read(cr, uid, report_ids, ['local_report', 'full_view'], context=context):252 for report in self.read(cr, uid, report_ids, ['local_report', 'full_view'], context=context):
265 #self.write(cr, uid, [report.id], {'export_ok': False}, context=context)253 #self.write(cr, uid, [report.id], {'export_ok': False}, context=context)
@@ -274,11 +262,16 @@
274 if not report['local_report']:262 if not report['local_report']:
275 continue263 continue
276264
265<<<<<<< TREE
277 #US-1218: If this report is previously processed, then do not redo it again for this transaction!266 #US-1218: If this report is previously processed, then do not redo it again for this transaction!
278 if msr_in_progress._already_processed(cr, uid, report['id'], context):267 if msr_in_progress._already_processed(cr, uid, report['id'], context):
279 continue268 continue
269=======
270 # Update the update date on report
271 self.write(cr, uid, [report['id']], {'last_update': time.strftime('%Y-%m-%d %H:%M:%S'),
272 'export_ok': False}, context=context)
273>>>>>>> MERGE-SOURCE
280274
281 logging.getLogger('MSR').info("""___ updating the report lines of the report: %s, at %s (this may take very long time!)""" % (report['id'], time.strftime('%Y-%m-%d %H:%M:%S')))
282 if context.get('update_full_report'):275 if context.get('update_full_report'):
283 full_view = self.search(cr, uid, [('full_view', '=', True)])276 full_view = self.search(cr, uid, [('full_view', '=', True)])
284 if full_view:277 if full_view:
@@ -288,15 +281,22 @@
288 # Update all lines281 # Update all lines
289 self.update_lines(cr, uid, [report['id']])282 self.update_lines(cr, uid, [report['id']])
290283
284<<<<<<< TREE
291 msr_ids = msr_in_progress.search(cr, uid, [('report_id', '=', report['id'])], context=context)285 msr_ids = msr_in_progress.search(cr, uid, [('report_id', '=', report['id'])], context=context)
292 msr_in_progress.write(cr, uid, msr_ids, {'done_ok': True}, context=context)286 msr_in_progress.write(cr, uid, msr_ids, {'done_ok': True}, context=context)
293287
294 logging.getLogger('MSR').info("""___ exporting the report lines of the report %s to csv, at %s""" % (report['id'], time.strftime('%Y-%m-%d %H:%M:%S')))288 logging.getLogger('MSR').info("""___ exporting the report lines of the report %s to csv, at %s""" % (report['id'], time.strftime('%Y-%m-%d %H:%M:%S')))
289=======
290>>>>>>> MERGE-SOURCE
295 self._get_export_csv(cr, uid, report['id'], product_values, context=context)291 self._get_export_csv(cr, uid, report['id'], product_values, context=context)
292<<<<<<< TREE
296 # Update the update date on report293 # Update the update date on report
297 self.write(cr, uid, [report['id']], {'last_update': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)294 self.write(cr, uid, [report['id']], {'last_update': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
298 logging.getLogger('MSR').info("""___ finished processing completely for the report: %s, at %s \n""" % (report['id'], time.strftime('%Y-%m-%d %H:%M:%S')))295 logging.getLogger('MSR').info("""___ finished processing completely for the report: %s, at %s \n""" % (report['id'], time.strftime('%Y-%m-%d %H:%M:%S')))
299296
297=======
298
299>>>>>>> MERGE-SOURCE
300 # After update of all normal reports, update the full view report300 # After update of all normal reports, update the full view report
301 if not context.get('update_full_report'):301 if not context.get('update_full_report'):
302 c = context.copy()302 c = context.copy()
@@ -338,43 +338,31 @@
338338
339 for id in ids:339 for id in ids:
340 # In-Pipe moves340 # In-Pipe moves
341 cr.execute('''SELECT m.product_id, sum(m.product_qty), m.product_uom, p.name341 cr.execute('''SELECT m.product_id, m.product_qty, m.product_uom, p.name, m.id
342 FROM stock_move m342 FROM stock_move m
343 LEFT JOIN stock_picking s ON m.picking_id = s.id343 LEFT JOIN stock_picking s ON m.picking_id = s.id
344 LEFT JOIN res_partner p ON s.partner_id2 = p.id344 LEFT JOIN res_partner p ON s.partner_id2 = p.id
345 WHERE s.type = 'in' AND m.state in ('confirmed', 'waiting', 'assigned')345 WHERE s.type = 'in' AND m.state in ('confirmed', 'waiting', 'assigned')''')
346 GROUP BY m.product_id, m.product_uom, p.name
347 ORDER BY m.product_id''')
348346
349 in_pipe_moves = cr.fetchall()347 in_pipe_moves = cr.fetchall()
350 current_product = None348 for product_id, qty, uom, partner, move_id in in_pipe_moves:
351 line = None349 line_id = line_obj.search(cr, uid, [('product_id', '=', product_id),
352 vals = {}350 ('mission_report_id', '=', id)])
353 for product_id, qty, uom, partner in in_pipe_moves:351 if line_id:
354 if current_product != product_id:352 line = line_obj.browse(cr, uid, line_id[0])
355 if line and vals and (vals.get('in_pipe_qty', False) or vals.get('in_pipe_coor_qty', False)):353 if uom != line.product_id.uom_id.id:
356 line_obj.write(cr, uid, [line.id], vals)354 qty = self.pool.get('product.uom')._compute_qty(cr, uid, uom, qty, line.product_id.uom_id.id)
357 line_id = line_obj.search(cr, uid, [('product_id', '=', product_id),
358 ('mission_report_id', '=', id)])
359355
360 vals = {'in_pipe_qty': 0.00,356 vals = {'in_pipe_qty': 0.00,
361 'in_pipe_coor_qty': 0.00,357 'in_pipe_coor_qty': 0.00,
362 'updated': True}358 'updated': True}
363 current_product = product_id359
364 if not line_id:360 vals['in_pipe_qty'] = vals['in_pipe_qty'] + qty
365 continue361
366362 if partner == coordo_id:
367 line = line_obj.browse(cr, uid, line_id[0])363 vals['in_pipe_coor_qty'] = vals['in_pipe_coor_qty'] + qty
368 if uom != line.product_id.uom_id.id:364
369 qty = self.pool.get('product.uom')._compute_qty(cr, uid, uom, qty, line.product_id.uom_id.id)365 line_obj.write(cr, uid, line.id, vals)
370
371 vals['in_pipe_qty'] = vals['in_pipe_qty'] + qty
372
373 if partner == coordo_id:
374 vals['in_pipe_coor_qty'] = vals['in_pipe_coor_qty'] + qty
375
376 if line and vals and (vals.get('in_pipe_qty', False) or vals.get('in_pipe_coor_qty', False)):
377 line_obj.write(cr, uid, [line.id], vals)
378366
379 # All other moves367 # All other moves
380 cr.execute('''368 cr.execute('''
@@ -883,7 +871,6 @@
883 if instance.parent_id.parent_id:871 if instance.parent_id.parent_id:
884 return instance.parent_id.parent_id.id872 return instance.parent_id.parent_id.id
885 return instance.parent_id.id873 return instance.parent_id.id
886 return instance.id
887874
888 return False875 return False
889876
890877
=== modified file 'bin/addons/msf_accrual/msf_accrual_line.py'
--- bin/addons/msf_accrual/msf_accrual_line.py 2016-04-08 12:50:27 +0000
+++ bin/addons/msf_accrual/msf_accrual_line.py 2016-05-24 07:58:03 +0000
@@ -178,13 +178,15 @@
178 context = {}178 context = {}
179 if isinstance(ids, (int, long, )):179 if isinstance(ids, (int, long, )):
180 ids = [ids]180 ids = [ids]
181
182 if 'document_date' in vals:
183 # US-192 check doc date reagarding post date
184 # => read date field (as readonly in form)
185 for r in self.read(cr, uid, ids, ['date', ], context=context):
186 self.pool.get('finance.tools').check_document_date(cr, uid,
187 vals['document_date'], r['date'], context=context)
188
181 self._create_write_set_vals(cr, uid, vals, context=context)189 self._create_write_set_vals(cr, uid, vals, context=context)
182 # US-192 check doc date regarding post date
183 current_values = self.read(cr, uid, ids, ['document_date', 'date'], context=context)[0]
184 document_date = 'document_date' in vals and vals['document_date'] or current_values['document_date']
185 posting_date = 'date' in vals and vals['date'] or current_values['date']
186 self.pool.get('finance.tools').check_document_date(cr, uid, document_date, posting_date, context=context)
187
188 return super(msf_accrual_line, self).write(cr, uid, ids, vals, context=context)190 return super(msf_accrual_line, self).write(cr, uid, ids, vals, context=context)
189 191
190 def button_cancel(self, cr, uid, ids, context=None):192 def button_cancel(self, cr, uid, ids, context=None):
191193
=== modified file 'bin/addons/msf_accrual/wizard/wizard_accrual_validation.py'
--- bin/addons/msf_accrual/wizard/wizard_accrual_validation.py 2016-04-08 07:51:59 +0000
+++ bin/addons/msf_accrual/wizard/wizard_accrual_validation.py 2016-05-24 07:58:03 +0000
@@ -39,8 +39,6 @@
39 raise osv.except_osv(_('Warning !'), _("The line '%s' is already posted!") % accrual_line.description)39 raise osv.except_osv(_('Warning !'), _("The line '%s' is already posted!") % accrual_line.description)
40 elif accrual_line.state == 'partially_posted':40 elif accrual_line.state == 'partially_posted':
41 raise osv.except_osv(_('Warning !'), _("The line '%s' is already partially posted!") % accrual_line.description)41 raise osv.except_osv(_('Warning !'), _("The line '%s' is already partially posted!") % accrual_line.description)
42 elif accrual_line.state == 'cancel':
43 raise osv.except_osv(_('Warning !'), _("The line '%s' is cancelled and can't be re-posted.") % accrual_line.description)
44 elif not accrual_line.period_id:42 elif not accrual_line.period_id:
45 raise osv.except_osv(_('Warning !'), _("The line '%s' has no period set!") % accrual_line.description)43 raise osv.except_osv(_('Warning !'), _("The line '%s' has no period set!") % accrual_line.description)
46 elif not accrual_line.analytic_distribution_id:44 elif not accrual_line.analytic_distribution_id:
4745
=== modified file 'bin/addons/msf_cross_docking/cross_docking.py'
--- bin/addons/msf_cross_docking/cross_docking.py 2016-04-25 09:24:04 +0000
+++ bin/addons/msf_cross_docking/cross_docking.py 2016-05-24 07:58:03 +0000
@@ -403,9 +403,7 @@
403 self.write(cr, uid, ids, {'cross_docking_ok': True}, context=context)403 self.write(cr, uid, ids, {'cross_docking_ok': True}, context=context)
404 else:404 else:
405 raise osv.except_osv(_('Warning !'), _('Please, enter some stock moves before changing the source location to CROSS DOCKING'))405 raise osv.except_osv(_('Warning !'), _('Please, enter some stock moves before changing the source location to CROSS DOCKING'))
406 self.infolog(cr, uid, "The source location of the stock moves of the picking id:%s (%s) has been changed to cross-docking location" % (406 self.infolog(cr, uid, "The source location of the stock moves of the picking id:%s has been changed to cross-docking location" % (pick.id))
407 pick.id, pick.name,
408 ))
409 # we check availability : cancel then check407 # we check availability : cancel then check
410 self.cancel_assign(cr, uid, ids)408 self.cancel_assign(cr, uid, ids)
411 self.action_assign(cr, uid, ids, context)409 self.action_assign(cr, uid, ids, context)
@@ -449,9 +447,7 @@
449 self.write(cr, uid, ids, {'cross_docking_ok': False}, context=context)447 self.write(cr, uid, ids, {'cross_docking_ok': False}, context=context)
450 else:448 else:
451 raise osv.except_osv(_('Warning !'), _('Please, enter some stock moves before changing the source location to STOCK'))449 raise osv.except_osv(_('Warning !'), _('Please, enter some stock moves before changing the source location to STOCK'))
452 self.infolog(cr, uid, "The source location of the stock moves of the picking id:%s (%s) has been changed to stock location" % (450 self.infolog(cr, uid, "The source location of the stock moves of the picking id:%s has been changed to stock location" % (pick.id))
453 pick.id, pick.name,
454 ))
455 # we check availability : cancel then check451 # we check availability : cancel then check
456 self.cancel_assign(cr, uid, ids)452 self.cancel_assign(cr, uid, ids)
457 self.action_assign(cr, uid, ids, context)453 self.action_assign(cr, uid, ids, context)
458454
=== modified file 'bin/addons/msf_doc_import/account.py'
--- bin/addons/msf_doc_import/account.py 2016-04-14 15:11:58 +0000
+++ bin/addons/msf_doc_import/account.py 2016-05-24 07:58:03 +0000
@@ -406,19 +406,11 @@
406 if not line[cols['Cost Centre']]:406 if not line[cols['Cost Centre']]:
407 errors.append(_('Line %s. No cost center specified!') % (current_line_num,))407 errors.append(_('Line %s. No cost center specified!') % (current_line_num,))
408 continue408 continue
409 # If necessary cast the CC into a string, otherwise the below search would crash
410 if not isinstance(line[cols['Cost Centre']], basestring):
411 line[cols['Cost Centre']] = '%s' % (line[cols['Cost Centre']])
412 cc_ids = self.pool.get('account.analytic.account').search(cr, uid, [('category', '=', 'OC'), '|', ('name', '=', line[cols['Cost Centre']]), ('code', '=', line[cols['Cost Centre']])])409 cc_ids = self.pool.get('account.analytic.account').search(cr, uid, [('category', '=', 'OC'), '|', ('name', '=', line[cols['Cost Centre']]), ('code', '=', line[cols['Cost Centre']])])
413 if not cc_ids:410 if not cc_ids:
414 errors.append(_('Line %s. Cost Center %s not found!') % (current_line_num, line[cols['Cost Centre']]))411 errors.append(_('Line %s. Cost Center %s not found!') % (current_line_num, line[cols['Cost Centre']]))
415 continue412 continue
416 r_cc = cc_ids[0]413 r_cc = cc_ids[0]
417 # Check Cost Center type
418 cc = self.pool.get('account.analytic.account').browse(cr, uid, r_cc, context)
419 if cc.type == 'view':
420 errors.append(_('Line %s. %s is a VIEW type Cost Center!') % (current_line_num, line[cols['Cost Centre']]))
421 continue
422 # Check Funding Pool (added since UTP-1082)414 # Check Funding Pool (added since UTP-1082)
423 r_fp = msf_fp_id415 r_fp = msf_fp_id
424 if line[cols['Funding Pool']]:416 if line[cols['Funding Pool']]:
425417
=== modified file 'bin/addons/msf_doc_import/view/internal_request_import_line_view.xml'
--- bin/addons/msf_doc_import/view/internal_request_import_line_view.xml 2016-04-12 15:36:23 +0000
+++ bin/addons/msf_doc_import/view/internal_request_import_line_view.xml 2016-05-24 07:58:03 +0000
@@ -31,7 +31,6 @@
31 background-color: #F0EBA4;31 background-color: #F0EBA4;
32 font-weight: bold;32 font-weight: bold;
33 text-transform: uppercase;33 text-transform: uppercase;
34 width: 90%%;
35 }34 }
3635
37 #error_message_unifield p, #error_message_unifield span36 #error_message_unifield p, #error_message_unifield span
@@ -42,7 +41,6 @@
42 font-weight: bold;41 font-weight: bold;
43 text-transform: uppercase;42 text-transform: uppercase;
44 padding: 5px;43 padding: 5px;
45 width: 90%%;
46 }44 }
4745
48 #error_message_unifield .grip46 #error_message_unifield .grip
@@ -53,7 +51,7 @@
5351
54 <div id="error_message_unifield">52 <div id="error_message_unifield">
55 <field name="text_error" invisible="context.get('hide_column_error_ok', False) != True" readonly="1" />53 <field name="text_error" invisible="context.get('hide_column_error_ok', False) != True" readonly="1" />
56 <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" string="Error" colspan="4" />54 <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" string="Error" />
57 </div>55 </div>
58 </html>56 </html>
59 </group>57 </group>
6058
=== modified file 'bin/addons/msf_doc_import/view/purchase_order_import_line_view.xml'
--- bin/addons/msf_doc_import/view/purchase_order_import_line_view.xml 2016-04-12 12:42:49 +0000
+++ bin/addons/msf_doc_import/view/purchase_order_import_line_view.xml 2016-05-24 07:58:03 +0000
@@ -96,7 +96,6 @@
96 font-weight: bold;96 font-weight: bold;
97 text-transform: uppercase;97 text-transform: uppercase;
98 padding: 5px;98 padding: 5px;
99 width: 90%%;
100 }99 }
101 </style>100 </style>
102101
103102
=== modified file 'bin/addons/msf_doc_import/view/sale_order_import_lines_view.xml'
--- bin/addons/msf_doc_import/view/sale_order_import_lines_view.xml 2016-04-12 12:42:49 +0000
+++ bin/addons/msf_doc_import/view/sale_order_import_lines_view.xml 2016-05-24 07:58:03 +0000
@@ -65,11 +65,10 @@
65 {65 {
66 height: 1em;66 height: 1em;
67 min-height: 1em;67 min-height: 1em;
68 color: red;68 color: red;
69 font-weight: bold;69 font-weight: bold;
70 text-transform: uppercase;70 text-transform: uppercase;
71 padding: 5px;71 padding: 5px;
72 width: 90%%;
73 }72 }
74 </style>73 </style>
7574
7675
=== modified file 'bin/addons/msf_doc_import/wizard/wiz_common_import.py'
--- bin/addons/msf_doc_import/wizard/wiz_common_import.py 2016-04-08 15:25:39 +0000
+++ bin/addons/msf_doc_import/wizard/wiz_common_import.py 2016-05-24 07:58:03 +0000
@@ -1013,7 +1013,7 @@
1013 p_obj = self.pool.get('product.product')1013 p_obj = self.pool.get('product.product')
10141014
1015 location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')[1]1015 location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')[1]
1016 reason_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'reason_types_moves', 'reason_type_stock_initialization')[1]1016 reason_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'reason_types_moves', 'reason_type_loss')[1]
10171017
1018 for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'perishable', 'batch_management', 'import_product_qty'], context=context):1018 for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'perishable', 'batch_management', 'import_product_qty'], context=context):
1019 values = {'product_id': p_data['id'],1019 values = {'product_id': p_data['id'],
10201020
=== modified file 'bin/addons/msf_doc_import/wizard/wizard_import_ir_line.py'
--- bin/addons/msf_doc_import/wizard/wizard_import_ir_line.py 2016-04-12 12:02:11 +0000
+++ bin/addons/msf_doc_import/wizard/wizard_import_ir_line.py 2016-05-24 07:58:03 +0000
@@ -280,7 +280,7 @@
280 wizard_vals.update(file_to_export)280 wizard_vals.update(file_to_export)
281 self.write(cr, uid, ids, wizard_vals, context=context)281 self.write(cr, uid, ids, wizard_vals, context=context)
282 # we reset the state of the FO to draft (initial state)282 # we reset the state of the FO to draft (initial state)
283 sale_obj.write(cr, uid, fo_id, {'state': 'draft', 'import_in_progress': False}, context)283 sale_obj.write(cr, uid, fo_id, {'state': 'draft'}, context)
284 if not context.get('yml_test', False):284 if not context.get('yml_test', False):
285 cr.commit()285 cr.commit()
286 cr.close(True)286 cr.close(True)
287287
=== modified file 'bin/addons/msf_homere_interface/hr.py'
--- bin/addons/msf_homere_interface/hr.py 2016-01-04 13:16:43 +0000
+++ bin/addons/msf_homere_interface/hr.py 2016-05-24 07:58:03 +0000
@@ -326,5 +326,20 @@
326326
327 return super(hr_employee, self).name_search(cr, uid, name, args, operator, context, limit)327 return super(hr_employee, self).name_search(cr, uid, name, args, operator, context, limit)
328328
329 def auto_import(self, cr, uid, file_to_import):
330 import base64
331 import os
332 processed = []
333 rejected = []
334 headers = []
335
336 import_obj = self.pool.get('hr.expat.employee.import')
337 import_id = import_obj.create(cr, uid, {
338 'file': base64.encodestring(open(file_to_import, 'r').read()),
339 'filename': os.path.split(file_to_import)[1],
340 })
341 processed, rejected, headers = import_obj.button_validate(cr, uid, [import_id], auto_import=True)
342 return processed, rejected, headers
343
329hr_employee()344hr_employee()
330# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:345# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
331346
=== modified file 'bin/addons/msf_homere_interface/wizard/hr_expat_import.py'
--- bin/addons/msf_homere_interface/wizard/hr_expat_import.py 2015-03-24 08:40:43 +0000
+++ bin/addons/msf_homere_interface/wizard/hr_expat_import.py 2016-05-24 07:58:03 +0000
@@ -37,7 +37,7 @@
37 'filename': fields.char(string="Imported filename", size=256),37 'filename': fields.char(string="Imported filename", size=256),
38 }38 }
3939
40 def button_validate(self, cr, uid, ids, context=None):40 def button_validate(self, cr, uid, ids, context=None, auto_import=False):
41 """41 """
42 Import XLS file42 Import XLS file
43 """43 """
@@ -46,12 +46,22 @@
46 line.cells[cell_index] and line.cells[cell_index].data \46 line.cells[cell_index] and line.cells[cell_index].data \
47 or False47 or False
4848
49 def manage_error(line_index, msg, name='', code='', status=''):
50 if auto_import:
51 rejected_lines.append((line_index, [name, code, status], msg))
52 else:
53 raise osv.except_osv(_('Error'), _(msg))
54
55 processed_lines = []
56 rejected_lines = []
57 headers = [_('Name'), _('Code'), _('Status')]
49 hr_emp_obj = self.pool.get('hr.employee')58 hr_emp_obj = self.pool.get('hr.employee')
50 # Some verifications59 # Some verifications
51 if not context:60 if not context:
52 context = {}61 context = {}
53 if isinstance(ids, (int, long)):62 if isinstance(ids, (int, long)):
54 ids = [ids]63 ids = [ids]
64
55 for wiz in self.browse(cr, uid, ids):65 for wiz in self.browse(cr, uid, ids):
56 # Prepare some values66 # Prepare some values
57 created = 067 created = 0
@@ -72,25 +82,28 @@
72 # get cells82 # get cells
73 name = get_xml_spreadheet_cell_value(0)83 name = get_xml_spreadheet_cell_value(0)
74 if not name:84 if not name:
85 manage_error(line_index, 'No name defined')
75 continue86 continue
76 code = get_xml_spreadheet_cell_value(1)87 code = get_xml_spreadheet_cell_value(1)
77 if not code:88 if not code:
78 msg = "At least one employee in the import file does not" \89 msg = "At least one employee in the import file does not" \
79 " have an ID number; make sure all employees in the" \90 " have an ID number; make sure all employees in the" \
80 " file have an ID number and run the import again."91 " file have an ID number and run the import again."
81 raise osv.except_osv(_('Error'), _(msg))92 manage_error(line_index, msg, name)
82 active_str = get_xml_spreadheet_cell_value(2)93 active_str = get_xml_spreadheet_cell_value(2)
83 if not active_str:94 if not active_str:
84 msg = "Active column is missing or empty at line %d"95 msg = "Active column is missing or empty at line %d" % line_index
85 raise osv.except_osv(_('Error'), _(msg) % (line_index, ))96 manage_error(line_index, msg, name, code)
86 active_str = active_str.lower()97 active_str = active_str.lower()
87 if active_str not in ('active', 'inactive'):98 if active_str not in ('active', 'inactive'):
88 msg = "Active column invalid value line %d" \99 msg = "Active column invalid value line %d" \
89 " (should be Active/Inactive)"100 " (should be Active/Inactive)" % line_index
90 raise osv.except_osv(_('Error'), _(msg) % (line_index, ))101 manage_error(line_index, msg, name, code, active_str)
91 active = active_str == 'active' or False102 active = active_str == 'active' or False
92103
93 processed += 1104 processed += 1
105 if auto_import:
106 processed_lines.append((line_index, [name, code, active_str]))
94107
95 ids = hr_emp_obj.search(cr, uid,108 ids = hr_emp_obj.search(cr, uid,
96 [('identification_id', '=', code)])109 [('identification_id', '=', code)])
@@ -114,6 +127,9 @@
114127
115 context.update({'message': ' ', 'from': 'expat_import'})128 context.update({'message': ' ', 'from': 'expat_import'})
116129
130 if auto_import:
131 return processed_lines, rejected_lines, headers
132
117 view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'msf_homere_interface', 'payroll_import_confirmation')133 view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'msf_homere_interface', 'payroll_import_confirmation')
118 view_id = view_id and view_id[1] or False134 view_id = view_id and view_id[1] or False
119135
120136
=== modified file 'bin/addons/msf_instance/add_instance.py'
--- bin/addons/msf_instance/add_instance.py 2016-02-05 16:08:07 +0000
+++ bin/addons/msf_instance/add_instance.py 2016-05-24 07:58:03 +0000
@@ -61,6 +61,27 @@
61 return False61 return False
62 return True62 return True
6363
64 def create(self, cr, uid, vals, context=None):
65 """
66 Check there is only one account.analytic.journal with a couple (type, instance_id) during automated import
67 """
68 if context is None:
69 context = {}
70
71 new_id = super(account_analytic_journal, self).create(cr, uid, vals, context=context)
72
73 if not context.get('update_mode') == 'init':
74 return new_id
75
76 journal = self.browse(cr, uid, new_id, context=context)
77 if self.search(cr, uid, [('type', '=', journal.type), ('instance_id', '=', journal.instance_id.id), ('id', '!=', new_id)], limit=1, context=context):
78 raise osv.except_osv(
79 _('Error'),
80 _('A same analytic journal already exists with this type and for this instance!'),
81 )
82
83 return new_id
84
64 _constraints = [85 _constraints = [
65 (_check_engagement_count, 'You cannot have more than one engagement journal per instance!', ['type', 'instance_id']),86 (_check_engagement_count, 'You cannot have more than one engagement journal per instance!', ['type', 'instance_id']),
66 ]87 ]
6788
=== modified file 'bin/addons/msf_outgoing/msf_outgoing.py'
--- bin/addons/msf_outgoing/msf_outgoing.py 2016-04-25 10:27:20 +0000
+++ bin/addons/msf_outgoing/msf_outgoing.py 2016-05-24 07:58:03 +0000
@@ -620,11 +620,6 @@
620620
621 add_line_obj.create(cr, uid, line_vals, context=context)621 add_line_obj.create(cr, uid, line_vals, context=context)
622622
623 # US-803: point 9, add the ship description, then remove it from the context
624 description_ppl = context.get('description_ppl', False)
625 if context.get('description_ppl', False):
626 del context['description_ppl']
627
628 for family in wizard.family_ids:623 for family in wizard.family_ids:
629 if not family.selected_number: # UTP-1015 fix from Quentin624 if not family.selected_number: # UTP-1015 fix from Quentin
630 continue625 continue
@@ -641,7 +636,6 @@
641 'backorder_id': picking.id,636 'backorder_id': picking.id,
642 'shipment_id': False,637 'shipment_id': False,
643 'move_lines': [],638 'move_lines': [],
644 'description_ppl': description_ppl, # US-803: added the description
645 }639 }
646 # Update context for copy640 # Update context for copy
647 context.update({641 context.update({
@@ -673,9 +667,9 @@
673 picking_obj.force_assign(cr, uid, [new_packing_id])667 picking_obj.force_assign(cr, uid, [new_packing_id])
674668
675 # Log creation message669 # Log creation message
676 message = _('The new Shipment id:%s (%s) has been created.')670 message = _('The new Shipment %s has been created.')
677 self.log(cr, uid, shipment.id, message%(shipment.id, shipment_name,))671 self.log(cr, uid, shipment.id, message%(shipment_name,))
678 self.infolog(cr, uid, message%(shipment.id, shipment.name))672 self.infolog(cr, uid, message%(shipment.id,))
679 # The shipment is automatically shipped, no more pack states in between.673 # The shipment is automatically shipped, no more pack states in between.
680 self.ship(cr, uid, [shipment_id], context=context)674 self.ship(cr, uid, [shipment_id], context=context)
681675
@@ -855,9 +849,6 @@
855 if not log_flag:849 if not log_flag:
856 draft_shipment_name = self.read(cr, uid, shipment.id, ['name'], context=context)['name']850 draft_shipment_name = self.read(cr, uid, shipment.id, ['name'], context=context)['name']
857 self.log(cr, uid, shipment.id, _("Packs from the draft Shipment (%s) have been returned to stock.") % (draft_shipment_name,))851 self.log(cr, uid, shipment.id, _("Packs from the draft Shipment (%s) have been returned to stock.") % (draft_shipment_name,))
858 self.infolog(cr, uid, "Packs from the draft Shipment id:%s (%s) have been returned to stock." % (
859 shipment.id, shipment.name,
860 ))
861 log_flag = True852 log_flag = True
862853
863 res = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]854 res = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
@@ -1134,9 +1125,6 @@
1134 # log corresponding action1125 # log corresponding action
1135 shipment_log_msg = _('Packs from the shipped Shipment (%s) have been returned to %s location.') % (shipment.name, _('Dispatch'))1126 shipment_log_msg = _('Packs from the shipped Shipment (%s) have been returned to %s location.') % (shipment.name, _('Dispatch'))
1136 self.log(cr, uid, shipment.id, shipment_log_msg)1127 self.log(cr, uid, shipment.id, shipment_log_msg)
1137 self.infolog(cr, uid, "Packs from the shipped Shipment id:%s (%s) have been returned to Dispatch location." % (
1138 shipment.id, shipment.name,
1139 ))
11401128
1141 draft_log_msg = _('The corresponding Draft Shipment (%s) has been updated.') % family.draft_packing_id.backorder_id.shipment_id.name1129 draft_log_msg = _('The corresponding Draft Shipment (%s) has been updated.') % family.draft_packing_id.backorder_id.shipment_id.name
1142 self.log(cr, uid, draft_shipment_id, draft_log_msg)1130 self.log(cr, uid, draft_shipment_id, draft_log_msg)
@@ -1273,9 +1261,6 @@
12731261
1274 # log the ship action1262 # log the ship action
1275 self.log(cr, uid, shipment.id, _('The Shipment %s has been shipped.') % (shipment.name,))1263 self.log(cr, uid, shipment.id, _('The Shipment %s has been shipped.') % (shipment.name,))
1276 self.infolog(cr, uid, "The Shipment id:%s (%s) has been shipped." % (
1277 shipment.id, shipment.name,
1278 ))
12791264
1280 # TODO which behavior1265 # TODO which behavior
1281 return True1266 return True
@@ -1587,9 +1572,6 @@
15871572
1588 # log validate action1573 # log validate action
1589 self.log(cr, uid, shipment.id, _('The Shipment %s has been closed.') % (shipment.name,))1574 self.log(cr, uid, shipment.id, _('The Shipment %s has been closed.') % (shipment.name,))
1590 self.infolog(cr, uid, "The Shipment id:%s (%s) has been closed." % (
1591 shipment.id, shipment.name,
1592 ))
15931575
1594 self.complete_finished(cr, uid, ids, context=context)1576 self.complete_finished(cr, uid, ids, context=context)
1595 return True1577 return True
@@ -3079,11 +3061,6 @@
3079 context.update({'original_name': obj.name})3061 context.update({'original_name': obj.name})
3080 self._hook_create_rw_out_sync_messages(cr, uid, [new_pick_id or obj.id], context, True)3062 self._hook_create_rw_out_sync_messages(cr, uid, [new_pick_id or obj.id], context, True)
30813063
3082 self.infolog(cr, uid, "The Picking Ticket id:%s (%s) has been converted to simple Out id:%s (%s)." % (
3083 obj.id, obj.name,
3084 new_pick_id or obj.id, new_name,
3085 ))
3086
3087 # TODO which behavior3064 # TODO which behavior
3088 data_obj = self.pool.get('ir.model.data')3065 data_obj = self.pool.get('ir.model.data')
3089 view_id = data_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')3066 view_id = data_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
@@ -3162,9 +3139,6 @@
3162 # we force availability3139 # we force availability
31633140
3164 self.log(cr, uid, out.id, _('The Delivery order (%s) has been converted to draft Picking Ticket (%s).') % (out.name, new_name), context={'view_id': view_id, 'picking_type': 'picking'})3141 self.log(cr, uid, out.id, _('The Delivery order (%s) has been converted to draft Picking Ticket (%s).') % (out.name, new_name), context={'view_id': view_id, 'picking_type': 'picking'})
3165 self.infolog(cr, uid, "The Delivery order id:%s (%s) has been converted to draft Picking Ticket id:%s (%s)." % (
3166 out.id, out.name, out.id, new_name,
3167 ))
31683142
3169 for move in out.move_lines:3143 for move in out.move_lines:
3170 move_to_update.append(move.id)3144 move_to_update.append(move.id)
@@ -3364,15 +3338,7 @@
33643338
3365 wf_service.trg_write(uid, 'stock.picking', picking.id, cr)3339 wf_service.trg_write(uid, 'stock.picking', picking.id, cr)
3366 delivered_pack_id = new_picking_id3340 delivered_pack_id = new_picking_id
3367
3368 new_pick_name = self.read(cr, uid, new_picking_id, ['name'], context=context)['name']
3369 self.infolog(cr, uid, "The Outgoing Delivery id:%s (%s) has been processed. Backorder id:%s (%s) has been created." % (
3370 new_picking_id, new_pick_name, picking.id, picking.name,
3371 ))
3372 else:3341 else:
3373 self.infolog(cr, uid, "The Outgoing Delivery id:%s (%s) has been processed." % (
3374 picking.id, picking.name,
3375 ))
3376 # Claim specific code3342 # Claim specific code
3377 self._claim_registration(cr, uid, wizard, picking.id, context=context)3343 self._claim_registration(cr, uid, wizard, picking.id, context=context)
3378 if not wizard.register_a_claim or (wizard.register_a_claim and wizard.claim_type != 'return'):3344 if not wizard.register_a_claim or (wizard.register_a_claim and wizard.claim_type != 'return'):
@@ -3466,11 +3432,6 @@
3466 pick_name = context.get('associate_pick_name', False)3432 pick_name = context.get('associate_pick_name', False)
3467 del context['associate_pick_name']3433 del context['associate_pick_name']
3468 already_replicated = True3434 already_replicated = True
3469 #US-803: Set the pick name that given from sync
3470 elif 'rw_backorder_name' in context:
3471 pick_name = context.get('rw_backorder_name', False)
3472 del context['rw_backorder_name']
3473 already_replicated = True
34743435
3475 # UF-2531: if not exist, then calculate the name as before3436 # UF-2531: if not exist, then calculate the name as before
3476 if not pick_name:3437 if not pick_name:
@@ -3557,10 +3518,7 @@
3557 wf_service.trg_validate(uid, 'stock.picking', new_picking_id, 'button_confirm', cr)3518 wf_service.trg_validate(uid, 'stock.picking', new_picking_id, 'button_confirm', cr)
3558 # We force availability3519 # We force availability
3559 self.force_assign(cr, uid, [new_picking_id])3520 self.force_assign(cr, uid, [new_picking_id])
3560 self.infolog(cr, uid, "The Validated Picking Ticket id:%s (%s) has been generated by the Draft Picking Ticket id:%s (%s)" % (3521 self.infolog(cr, uid, "The Validated Picking Ticket id:%s has been generated by the Draft Picking Ticket id:%s" % (new_picking_id, picking.id))
3561 new_picking_id, self.read(cr, uid, new_picking_id, ['name'], context=context)['name'],
3562 picking.id, picking.name,
3563 ))
35643522
3565 # Just to avoid an error on kit test because view_picking_ticket_form is not still loaded when test is ran3523 # Just to avoid an error on kit test because view_picking_ticket_form is not still loaded when test is ran
3566 msf_outgoing = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', 'msf_outgoing'), ('state', '=', 'installed')], context=context)3524 msf_outgoing = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', 'msf_outgoing'), ('state', '=', 'installed')], context=context)
@@ -3809,9 +3767,7 @@
3809 if picking.flow_type == 'quick' and new_ppl:3767 if picking.flow_type == 'quick' and new_ppl:
3810 return self.quick_mode(cr, uid, new_ppl.id, context=context)3768 return self.quick_mode(cr, uid, new_ppl.id, context=context)
38113769
3812 self.infolog(cr, uid, "The Validated Picking Ticket id:%s (%s) has been validated" % (3770 self.infolog(cr, uid, "The Validated Picking Ticket id:%s has been validated" % (picking.id))
3813 picking.id, picking.name,
3814 ))
38153771
3816 data_obj = self.pool.get('ir.model.data')3772 data_obj = self.pool.get('ir.model.data')
3817 view_id = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_ppl_form')3773 view_id = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_ppl_form')
@@ -4001,10 +3957,8 @@
4001 _('No data to process '),3957 _('No data to process '),
4002 )3958 )
40033959
4004 pickings = {}
4005 for wizard in proc_obj.browse(cr, uid, wizard_ids, context=context):3960 for wizard in proc_obj.browse(cr, uid, wizard_ids, context=context):
4006 picking = wizard.picking_id3961 picking = wizard.picking_id
4007 pickings.setdefault(picking.id, picking.name)
40083962
4009 if picking.state != 'assigned':3963 if picking.state != 'assigned':
4010 raise osv.except_osv(3964 raise osv.except_osv(
@@ -4129,12 +4083,10 @@
4129 This code can be set back to the old one, because the shipment should always be available at this stage!!!!! DUY4083 This code can be set back to the old one, because the shipment should always be available at this stage!!!!! DUY
4130 '''4084 '''
4131 shipment_id = False4085 shipment_id = False
4132 shipment_name = False
4133 if new_packing_id:4086 if new_packing_id:
4134 obj = self.browse(cr, uid, new_packing_id, context)4087 obj = self.browse(cr, uid, new_packing_id, context)
4135 if obj and obj.shipment_id and obj.shipment_id.id:4088 if obj and obj.shipment_id and obj.shipment_id.id:
4136 shipment_id = obj.shipment_id.id4089 shipment_id = obj.shipment_id.id
4137 shipment_name = obj.shipment_id.name
41384090
4139 if context.get('rw_shipment_name', False) and context.get('sync_message_execution', False): # RW Sync - update the shipment name same as on RW instance4091 if context.get('rw_shipment_name', False) and context.get('sync_message_execution', False): # RW Sync - update the shipment name same as on RW instance
4140 new_name = context.get('rw_shipment_name')4092 new_name = context.get('rw_shipment_name')
@@ -4149,11 +4101,6 @@
4149 if usb_entity == self.REMOTE_WAREHOUSE and not context.get('sync_message_execution', False):4101 if usb_entity == self.REMOTE_WAREHOUSE and not context.get('sync_message_execution', False):
4150 self._manual_create_rw_messages(cr, uid, context=context)4102 self._manual_create_rw_messages(cr, uid, context=context)
41514103
4152 for pid, pname in pickings.iteritems():
4153 self.infolog(cr, uid, "Products of Pre-Packing List id:%s (%s) have been packed in Shipment id:%s (%s)" % (
4154 pid, pname, shipment_id, shipment_name,
4155 ))
4156
4157 view_id = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_shipment_form')4104 view_id = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_shipment_form')
4158 view_id = view_id and view_id[1] or False4105 view_id = view_id and view_id[1] or False
4159 return {'name':_("Shipment"),4106 return {'name':_("Shipment"),
@@ -4280,9 +4227,6 @@
4280 context['view_id'] = ppl_view4227 context['view_id'] = ppl_view
4281 log_message = _('Products from Pre-Packing List (%s) have been returned to stock.') % (picking.name,)4228 log_message = _('Products from Pre-Packing List (%s) have been returned to stock.') % (picking.name,)
4282 self.log(cr, uid, picking.id, log_message, context=context)4229 self.log(cr, uid, picking.id, log_message, context=context)
4283 self.infolog(cr, uid, "Products from Pre-Packing List id:%s (%s) have been returned to stock." % (
4284 picking.id, picking.name,
4285 ))
42864230
4287 # Log message for draft picking ticket4231 # Log message for draft picking ticket
4288 pick_view = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]4232 pick_view = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
@@ -4400,9 +4344,6 @@
4400 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]4344 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
4401 context.update({'view_id': res, 'picking_type': 'picking_ticket'})4345 context.update({'view_id': res, 'picking_type': 'picking_ticket'})
4402 self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.") % (picking.backorder_id.name,), context=context)4346 self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.") % (picking.backorder_id.name,), context=context)
4403 self.infolog(cr, uid, "The Validated Picking Ticket id:%s (%s) has been canceled. The corresponding Draft Picking Ticket id:%s (%s) has been updated." % (
4404 picking.id, picking.name, picking.backorder_id.id, picking.backorder_id.name,
4405 ))
44064347
4407 if picking.subtype == 'packing':4348 if picking.subtype == 'packing':
44084349
44094350
=== modified file 'bin/addons/msf_profile/data/patches.xml'
--- bin/addons/msf_profile/data/patches.xml 2016-05-19 08:04:50 +0000
+++ bin/addons/msf_profile/data/patches.xml 2016-05-24 07:58:03 +0000
@@ -29,6 +29,7 @@
29 <field name="method">clean_far_updates</field>29 <field name="method">clean_far_updates</field>
30 </record>30 </record>
3131
32<<<<<<< TREE
32 <record id="us_1185_patch" model="patch.scripts">33 <record id="us_1185_patch" model="patch.scripts">
33 <field name="method">us_1185_patch</field>34 <field name="method">us_1185_patch</field>
34 </record>35 </record>
@@ -44,5 +45,7 @@
44 <record id="us-1273_patch" model="patch.scripts">45 <record id="us-1273_patch" model="patch.scripts">
45 <field name="method">us_1273_patch</field>46 <field name="method">us_1273_patch</field>
46 </record>47 </record>
48=======
49>>>>>>> MERGE-SOURCE
47 </data>50 </data>
48</openerp>51</openerp>
4952
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2016-04-25 09:29:33 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2016-05-24 07:58:03 +0000
@@ -8953,12 +8953,6 @@
8953msgid "The line '%s' is already partially posted!"8953msgid "The line '%s' is already partially posted!"
8954msgstr "La ligne '%s' est déjà partiellement comptabilisée !"8954msgstr "La ligne '%s' est déjà partiellement comptabilisée !"
89558955
8956#. module: msf_accrual
8957#: code:addons/msf_accrual/wizard/wizard_accrual_validation.py:43
8958#, python-format
8959msgid "The line '%s' is cancelled and can't be re-posted."
8960msgstr "La ligne '%s' est annulée et ne peut pas être recomptabilisée."
8961
8962#. module: account8956#. module: account
8963#: field:account.report.general.ledger,sortby:08957#: field:account.report.general.ledger,sortby:0
8964msgid "Sort By"8958msgid "Sort By"
@@ -46311,12 +46305,10 @@
46311msgid "Analytic distribution is mandatory for this line: %s!"46305msgid "Analytic distribution is mandatory for this line: %s!"
46312msgstr "Allocation Analytique obligatoire pour cette ligne: %s"46306msgstr "Allocation Analytique obligatoire pour cette ligne: %s"
4631346307
46314#. modules: msf_accrual, account_period_closing_level46308#. module: msf_accrual
46315#: model:ir.actions.act_window,name:msf_accrual.action_msf_accrual_line_tree46309#: model:ir.actions.act_window,name:msf_accrual.action_msf_accrual_line_tree
46316#: model:ir.ui.menu,name:msf_accrual.menu_action_msf_accrual_line_tree46310#: model:ir.ui.menu,name:msf_accrual.menu_action_msf_accrual_line_tree
46317#: view:msf.accrual.line:046311#: view:msf.accrual.line:0
46318#: code:addons/account_period_closing_level/account_period.py:716
46319#, python-format
46320msgid "Accruals Management"46312msgid "Accruals Management"
46321msgstr "Gestion des Régularisations"46313msgstr "Gestion des Régularisations"
4632246314
@@ -52203,12 +52195,6 @@
52203msgid "Line %s. Cost Center %s not found!"52195msgid "Line %s. Cost Center %s not found!"
52204msgstr "Ligne %s. Centre de coût %s non trouvé !"52196msgstr "Ligne %s. Centre de coût %s non trouvé !"
5220552197
52206#. module: msf_doc_import
52207#: code:addons/msf_doc_import/account.py:420
52208#, python-format
52209msgid "Line %s. %s is a VIEW type Cost Center!"
52210msgstr "Ligne %s. %s est un Centre de coût de type VUE !"
52211
52212#. module: stock52198#. module: stock
52213#: view:stock.inventory.line.split:052199#: view:stock.inventory.line.split:0
52214#: view:stock.move.split:052200#: view:stock.move.split:0
5221552201
=== modified file 'bin/addons/msf_profile/msf_profile.py'
--- bin/addons/msf_profile/msf_profile.py 2016-05-19 08:04:50 +0000
+++ bin/addons/msf_profile/msf_profile.py 2016-05-24 07:58:03 +0000
@@ -131,15 +131,6 @@
131 cr.execute("UPDATE sync_client_update_to_send "131 cr.execute("UPDATE sync_client_update_to_send "
132 "SET sdref='ZMW' "132 "SET sdref='ZMW' "
133 "WHERE sdref='ZMK'")133 "WHERE sdref='ZMK'")
134 def us_1061_patch(self, cr, uid, *a, **b):
135 '''setup the size on all attachment'''
136 attachment_obj = self.pool.get('ir.attachment')
137 attachment_ids = attachment_obj.search(cr, uid, [])
138 vals = {}
139 for attachment in attachment_obj.browse(cr, uid, attachment_ids):
140 if attachment.datas and not attachment.size:
141 vals['size'] = attachment_obj.get_size(attachment.datas)
142 attachment_obj.write(cr, uid, attachment.id, vals)
143134
144 def us_898_patch(self, cr, uid, *a, **b):135 def us_898_patch(self, cr, uid, *a, **b):
145 context = {}136 context = {}
@@ -486,6 +477,7 @@
486 if self.pool.get('sync.server.update'):477 if self.pool.get('sync.server.update'):
487 cr.execute("delete from sync_server_update where values like '%msf_outgoing.field_product_product_is_keep_cool%' and model='msf_field_access_rights.field_access_rule_line'")478 cr.execute("delete from sync_server_update where values like '%msf_outgoing.field_product_product_is_keep_cool%' and model='msf_field_access_rights.field_access_rule_line'")
488479
480<<<<<<< TREE
489 def us_1185_patch(self, cr, uid, *a, **b):481 def us_1185_patch(self, cr, uid, *a, **b):
490 # AT HQ level: untick 8/9 top accounts for display in BS/PL report482 # AT HQ level: untick 8/9 top accounts for display in BS/PL report
491 user_rec = self.pool.get('res.users').browse(cr, uid, [uid])[0]483 user_rec = self.pool.get('res.users').browse(cr, uid, [uid])[0]
@@ -547,6 +539,8 @@
547 ir_obj.write(cr, uid, ir_ids, {'import_in_progress': False})539 ir_obj.write(cr, uid, ir_ids, {'import_in_progress': False})
548 return True540 return True
549541
542=======
543>>>>>>> MERGE-SOURCE
550patch_scripts()544patch_scripts()
551545
552546
553547
=== modified file 'bin/addons/msf_sync_data_server/__openerp__.py'
--- bin/addons/msf_sync_data_server/__openerp__.py 2015-10-23 07:16:45 +0000
+++ bin/addons/msf_sync_data_server/__openerp__.py 2016-05-24 07:58:03 +0000
@@ -27,12 +27,13 @@
27 'description': 'Data files for Sync Server',27 'description': 'Data files for Sync Server',
28 'author': 'MSF, OpenERP SA',28 'author': 'MSF, OpenERP SA',
29 'website': 'http://openerp.com',29 'website': 'http://openerp.com',
30 'depends': ['base', 'sync_server', 'msf_profile', 'sync_client', 'sync_so'],30 'depends': ['base', 'sync_server', 'msf_profile', 'sync_client', 'sync_so', 'msf_tools'],
31 'init_xml': [],31 'init_xml': [],
32 'data': [32 'data': [
33 'data/sync.server.group_type.csv',33 'data/sync.server.group_type.csv',
34 'data/sync_server.sync_rule.csv',34 'data/sync_server.sync_rule.csv',
35 'data/sync_server.message_rule.csv',35 'data/sync_server.message_rule.csv',
36 'data/automated_import_sync_groups.xml',
36 ],37 ],
37 'demo_xml': [38 'demo_xml': [
38 ],39 ],
3940
=== added file 'bin/addons/msf_sync_data_server/data/automated_import_sync_groups.xml'
--- bin/addons/msf_sync_data_server/data/automated_import_sync_groups.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_sync_data_server/data/automated_import_sync_groups.xml 2016-05-24 07:58:03 +0000
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <record id="auto_import_fnct_sync_groups" model="automated.import.function">
6 <field name="name">Import Sync. Groups</field>
7 <field name="model_id" model="ir.model" search="[('model', '=', 'sync.server.entity_group')]" />
8 <field name="method_to_call">import_data_from_csv</field>
9 </record>
10
11 <record id="auto_import_fnct_sync_group_type" model="automated.import.function">
12 <field name="name">Import Sync. Group Types</field>
13 <field name="model_id" model="ir.model" search="[('model', '=', 'sync.server.group_type')]" />
14 <field name="method_to_call">import_data_from_csv</field>
15 </record>
16
17 </data>
18</openerp>
0\ No newline at end of file19\ No newline at end of file
120
=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv'
--- bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv 2016-04-25 15:54:40 +0000
+++ bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv 2016-05-24 07:58:03 +0000
@@ -24,25 +24,25 @@
24USB_replicate_po,TRUE,TRUE,"['name', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'cross_docking_ok', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['approved', 'done'])]",partner_id,USB,purchase.order.usb_replicate_po,purchase.order,USB_replicate_po,2000,Valid24USB_replicate_po,TRUE,TRUE,"['name', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'cross_docking_ok', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['approved', 'done'])]",partner_id,USB,purchase.order.usb_replicate_po,purchase.order,USB_replicate_po,2000,Valid
25USB_replicate_fo,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['manual','done','progress'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_fo,2001,Valid25USB_replicate_fo,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['manual','done','progress'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_fo,2001,Valid
26USB_replicate_ir,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit','order_line/cost_price', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('procurement_request', '=', True), ('state', 'in', ['progress','done'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_ir,2003,Valid26USB_replicate_ir,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit','order_line/cost_price', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('procurement_request', '=', True), ('state', 'in', ['progress','done'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_ir,2003,Valid
27USB_replicate_in,TRUE,TRUE,"['name','subtype','rw_force_seq','from_wkf','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_in,stock.picking,USB_replicate_in,2010,Valid27USB_replicate_in,TRUE,TRUE,"['name','subtype','rw_force_seq','from_wkf','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_in,stock.picking,USB_replicate_in,2010,Valid
28USB_update_in_shipped_available,TRUE,TRUE,"['name','from_wkf','subtype','rw_force_seq','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['shipped']),('partner_id', '!=', False),('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_update_in_shipped_available,stock.picking,USB_update_in_shipped_available,2011,Valid28USB_update_in_shipped_available,TRUE,TRUE,"['name','from_wkf','subtype','rw_force_seq','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['shipped']),('partner_id', '!=', False),('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_update_in_shipped_available,stock.picking,USB_update_in_shipped_available,2011,Valid
29USB_cancel_in,TRUE,TRUE,"['name','subtype','origin']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['cancel']),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_cancel_in,stock.picking,USB_cancel_in,2012,Valid29USB_cancel_in,TRUE,TRUE,"['name','subtype','origin']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['cancel']),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_cancel_in,stock.picking,USB_cancel_in,2012,Valid
30USB_cancel_pick_out,TRUE,TRUE,"['name','subtype','origin']","[('type', '=', 'out'),('state', 'in', ['cancel']),('partner_id', '!=', False), ('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_cancel_pick_out,stock.picking,USB_cancel_pick_out,2013,Valid30USB_cancel_pick_out,TRUE,TRUE,"['name','subtype','origin']","[('type', '=', 'out'),('state', 'in', ['cancel']),('partner_id', '!=', False), ('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_cancel_pick_out,stock.picking,USB_cancel_pick_out,2013,Valid
31USB_create_partial_in,TRUE,TRUE,"['name','from_wkf','subtype','date_done','associate_pick_name','rw_force_seq','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/location_requestor_rw/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['done']),('already_replicated', '=',False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_create_partial_in,stock.picking,USB_create_partial_in,2015,Valid31USB_create_partial_in,TRUE,TRUE,"['name','from_wkf','subtype','date_done','associate_pick_name','rw_force_seq','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/location_requestor_rw/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['done']),('already_replicated', '=',False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_create_partial_in,stock.picking,USB_create_partial_in,2015,Valid
32USB_replicate_int,TRUE,TRUE,"['name','from_wkf','subtype','date_done','rw_force_seq','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'internal'),('subtype', '=', 'standard'),('state', 'in', ['assigned','done','confirmed']),('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_replicate_int,stock.picking,USB_replicate_int,2020,Valid32USB_replicate_int,TRUE,TRUE,"['name','from_wkf','subtype','date_done','rw_force_seq','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'internal'),('subtype', '=', 'standard'),('state', 'in', ['assigned','done','confirmed']),('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_replicate_int,stock.picking,USB_replicate_int,2020,Valid
33USB_create_partial_int_moves,TRUE,TRUE,"['name','from_wkf','date_done','subtype','associate_pick_name','rw_force_seq','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/location_requestor_rw/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'internal'),('subtype', '=', 'standard'),('state', 'in', ['done'])]",partner_id,USB,stock.picking.usb_create_partial_int_moves,stock.picking,USB_create_partial_int_moves,2021,Valid33USB_create_partial_int_moves,TRUE,TRUE,"['name','from_wkf','date_done','subtype','associate_pick_name','rw_force_seq','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/location_requestor_rw/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'internal'),('subtype', '=', 'standard'),('state', 'in', ['done'])]",partner_id,USB,stock.picking.usb_create_partial_int_moves,stock.picking,USB_create_partial_int_moves,2021,Valid
34USB_replicate_out,TRUE,TRUE,"['name','subtype','from_wkf','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id', 'backorder_id/id','backorder_id/name','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'standard'),('state', 'in', ['confirmed', 'assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_picking,stock.picking,USB_replicate_out,2030,Valid34USB_replicate_out,TRUE,TRUE,"['name','subtype','from_wkf','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id', 'backorder_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'standard'),('state', 'in', ['confirmed', 'assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_picking,stock.picking,USB_replicate_out,2030,Valid
35USB_replicate_pick,TRUE,TRUE,"['name','subtype','from_wkf','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id', 'backorder_id/id','backorder_id/name','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'picking'),('state', 'in', ['draft']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_picking,stock.picking,USB_replicate_pick,2031,Valid35USB_replicate_pick,TRUE,TRUE,"['name','subtype','from_wkf','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id', 'backorder_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'picking'),('state', 'in', ['draft']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_picking,stock.picking,USB_replicate_pick,2031,Valid
36USB_replicate_out_conso,TRUE,TRUE,"['name','subtype','from_wkf','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'standard'),('name', 'like', 'OUT-CONSO'),('state', '=', 'done'),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_picking,stock.picking,USB_replicate_out_conso,2032,Valid36USB_replicate_out_conso,TRUE,TRUE,"['name','subtype','from_wkf','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'standard'),('name', 'like', 'OUT-CONSO'),('state', '=', 'done'),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_picking,stock.picking,USB_replicate_out_conso,2032,Valid
37USB_convert_PICK_to_OUT,TRUE,TRUE,"['name','subtype','from_wkf','associate_pick_name','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('name', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_convert_pick_to_out,stock.picking,USB_convert_PICK_to_OUT,2035,Valid37USB_convert_PICK_to_OUT,TRUE,TRUE,"['name','subtype','from_wkf','associate_pick_name','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('name', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_convert_pick_to_out,stock.picking,USB_convert_PICK_to_OUT,2035,Valid
38USB_convert_OUT_to_PICK,TRUE,TRUE,"['name','subtype','from_wkf','associate_pick_name','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('name', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_convert_out_to_pick,stock.picking,USB_convert_OUT_to_PICK,2036,Valid38USB_convert_OUT_to_PICK,TRUE,TRUE,"['name','subtype','from_wkf','associate_pick_name','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('name', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_convert_out_to_pick,stock.picking,USB_convert_OUT_to_PICK,2036,Valid
39USB_closed_OUT_closes_OUT,TRUE,TRUE,"['name','subtype','from_wkf','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'standard'),('state', '=', 'done'),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_closed_out_closes_out,stock.picking,USB_closed_OUT_closes_OUT,2040,Valid39USB_closed_OUT_closes_OUT,TRUE,TRUE,"['name','subtype','from_wkf','date_done','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'standard'),('state', '=', 'done'),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_closed_out_closes_out,stock.picking,USB_closed_OUT_closes_OUT,2040,Valid
40USB_closed_new_PICK_closes_PICK,TRUE,TRUE,"['name','subtype','date_done','state','from_wkf','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'picking'),('state', 'in', ['done', 'assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_create_picking,stock.picking,USB_closed_new_PICK_closes_PICK,2041,Valid40USB_closed_new_PICK_closes_PICK,TRUE,TRUE,"['name','subtype','date_done','state','from_wkf','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'picking'),('state', 'in', ['done', 'assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_create_picking,stock.picking,USB_closed_new_PICK_closes_PICK,2041,Valid
41USB_replicate_PPL,TRUE,TRUE,"['name','subtype','from_wkf','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'ppl'),('state', 'in', ['done','assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_ppl,stock.picking,USB_replicate_PPL,2044,Valid41USB_replicate_PPL,TRUE,TRUE,"['name','subtype','from_wkf','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'ppl'),('state', 'in', ['done','assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_ppl,stock.picking,USB_replicate_PPL,2044,Valid
42USB_picking_return_products,TRUE,TRUE,['name'],"[('state', 'in',['fake'])]",partner_id,USB,stock.picking.usb_picking_return_products,stock.picking,usb_picking_return_products,2045,Valid42USB_picking_return_products,TRUE,TRUE,['name'],"[('state', 'in',['fake'])]",partner_id,USB,stock.picking.usb_picking_return_products,stock.picking,usb_picking_return_products,2045,Valid
43USB_Create_Packing_List,TRUE,TRUE,"['name','from_wkf','subtype','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','backorder_id/name','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit','move_lines/price_currency_id/id']","[('type', '=', 'out'),('subtype', '=', 'packing'),('state', 'in', ['draft','done','assigned']),('shipment_id', '!=', False),('backorder_id', '=', False),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_create_packing,stock.picking,USB_Create_Packing_List,2046,Valid43USB_Create_Packing_List,TRUE,TRUE,"['name','from_wkf','subtype','state','stock_journal_id/id','purchase_id/id', 'sale_id/id','origin','shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id','backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'out'),('subtype', '=', 'packing'),('state', 'in', ['draft','done','assigned']),('shipment_id', '!=', False),('backorder_id', '=', False),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_create_packing,stock.picking,USB_Create_Packing_List,2046,Valid
44USB_shipment_return_packs_shipment_draft,TRUE,TRUE,['name'],"[('state', 'in',['fake'])]",partner_id,USB,shipment.usb_shipment_return_packs_shipment_draft,shipment,usb_shipment_return_packs_shipment_draft,2047,Valid44USB_shipment_return_packs_shipment_draft,TRUE,TRUE,['name'],"[('state', 'in',['fake'])]",partner_id,USB,shipment.usb_shipment_return_packs_shipment_draft,shipment,usb_shipment_return_packs_shipment_draft,2047,Valid
45USB_Create_Shipment,TRUE,TRUE,"['shipper_address','address_id/id','date_of_departure','shipment_expected_date','invoice_id/id', 'consignee_date', 'shipper_name', 'carrier_address', 'registration', 'planned_date_of_arrival', 'partner_id', 'carrier_name', 'carrier_other', 'consignee_email', 'shipment_actual_date', 'shipper_date', 'parent_id/name', 'state', 'driver_name' , 'cargo_manifest_reference', 'carrier_signature', 'shipper_phone' , 'carrier_phone' , 'consignee_signature' , 'sequence_id' , 'carrier_email' , 'date', 'shipper_signature', 'carrier_date', 'name' , 'consignee_other', 'consignee_phone' , 'consignee_address', 'in_ref', 'transit_via', 'transport_type', 'shipper_email', 'partner_id2/id' , 'shipper_other' , 'consignee_name' , 'transport_order_id/id','pack_family_memory_ids/ppl_id/name','pack_family_memory_ids/from_pack','pack_family_memory_ids/to_pack','pack_family_memory_ids/description_ppl']","[('state', 'not in', ['draft']),('already_replicated', '=', False)]",partner_id,USB,shipment.usb_create_shipment,shipment,USB_Create_Shipment,2050,Valid45USB_Create_Shipment,TRUE,TRUE,"['shipper_address','address_id/id','date_of_departure','shipment_expected_date','invoice_id/id', 'consignee_date', 'shipper_name', 'carrier_address', 'registration', 'planned_date_of_arrival', 'partner_id', 'carrier_name', 'carrier_other', 'consignee_email', 'shipment_actual_date', 'shipper_date', 'parent_id/name', 'state', 'driver_name' , 'cargo_manifest_reference', 'carrier_signature', 'shipper_phone' , 'carrier_phone' , 'consignee_signature' , 'sequence_id' , 'carrier_email' , 'date', 'shipper_signature', 'carrier_date', 'name' , 'consignee_other', 'consignee_phone' , 'consignee_address', 'in_ref', 'transit_via', 'transport_type', 'shipper_email', 'partner_id2/id' , 'shipper_other' , 'consignee_name' , 'transport_order_id/id','pack_family_memory_ids/ppl_id/name','pack_family_memory_ids/from_pack','pack_family_memory_ids/to_pack']","[('state', 'not in', ['draft']),('already_replicated', '=', False)]",partner_id,USB,shipment.usb_create_shipment,shipment,USB_Create_Shipment,2050,Valid
46Usb_Shipment_Return_Packs,TRUE,TRUE,['name'],"[('state','in',['fake'])]",partner_id,USB,shipment.usb_shipment_return_packs,shipment,USB_Shipment_Return_Packs,2051,Valid46Usb_Shipment_Return_Packs,TRUE,TRUE,['name'],"[('state','in',['fake'])]",partner_id,USB,shipment.usb_shipment_return_packs,shipment,USB_Shipment_Return_Packs,2051,Valid
47USB_Validate_Shipment,TRUE,TRUE,['name'],"[('state', 'in', ['done']), ('already_rw_validated', '=', False),('parent_id', '!=', False)]",partner_id,USB,shipment.usb_set_validated_shipment,shipment,USB_Validate_Shipment,2055,Valid47USB_Validate_Shipment,TRUE,TRUE,['name'],"[('state', 'in', ['done']), ('already_rw_validated', '=', False),('parent_id', '!=', False)]",partner_id,USB,shipment.usb_set_validated_shipment,shipment,USB_Validate_Shipment,2055,Valid
48USB_Set_Delivered_Shipment,TRUE,TRUE,['name'],"[('state', 'in', ['delivered']), ('already_rw_delivered', '=', False), ('parent_id', '!=', False)]",partner_id,USB,shipment.usb_set_delivered_shipment,shipment,USB_Set_Delivered_Shipment,2056,Valid48USB_Set_Delivered_Shipment,TRUE,TRUE,['name'],"[('state', 'in', ['delivered']), ('already_rw_delivered', '=', False), ('parent_id', '!=', False)]",partner_id,USB,shipment.usb_set_delivered_shipment,shipment,USB_Set_Delivered_Shipment,2056,Valid
4949
=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv'
--- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2016-05-19 09:21:07 +0000
+++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2016-05-24 07:58:03 +0000
@@ -83,9 +83,15 @@
83msf_sync_data_server.budget,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('type','=','normal'), ('state', '!=', 'draft')]","['code', 'cost_center_id/id', 'currency_id/id', 'decision_moment_id/id', 'decision_moment_order', 'fiscalyear_id/id', 'name', 'type', 'version']",OC,msf.budget,,Budget,Valid,,43083msf_sync_data_server.budget,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('type','=','normal'), ('state', '!=', 'draft')]","['code', 'cost_center_id/id', 'currency_id/id', 'decision_moment_id/id', 'decision_moment_order', 'fiscalyear_id/id', 'name', 'type', 'version']",OC,msf.budget,,Budget,Valid,,430
84msf_sync_data_server.budget_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('budget_id','in',('msf.budget','id',[('type','=','normal'), ('state', '!=', 'draft')]))]","['account_id/id', 'budget_id/id', 'month1', 'month2', 'month3', 'month4', 'month5', 'month6', 'month7', 'month8', 'month9', 'month10', 'month11', 'month12', 'destination_id/id', 'line_type']",OC,msf.budget.line,,Budget line,Valid,,43184msf_sync_data_server.budget_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('budget_id','in',('msf.budget','id',[('type','=','normal'), ('state', '!=', 'draft')]))]","['account_id/id', 'budget_id/id', 'month1', 'month2', 'month3', 'month4', 'month5', 'month6', 'month7', 'month8', 'month9', 'month10', 'month11', 'month12', 'destination_id/id', 'line_type']",OC,msf.budget.line,,Budget line,Valid,,431
85msf_sync_data_server.budget_status,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('type','=','normal'), ('state', '!=', 'draft')]",['state'],OC,msf.budget,,Budget status,Valid,,43285msf_sync_data_server.budget_status,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('type','=','normal'), ('state', '!=', 'draft')]",['state'],OC,msf.budget,,Budget status,Valid,,432
86<<<<<<< TREE
86msf_sync_data_server.mission_stock_report,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('full_view', '=', False), ('local_report', '=', True)]","['full_view', 'instance_id/id', 'last_update', 'name']",OC,stock.mission.report,,Mission Stock Report,Valid,,44087msf_sync_data_server.mission_stock_report,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('full_view', '=', False), ('local_report', '=', True)]","['full_view', 'instance_id/id', 'last_update', 'name']",OC,stock.mission.report,,Mission Stock Report,Valid,,440
87msf_sync_data_server.mission_stock_report_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('mission_report_id.full_view', '=', False), ('mission_report_id.local_report', '=', True), ('international_status','in',['Local', 'Temporary'])]","['central_qty', 'central_val', 'cross_qty', 'cross_val', 'cu_qty', 'cu_val', 'in_pipe_coor_qty', 'in_pipe_coor_val', 'in_pipe_qty', 'in_pipe_val', 'internal_qty', 'internal_val', 'mission_report_id/id', 'product_id/id', 'secondary_qty', 'secondary_val', 'stock_qty', 'stock_val', 'xmlid_code']",MISSION,stock.mission.report.line,,Mission Stock Report Line,Valid,,44188msf_sync_data_server.mission_stock_report_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('mission_report_id.full_view', '=', False), ('mission_report_id.local_report', '=', True), ('international_status','in',['Local', 'Temporary'])]","['central_qty', 'central_val', 'cross_qty', 'cross_val', 'cu_qty', 'cu_val', 'in_pipe_coor_qty', 'in_pipe_coor_val', 'in_pipe_qty', 'in_pipe_val', 'internal_qty', 'internal_val', 'mission_report_id/id', 'product_id/id', 'secondary_qty', 'secondary_val', 'stock_qty', 'stock_val', 'xmlid_code']",MISSION,stock.mission.report.line,,Mission Stock Report Line,Valid,,441
88msf_sync_data_server.mission_stock_report_line_OC,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('mission_report_id.full_view', '=', False), ('mission_report_id.local_report', '=', True), ('international_status','in',['ITC', 'UniData', 'ESC', 'HQ'])]","['central_qty', 'central_val', 'cross_qty', 'cross_val', 'cu_qty', 'cu_val', 'in_pipe_coor_qty', 'in_pipe_coor_val', 'in_pipe_qty', 'in_pipe_val', 'internal_qty', 'internal_val', 'mission_report_id/id', 'product_id/id', 'secondary_qty', 'secondary_val', 'stock_qty', 'stock_val', 'xmlid_code']",OC,stock.mission.report.line,,Mission Stock Report Line OC,Valid,,44289msf_sync_data_server.mission_stock_report_line_OC,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('mission_report_id.full_view', '=', False), ('mission_report_id.local_report', '=', True), ('international_status','in',['ITC', 'UniData', 'ESC', 'HQ'])]","['central_qty', 'central_val', 'cross_qty', 'cross_val', 'cu_qty', 'cu_val', 'in_pipe_coor_qty', 'in_pipe_coor_val', 'in_pipe_qty', 'in_pipe_val', 'internal_qty', 'internal_val', 'mission_report_id/id', 'product_id/id', 'secondary_qty', 'secondary_val', 'stock_qty', 'stock_val', 'xmlid_code']",OC,stock.mission.report.line,,Mission Stock Report Line OC,Valid,,442
90=======
91msf_sync_data_server.mission_stock_report,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('full_view', '=', False)]","['full_view', 'instance_id/id', 'last_update', 'name']",OC,stock.mission.report,,Mission Stock Report,Valid,,440
92msf_sync_data_server.mission_stock_report_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Up,"[('mission_report_id.full_view', '=', False)]","['central_qty', 'central_val', 'cross_qty', 'cross_val', 'cu_qty', 'cu_val', 'in_pipe_coor_qty', 'in_pipe_coor_val', 'in_pipe_qty', 'in_pipe_val', 'internal_qty', 'internal_val', 'mission_report_id/id', 'product_id/id', 'secondary_qty', 'secondary_val', 'stock_qty', 'stock_val', 'xmlid_code']",MISSION,stock.mission.report.line,,Mission Stock Report Line,Valid,,441
93msf_sync_data_server.mission_stock_report_line_OC,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('mission_report_id.full_view', '=', False), '|','|',('international_status','=','ITC'),('international_status','=','ESC'),('international_status','=','HQ')]","['central_qty', 'central_val', 'cross_qty', 'cross_val', 'cu_qty', 'cu_val', 'in_pipe_coor_qty', 'in_pipe_coor_val', 'in_pipe_qty', 'in_pipe_val', 'internal_qty', 'internal_val', 'mission_report_id/id', 'product_id/id', 'secondary_qty', 'secondary_val', 'stock_qty', 'stock_val', 'xmlid_code', 'instance_id']",OC,stock.mission.report.line,instance_id,Mission Stock Report Line OC,Valid,,442
94>>>>>>> MERGE-SOURCE
89msf_sync_data_server.financing_contract_formats_fc,TRUE,TRUE,FALSE,TRUE,bidirectional,Bidirectional-Private,[],"['cost_center_ids/id', 'eligibility_from_date', 'eligibility_to_date', 'format_name', 'overhead_percentage', 'overhead_type', 'reporting_type', 'hidden_instance_id/id']",HQ + MISSION,financing.contract.format,hidden_instance_id,Financing Contract Formats FC,Valid,,45095msf_sync_data_server.financing_contract_formats_fc,TRUE,TRUE,FALSE,TRUE,bidirectional,Bidirectional-Private,[],"['cost_center_ids/id', 'eligibility_from_date', 'eligibility_to_date', 'format_name', 'overhead_percentage', 'overhead_type', 'reporting_type', 'hidden_instance_id/id']",HQ + MISSION,financing.contract.format,hidden_instance_id,Financing Contract Formats FC,Valid,,450
90msf_sync_data_server.financing_contract_formats,TRUE,TRUE,TRUE,TRUE,bidirectional,Bidirectional,"[('hidden_instance_id','=',False)]","['hidden_instance_id/id','cost_center_ids/id', 'eligibility_from_date', 'eligibility_to_date', 'format_name', 'overhead_percentage', 'overhead_type', 'reporting_type']",HQ + MISSION,financing.contract.format,,Financing Contract Formats,Valid,,45196msf_sync_data_server.financing_contract_formats,TRUE,TRUE,TRUE,TRUE,bidirectional,Bidirectional,"[('hidden_instance_id','=',False)]","['hidden_instance_id/id','cost_center_ids/id', 'eligibility_from_date', 'eligibility_to_date', 'format_name', 'overhead_percentage', 'overhead_type', 'reporting_type']",HQ + MISSION,financing.contract.format,,Financing Contract Formats,Valid,,451
91msf_sync_data_server.financing_contract_format_lines,TRUE,TRUE,TRUE,TRUE,bidirectional,Bidirectional,"[('instance_id', '=', False)]","['account_destination_ids/id', 'instance_id/id','allocated_budget_value', 'allocated_real_value', 'code', 'format_id/id', 'line_type', 'name', 'overhead_percentage', 'overhead_type', 'project_budget_value', 'project_real_value', 'is_quadruplet','quadruplet_update']",HQ + MISSION,financing.contract.format.line,,Financing Contract Format Lines,Valid,,45297msf_sync_data_server.financing_contract_format_lines,TRUE,TRUE,TRUE,TRUE,bidirectional,Bidirectional,"[('instance_id', '=', False)]","['account_destination_ids/id', 'instance_id/id','allocated_budget_value', 'allocated_real_value', 'code', 'format_id/id', 'line_type', 'name', 'overhead_percentage', 'overhead_type', 'project_budget_value', 'project_real_value', 'is_quadruplet','quadruplet_update']",HQ + MISSION,financing.contract.format.line,,Financing Contract Format Lines,Valid,,452
@@ -109,8 +115,13 @@
109msf_sync_data_server.price_list_version,FALSE,TRUE,FALSE,FALSE,bidirectional,Bidirectional,[],"['active', 'date_end', 'date_start', 'name', 'pricelist_id/id']",MISSION,product.pricelist.version,,Price List Version,Valid,,561115msf_sync_data_server.price_list_version,FALSE,TRUE,FALSE,FALSE,bidirectional,Bidirectional,[],"['active', 'date_end', 'date_start', 'name', 'pricelist_id/id']",MISSION,product.pricelist.version,,Price List Version,Valid,,561
110msf_sync_data_server.country_restrictions,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],['name'],MISSION,res.country.restriction,,Country restrictions,Valid,,570116msf_sync_data_server.country_restrictions,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],['name'],MISSION,res.country.restriction,,Country restrictions,Valid,,570
111msf_sync_data_server.country_code_mapping,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,[],"['instance_id/id', 'mapping_value']",COORDINATIONS,country.export.mapping,,Country Code Mapping,Valid,,571117msf_sync_data_server.country_code_mapping,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,[],"['instance_id/id', 'mapping_value']",COORDINATIONS,country.export.mapping,,Country Code Mapping,Valid,,571
118<<<<<<< TREE
112msf_sync_data_server.oc_product_creator_itc_esc_hq,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|','|','|',('international_status','=','UniData'),('international_status','=','ITC'),('international_status','=','ESC'),('international_status','=','HQ'), ('active', 'in', ['t','f'])]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'manufacturer_txt', 'manufacturer_ref', 'code', 'cold_chain/id', 'composed_kit', 'xmlid_code', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'active', 'state', 'old_code', 'new_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'volume_updated', 'soq_quantity', 'soq_weight', 'soq_volume']",OC,product.product,,"OC Product (Creator = ITC, ESC, UniData or HQ)",Valid,,600119msf_sync_data_server.oc_product_creator_itc_esc_hq,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|','|','|',('international_status','=','UniData'),('international_status','=','ITC'),('international_status','=','ESC'),('international_status','=','HQ'), ('active', 'in', ['t','f'])]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'manufacturer_txt', 'manufacturer_ref', 'code', 'cold_chain/id', 'composed_kit', 'xmlid_code', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'active', 'state', 'old_code', 'new_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'volume_updated', 'soq_quantity', 'soq_weight', 'soq_volume']",OC,product.product,,"OC Product (Creator = ITC, ESC, UniData or HQ)",Valid,,600
113msf_sync_data_server.mission_product_creator_local,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('international_status','=','Local'), ('active', 'in', ['t','f'])]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'manufacturer_txt', 'manufacturer_ref', 'code', 'xmlid_code','cold_chain/id', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'active', 'state', 'old_code', 'new_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'volume_updated', 'soq_quantity', 'soq_weight','soq_volume']",MISSION,product.product,,Mission Product (Creator = local),Valid,,601120msf_sync_data_server.mission_product_creator_local,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('international_status','=','Local'), ('active', 'in', ['t','f'])]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'manufacturer_txt', 'manufacturer_ref', 'code', 'xmlid_code','cold_chain/id', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'active', 'state', 'old_code', 'new_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'volume_updated', 'soq_quantity', 'soq_weight','soq_volume']",MISSION,product.product,,Mission Product (Creator = local),Valid,,601
121=======
122msf_sync_data_server.oc_product_creator_itc_esc_hq,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|','|','|',('international_status','=','UniData'),('international_status','=','ITC'),('international_status','=','ESC'),('international_status','=','HQ'), ('active', 'in', ['t','f'])]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'manufacturer_txt', 'manufacturer_ref', 'code', 'cold_chain/id', 'composed_kit', 'xmlid_code', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'active', 'state', 'old_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'volume_updated', 'soq_quantity', 'soq_weight', 'soq_volume']",OC,product.product,,"OC Product (Creator = ITC, ESC or HQ)",Valid,,600
123msf_sync_data_server.mission_product_creator_local,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('international_status','=','Local'), ('active', 'in', ['t','f'])]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'manufacturer_txt', 'manufacturer_ref', 'code', 'xmlid_code','cold_chain/id', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'active', 'state', 'old_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'volume_updated', 'soq_quantity', 'soq_weight','soq_volume']",MISSION,product.product,,Mission Product (Creator = local),Valid,,601
124>>>>>>> MERGE-SOURCE
114msf_sync_data_server.standard_product_list,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,"[('standard_list_ok','=','True')]","['creation_date', 'creator', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",OC,product.list,,Standard Product List,Valid,,605125msf_sync_data_server.standard_product_list,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,"[('standard_list_ok','=','True')]","['creation_date', 'creator', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",OC,product.list,,Standard Product List,Valid,,605
115msf_sync_data_server.standard_product_list_line,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name']",OC,product.list.line,,Standard Product List Line,Valid,,606126msf_sync_data_server.standard_product_list_line,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name']",OC,product.list.line,,Standard Product List Line,Valid,,606
116msf_sync_data_server.tax_code,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['code', 'info', 'name', 'notprintable', 'sign']",OC,account.tax.code,,Tax Code,Valid,,610127msf_sync_data_server.tax_code,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['code', 'info', 'name', 'notprintable', 'sign']",OC,account.tax.code,,Tax Code,Valid,,610
@@ -202,7 +213,7 @@
202msf_usb_sync_data_server.cp_all_partners_address,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['active', 'city', 'country_id/id', 'email', 'fax', 'function', 'mobile', 'name', 'partner_id/id', 'phone', 'state_id/id', 'street', 'street2', 'title/id', 'type', 'zip']",USB,res.partner.address,,[MASTER] Partner Address,Valid,,1662213msf_usb_sync_data_server.cp_all_partners_address,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['active', 'city', 'country_id/id', 'email', 'fax', 'function', 'mobile', 'name', 'partner_id/id', 'phone', 'state_id/id', 'street', 'street2', 'title/id', 'type', 'zip']",USB,res.partner.address,,[MASTER] Partner Address,Valid,,1662
203msf_usb_sync_data_server.cp_product_price_list,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['active', 'company_id/id', 'currency_id/id', 'currency_name', 'name', 'type']",USB,product.pricelist,,[MASTER] Product_price_list,Valid,,1670214msf_usb_sync_data_server.cp_product_price_list,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['active', 'company_id/id', 'currency_id/id', 'currency_name', 'name', 'type']",USB,product.pricelist,,[MASTER] Product_price_list,Valid,,1670
204msf_usb_sync_data_server.cp_country_restrictions,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],['name'],USB,res.country.restriction,,[MASTER] Country restrictions,Valid,,1680215msf_usb_sync_data_server.cp_country_restrictions,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],['name'],USB,res.country.restriction,,[MASTER] Country restrictions,Valid,,1680
205msf_usb_sync_data_server.cp_all_product,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['alert_time', 'batch_management', 'asset_type_id', 'categ_id/id', 'closed_article','manufacturer_txt', 'manufacturer_ref','code', 'cold_chain/id', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'xmlid_code', 'active', 'state', 'old_code', 'new_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume','volume_updated', 'soq_quantity', 'soq_weight','soq_volume']",USB,product.product,,[MASTER] Products,Valid,,1810216msf_usb_sync_data_server.cp_all_product,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['alert_time', 'batch_management', 'asset_type_id', 'categ_id/id', 'closed_article','manufacturer_txt', 'manufacturer_ref','code', 'cold_chain/id', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item/id', 'international_status/id', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'controlled_substance', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'xmlid_code', 'active', 'state', 'old_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume','volume_updated', 'soq_quantity', 'soq_weight','soq_volume']",USB,product.product,,[MASTER] Products,Valid,,1810
206msf_usb_sync_data_server.cp_standard_product_list,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,"[('standard_list_ok','=','True')]","['creation_date', 'creator', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",USB,product.list,,[MASTER] Standard Product List,Valid,,1820217msf_usb_sync_data_server.cp_standard_product_list,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,"[('standard_list_ok','=','True')]","['creation_date', 'creator', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",USB,product.list,,[MASTER] Standard Product List,Valid,,1820
207msf_usb_sync_data_server.cp_standard_product_list_line,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name/id']",USB,product.list.line,,[MASTER] Standard Product List Line,Valid,,1821218msf_usb_sync_data_server.cp_standard_product_list_line,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name/id']",USB,product.list.line,,[MASTER] Standard Product List Line,Valid,,1821
208msf_usb_sync_data_server.cp_composition_kit,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('state','=','completed'),('composition_type','=','theoretical')]","['active', 'composition_creation_date', 'composition_description', 'composition_product_id/id', 'composition_type', 'composition_version', 'composition_version_txt', 'name', 'state']",USB,composition.kit,,[MASTER] Theoretical Kit Composition List,Valid,,1830219msf_usb_sync_data_server.cp_composition_kit,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('state','=','completed'),('composition_type','=','theoretical')]","['active', 'composition_creation_date', 'composition_description', 'composition_product_id/id', 'composition_type', 'composition_version', 'composition_version_txt', 'name', 'state']",USB,composition.kit,,[MASTER] Theoretical Kit Composition List,Valid,,1830
209220
=== modified file 'bin/addons/msf_tools/__init__.py'
--- bin/addons/msf_tools/__init__.py 2012-04-04 07:07:34 +0000
+++ bin/addons/msf_tools/__init__.py 2016-05-24 07:58:03 +0000
@@ -15,8 +15,11 @@
15# GNU Affero General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU Affero General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this progrimport automated_import_job_progressam. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
22import msf_tools22import msf_tools
23import automated_import_function
24import automated_import
25import automated_import_job
2326
=== modified file 'bin/addons/msf_tools/__openerp__.py'
--- bin/addons/msf_tools/__openerp__.py 2013-03-18 16:15:46 +0000
+++ bin/addons/msf_tools/__openerp__.py 2016-05-24 07:58:03 +0000
@@ -24,6 +24,7 @@
24 "version": "1.0",24 "version": "1.0",
25 "depends": ["base",25 "depends": ["base",
26 "product",26 "product",
27 "object_query",
27 ],28 ],
28 "author": "MSF, TeMPO Consulting",29 "author": "MSF, TeMPO Consulting",
29 "website": "",30 "website": "",
@@ -33,7 +34,13 @@
33 """,34 """,
34 "init_xml": [35 "init_xml": [
35 ],36 ],
36 'update_xml': ['security/ir.model.access.csv',],37 'update_xml': [
38 'views/automated_import_view.xml',
39 'views/automated_import_function_view.xml',
40 'views/automated_import_job_view.xml',
41 'security/ir.model.access.csv',
42 'automated_import_data.xml',
43 ],
37 'demo_xml': [44 'demo_xml': [
38 ],45 ],
39 'test': [# tests should be performed in base classes to avoid cyclic dependencies46 'test': [# tests should be performed in base classes to avoid cyclic dependencies
4047
=== added file 'bin/addons/msf_tools/automated_import.py'
--- bin/addons/msf_tools/automated_import.py 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/automated_import.py 2016-05-24 07:58:03 +0000
@@ -0,0 +1,513 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2016 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (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 Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import os
23import time
24
25from osv import osv
26from osv import fields
27
28from tools.translate import _
29
30
31class automated_import(osv.osv):
32 _name = 'automated.import'
33
34 _columns = {
35 'name': fields.char(
36 size=128,
37 string='Name',
38 required=True,
39 ),
40 'src_path': fields.char(
41 size=512,
42 string='Source Path',
43 ),
44 'dest_path': fields.char(
45 size=512,
46 string='Destination Path',
47 ),
48 'report_path': fields.char(
49 size=512,
50 string='Report Path',
51 ),
52 'start_time': fields.datetime(
53 string='Date and time of first planned execution',
54 ),
55 'interval': fields.integer(
56 string='Interval number',
57 ),
58 'interval_unit': fields.selection(
59 selection=[
60 ('minutes', 'Minutes'),
61 ('hours', 'Hours'),
62 ('work_days', 'Work Days'),
63 ('days', 'Days'),
64 ('weeks', 'Weeks'),
65 ('months', 'Months'),
66 ],
67 string='Interval Unit',
68 ),
69 'function_id': fields.many2one(
70 'automated.import.function',
71 string='Functionality',
72 required=True,
73 ),
74 'active': fields.boolean(
75 string='Active',
76 readonly=True,
77 ),
78 'cron_id': fields.many2one(
79 'ir.cron',
80 string='Associated cron job',
81 readonly=True,
82 ),
83 'priority': fields.integer(
84 string='Priority',
85 required=True,
86 help="""Defines the priority of the automated import processing because some of them needs other data
87to import well some data (e.g: Product Categories needs Product nomenclatures)."""
88 ),
89 }
90
91 _defaults = {
92 'interval': lambda *a: 1,
93 'interval_unit': lambda *a: 'hours',
94 'active': lambda *a: False,
95 'priority': lambda *a: 10,
96 }
97
98 def unique_import_by_name(self, cr, uid, name, ids=None, context=None):
99 """
100 Check if no other automated.import with same name exists in the system
101 :param cr: Cursor to the database
102 :param uid: ID of the res.users that calls the method
103 :param name: Name of the automated.import to check
104 :param ids: List of ID of automated.import on which the test is made
105 :param context: Context of the call
106 :return: True or raise an error.
107 """
108 if context is None:
109 context = {}
110
111 if ids and isinstance(ids, (int, long)):
112 ids = [ids]
113
114 src_domain = [('name', '=', name), ('active', 'in', ['t', 'f'])]
115 if ids:
116 src_domain.append(('id', 'not in', ids))
117 if self.search(cr, uid, src_domain, limit=1, order='NO_ORDER', context=context):
118 raise osv.except_osv(
119 _('Error'),
120 _('''Another Automated import with same name already exists (maybe inactive). Automated import name
121must be unique. Please select an other name.'''),
122 )
123
124 return True
125
126 def unique_import_by_function(self, cr, uid, function_id, ids=None, context=None):
127 """
128 Check if no other automated.import with same fuctionality exists in the system
129 :param cr: Cursor to the database
130 :param uid: ID of the res.users that calls the method
131 :param function_id: Functionality of the automated.import to check
132 :param ids: List of ID of automated.import on which the test is made
133 :param context: Context of the call
134 :return: True or raise an error.
135 """
136 if context is None:
137 context = {}
138
139 if ids and isinstance(ids, (int, long)):
140 ids = [ids]
141
142 src_domain = [('function_id', '=', function_id), ('active', 'in', ['t', 'f'])]
143 if ids:
144 src_domain.append(('id', 'not in', ids))
145 if self.search(cr, uid, src_domain, limit=1, order='NO_ORDER', context=context):
146 raise osv.except_osv(
147 _('Error'),
148 _('''Another Automated import with same functionality already exists (maybe inactive). Only one
149automated import must be created for a same functionality. Please select an other functionality.'''),
150 )
151
152 return True
153
154 def job_in_progress(self, cr, uid, ids, context=None):
155 """
156 Check if there is job in progress for this automated import.
157 :param cr: Cursor to the database
158 :param uid: ID of the res.users that calls the method
159 :param ids: List of ID of automated.import on which the test is made
160 :param context: Context of the call
161 :return: Return True if there are jobs in progress
162 """
163 job_progress_obj = self.pool.get('automated.import.job.progress')
164
165 if context is None:
166 context = {}
167
168 if isinstance(ids, (int, long)):
169 ids = [ids]
170
171 # Use uid=1 to avoid return of only osv.memory that belongs to the current user
172 return job_progress_obj.search(cr, 1, [('import_id', 'in', ids)], limit=1, context=context)
173
174 def path_is_accessible(self, path, mode='r'):
175 """
176 Returns if the given path is accessible in the given mode
177 :param path: Local path to test
178 :param mode: Mode to test (can be 'r' for read, 'w' for write)
179 :return: True if the path is accessible or the error if not
180 """
181 msg = None
182 if not os.access(path, os.F_OK):
183 msg = _('Path \'%s\' doesn\'t exist!') % path
184 elif 'r' in mode and not os.access(path, os.R_OK):
185 msg = _('Read is not allowed on \'%s\'!') % path
186 elif 'w' in mode and not os.access(path, os.W_OK):
187 msg = _('Write is not allowed on \'%s\'!') % path
188
189 if msg:
190 raise osv.except_osv(_('Error'), msg)
191
192 return True
193
194 def run_job_manually(self, cr, uid, ids, context=None, params=None):
195 """
196 Create a new job with automated import parameters and display a view
197 to add a file to import. Then, run it if user clicks on Run or delete
198 it if user clicks on Cancel
199 :param cr: Cursor to the database
200 :param uid: ID of the res.users that calls this method
201 :param ids: List of ID of automated.import that must be ran
202 :param context: Context of the call
203 :param params: Manual parameters in case of manual customized run
204 :return: An action to go to the view of automated.import.job to add a file to import
205 """
206 job_obj = self.pool.get('automated.import.job')
207 data_obj = self.pool.get('ir.model.data')
208
209 if context is None:
210 context = {}
211
212 if isinstance(ids, (int, long)):
213 ids = [ids]
214
215 if params is None:
216 params = {}
217
218 for import_brw in self.browse(cr, uid, ids, context=context):
219 if not import_brw.src_path or not import_brw.dest_path or not import_brw.report_path:
220 raise osv.except_osv(
221 _('Error'),
222 _('You should define all paths before run manually this job !'),
223 )
224 params = {
225 'import_id': import_brw.id,
226 'state': 'draft',
227 }
228 job_id = job_obj.create(cr, uid, params, context=context)
229
230 return {
231 'type': 'ir.actions.act_window',
232 'res_model': job_obj._name,
233 'res_id': job_id,
234 'view_type': 'form',
235 'view_mode': 'form',
236 'view_id': [data_obj.get_object_reference(cr, uid, 'msf_tools', 'automated_import_job_file_view')[1]],
237 'target': 'new',
238 'context': context,
239 }
240
241
242 def run_job(self, cr, uid, ids, context=None, params=None):
243 """
244 Create a new job with automated import parameters and run it
245 :param cr: Cursor to the database
246 :param uid: ID of the res.users that calls this method
247 :param ids: List of ID of automated.import that must be ran
248 :param context: Context of the call
249 :param params: Manual parameters in case of manual customized run
250 :return: An action to go to the view of automated.import.job
251 """
252 job_obj = self.pool.get('automated.import.job')
253
254 if context is None:
255 context = {}
256
257 if isinstance(ids, (int, long)):
258 ids = [ids]
259
260 if params is None:
261 params = {}
262
263 for import_id in ids:
264 params = {
265 'import_id': import_id,
266 'state': 'in_progress',
267 }
268 job_id = job_obj.create(cr, uid, params, context=context)
269 cr.commit()
270 res = job_obj.process_import(cr, uid, [job_id], context=context)
271 cr.commit()
272
273 return res
274
275 def _generate_ir_cron(self, import_brw):
276 """
277 Returns the values for the ir.cron to create according to automated.import values
278 :param import_brw: automated.import browse_record
279 :return: A dictionary with values for ir.cron
280 """
281 # If no interval defined, stop the scheduled action
282 numbercall = -1
283 if not import_brw.interval:
284 numbercall = 0
285
286 return {
287 'name': _('[Automated import] %s') % import_brw.name,
288 'user_id': 1,
289 'active': import_brw.active,
290 'interval_number': import_brw.interval,
291 'interval_type': import_brw.interval_unit,
292 'numbercall': numbercall,
293 'nextcall': import_brw.start_time or time.strftime('%Y-%m-%d %H:%M:%S'),
294 'model': self._name,
295 'function': 'run_job',
296 'args': '(%s,)' % import_brw.id,
297 'priority': import_brw.priority,
298 }
299
300 def create(self, cr, uid, vals, context=None):
301 """
302 Create the automated.import record.
303 Make some checks (uniqueness of name, uniqueness of functionality...)
304 Create an ir_cron record and linked it to the new automated.import
305 :param cr: Cursor to the database
306 :param uid: ID of the res.users that calls the method
307 :param vals: Values for the new automated.import record
308 :param context: Context of the call
309 :return: The ID of the new automated.import created record
310 """
311 cron_obj = self.pool.get('ir.cron')
312
313 if context is None:
314 context = {}
315
316 # Make some checks
317 if vals.get('name', False):
318 self.unique_import_by_name(cr, uid, vals.get('name', False), context=context)
319
320 if vals.get('function_id', False):
321 self.unique_import_by_function(cr, uid, vals.get('function_id', False), context=context)
322
323 for path in [('src_path', 'r'), ('dest_path', 'w'), ('report_path', 'w')]:
324 if vals.get(path[0]):
325 self.path_is_accessible(vals.get(path[0]), path[1])
326
327 src_path = vals.get('src_path')
328 dest_path = vals.get('dest_path')
329 report_path = vals.get('report_path')
330 if src_path:
331 if src_path == dest_path:
332 raise osv.except_osv(
333 _('Error'),
334 _('You cannot have same directory for \'Source Path\' and \'Destination Path\''),
335 )
336 if src_path == report_path:
337 raise osv.except_osv(
338 _('Error'),
339 _('You cannot have same directory for \'Source Path\' and \'Report Path\''),
340 )
341
342 if vals.get('active') and not (src_path and dest_path and report_path):
343 raise osv.except_osv(
344 _('Error'),
345 _('Before activation, the different paths should be set.')
346 )
347
348 if vals.get('interval', 0.00) < 0:
349 raise osv.except_osv(
350 _('Error'),
351 _('Interval number cannot be negative !'),
352 )
353
354 # Call the super create
355 new_id = super(automated_import, self).create(cr, uid, vals, context=context)
356
357 # Generate new ir.cron
358 import_brw = self.browse(cr, uid, new_id, context=context)
359 cron_id = cron_obj.create(cr, uid, self._generate_ir_cron(import_brw), context=context)
360 self.write(cr, uid, [new_id], {'cron_id': cron_id}, context=context)
361
362 return new_id
363
364 def write(self, cr, uid, ids, vals, context=None):
365 """
366 Make some checks on new values (uniqueness of name, uniqueness of functionality...)
367 Update the ir_cron
368 Write new values on existing automated.import records
369 :param cr: Cursor to the database
370 :param uid: ID of the res.users that calls the method
371 :param ids: List of ID of automated.import records to write
372 :param vals: Values for the new automated.import record
373 :param context: Context of the call
374 :return: True
375 """
376 cron_obj = self.pool.get('ir.cron')
377
378 if context is None:
379 context = {}
380
381 if isinstance(ids, (int, long)):
382 ids = [ids]
383
384 # Make some checks
385 if vals.get('name', False):
386 self.unique_import_by_name(cr, uid, vals.get('name', False), ids, context=context)
387
388 if vals.get('function_id', False):
389 self.unique_import_by_function(cr, uid, vals.get('function_id', False), ids, context=context)
390
391 if vals.get('interval', 0.00) < 0:
392 raise osv.except_osv(
393 _('Error'),
394 _('Interval number cannot be negative !'),
395 )
396
397 res = super(automated_import, self).write(cr, uid, ids, vals, context=context)
398
399 for import_brw in self.browse(cr, uid, ids, context=context):
400 for path in [('src_path', 'r'), ('dest_path', 'w'), ('report_path', 'w')]:
401 if vals.get(path[0], import_brw[path[0]]):
402 self.path_is_accessible(vals.get(path[0], import_brw[path[0]]), path[1])
403
404 src_path = vals.get('src_path', import_brw.src_path)
405 dest_path = vals.get('dest_path', import_brw.dest_path)
406 report_path = vals.get('report_path', import_brw.report_path)
407 if src_path:
408 if src_path == dest_path:
409 raise osv.except_osv(
410 _('Error'),
411 _('You cannot have same directory for \'Source Path\' and \'Destination Path\''),
412 )
413 if src_path == report_path:
414 raise osv.except_osv(
415 _('Error'),
416 _('You cannot have same directory for \'Source Path\' and \'Report Path\''),
417 )
418
419 if vals.get('active', import_brw.active) and not (src_path and dest_path and report_path):
420 raise osv.except_osv(
421 _('Error'),
422 _('Before activation, the different paths should be set.')
423 )
424
425 cron_vals = self._generate_ir_cron(import_brw)
426 if import_brw.cron_id:
427 cron_obj.write(cr, uid, [import_brw.cron_id.id], cron_vals, context=context)
428 elif not vals.get('cron_id', False):
429 cron_id = cron_obj.create(cr, uid, cron_vals, context=context)
430 self.write(cr, uid, [import_brw.id], {'cron_id': cron_id}, context=context)
431
432 return res
433
434 def unlink(self, cr, uid, ids, context=None):
435 """
436 Delete the associated ir_cron
437 :param cr: Cursor to the database
438 :param uid: ID of the res.users that calls this method
439 :param ids: List of automated.import ID to remove
440 :param context: Context of the call
441 :return: True
442 """
443 cron_obj = self.pool.get('ir.cron')
444 job_obj = self.pool.get('automated.import.job')
445
446 if context is None:
447 context = {}
448
449 if isinstance(ids, (int, long)):
450 ids = [ids]
451
452 if job_obj.search(cr, uid, [('import_id', 'in', ids)], limit=1, order='NO_ORDER', context=context):
453 raise osv.except_osv(
454 _('Error'),
455 _('Please delete the automated import jobs that are linked to the Automatic import you try to delete!'),
456 )
457
458 for import_brw in self.browse(cr, uid, ids, context=context):
459 if import_brw.cron_id:
460 cron_obj.unlink(cr, uid, [import_brw.cron_id.id], context=context)
461
462 return super(automated_import, self).unlink(cr, uid, ids, context=context)
463
464 def copy(self, cr, uid, import_id, new_vals=None, context=None):
465 """
466 Display an error on copy as copy is not allowed on automated.import
467 :param cr: Cursor to the database
468 :param uid: ID of the res.users that calls this method
469 :param import_id: ID of the automated.import to copy
470 :param new_vals: Default values for the new automated.import record
471 :param context: Context of the call
472 :return: The ID of the new automated.import record
473 """
474 raise osv.except_osv(
475 _('Error'),
476 _('Copy is not allowed for Automated imports!'),
477 )
478
479 def active_import(self, cr, uid, ids, context=None):
480 """
481 Make the automated.import as active
482 :param cr: Cursor to the database
483 :param uid: ID of the res.users that calls this method
484 :param ids: List of ID of automated.import to activate
485 :param context: Context of the call
486 :return: True
487 """
488 if context is None:
489 context = {}
490
491 if isinstance(ids, (int, long)):
492 ids = [ids]
493
494 return self.write(cr, uid, ids, {'active': True}, context=context)
495
496 def deactive_import(self, cr, uid, ids, context=None):
497 """
498 Make the automated.import as inactive
499 :param cr: Cursor to the database
500 :param uid: ID of the res.users that calls this method
501 :param ids: List of ID of automated.import to activate
502 :param context: Context of the call
503 :return: True
504 """
505 if context is None:
506 context = {}
507
508 if isinstance(ids, (int, long)):
509 ids = [ids]
510
511 return self.write(cr, uid, ids, {'active': False}, context=context)
512
513automated_import()
0514
=== added file 'bin/addons/msf_tools/automated_import_data.xml'
--- bin/addons/msf_tools/automated_import_data.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/automated_import_data.xml 2016-05-24 07:58:03 +0000
@@ -0,0 +1,102 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <record id="auto_import_fnct_res_partner" model="automated.import.function">
6 <field name="name">Import Suppliers</field>
7 <field name="model_id" model="ir.model" search="[('model', '=', 'res.partner')]" />
8 <field name="method_to_call">import_data_from_csv</field>
9 </record>
10
11 <record id="auto_import_fnct_account_account" model="automated.import.function">
12 <field name="name">Import G/L Accounts</field>
13 <field name="model_id" model="ir.model" search="[('model', '=', 'account.account')]" />
14 <field name="method_to_call">import_data_from_csv</field>
15 </record>
16
17 <record id="auto_import_fnct_account_journal" model="automated.import.function">
18 <field name="name">Import G/L Journals</field>
19 <field name="model_id" model="ir.model" search="[('model', '=', 'account.journal')]" />
20 <field name="method_to_call">import_data_from_csv</field>
21 </record>
22
23 <record id="auto_import_fnct_analytic_account" model="automated.import.function">
24 <field name="name">Import Analytic Accounts</field>
25 <field name="model_id" model="ir.model" search="[('model', '=', 'account.analytic.account')]" />
26 <field name="method_to_call">import_data_from_csv</field>
27 </record>
28
29 <record id="auto_import_fnct_analytic_journal" model="automated.import.function">
30 <field name="name">Import Analytic Journals</field>
31 <field name="model_id" model="ir.model" search="[('model', '=', 'account.analytic.journal')]" />
32 <field name="method_to_call">import_data_from_csv</field>
33 </record>
34
35 <record id="auto_import_fnct_destination_account" model="automated.import.function">
36 <field name="name">Import Links between destinations and GL accounts</field>
37 <field name="model_id" model="ir.model" search="[('model', '=', 'account.analytic.account')]" />
38 <field name="method_to_call">import_data_from_csv</field>
39 </record>
40
41 <record id="auto_import_fnct_sync_product_nomenclature" model="automated.import.function">
42 <field name="name">Import Product Nomenclatures</field>
43 <field name="model_id" model="ir.model" search="[('model', '=', 'product.nomenclature')]" />
44 <field name="method_to_call">import_data_with_wizard</field>
45 </record>
46
47 <record id="auto_import_fnct_product_categories" model="automated.import.function">
48 <field name="name">Import Product Categories</field>
49 <field name="model_id" model="ir.model" search="[('model', '=', 'product.category')]" />
50 <field name="method_to_call">import_data_with_wizard</field>
51 </record>
52
53 <record id="auto_import_fnct_employee" model="automated.import.function">
54 <field name="name">Import Employees</field>
55 <field name="model_id" model="ir.model" search="[('model', '=', 'hr.employee')]" />
56 <field name="method_to_call">auto_import</field>
57 </record>
58
59 <record id="auto_import_fnct_product" model="automated.import.function">
60 <field name="name">Import Products</field>
61 <field name="model_id" model="ir.model" search="[('model', '=', 'product.product')]" />
62 <field name="method_to_call">import_data_with_wizard</field>
63 </record>
64
65 <record id="auto_import_fnct_access_control_list" model="automated.import.function">
66 <field name="name">Import Access Control Lists</field>
67 <field name="model_id" model="ir.model" search="[('model', '=', 'ir.model.access')]" />
68 <field name="method_to_call">import_data_from_csv</field>
69 </record>
70
71 <record id="auto_import_fnct_record_rules" model="automated.import.function">
72 <field name="name">Import Record Rules</field>
73 <field name="model_id" model="ir.model" search="[('model', '=', 'ir.rule')]" />
74 <field name="method_to_call">import_data_from_csv</field>
75 </record>
76
77 <record id="auto_import_fnct_window_actions" model="automated.import.function">
78 <field name="name">Import Window Actions</field>
79 <field name="model_id" model="ir.model" search="[('model', '=', 'ir.actions.act_window')]" />
80 <field name="method_to_call">import_data_from_csv</field>
81 </record>
82
83 <record id="auto_import_fnct_field_access_rule" model="automated.import.function">
84 <field name="name">Import Field Access Rules</field>
85 <field name="model_id" model="ir.model" search="[('model', '=', 'msf_field_access_rights.field_access_rule')]" />
86 <field name="method_to_call">import_data_from_csv</field>
87 </record>
88
89 <record id="auto_import_fnct_field_access_rule_lines" model="automated.import.function">
90 <field name="name">Import Field Access Rule Lines</field>
91 <field name="model_id" model="ir.model" search="[('model', '=', 'msf_field_access_rights.field_access_rule_line')]" />
92 <field name="method_to_call">import_data_from_csv</field>
93 </record>
94
95 <record id="auto_import_fnct_button_access_rules" model="automated.import.function">
96 <field name="name">Import Button Access Rules</field>
97 <field name="model_id" model="ir.model" search="[('model', '=', 'msf_button_access_rights.button_access_rule')]" />
98 <field name="method_to_call">import_data_from_csv</field>
99 </record>
100
101 </data>
102</openerp>
0103
=== added file 'bin/addons/msf_tools/automated_import_function.py'
--- bin/addons/msf_tools/automated_import_function.py 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/automated_import_function.py 2016-05-24 07:58:03 +0000
@@ -0,0 +1,107 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2016 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (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 Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv
23from osv import fields
24
25from tools.translate import _
26
27
28class automated_import_function(osv.osv):
29 _name = 'automated.import.function'
30
31 _columns = {
32 'name': fields.char(
33 size=64,
34 string='Name',
35 required=True,
36 ),
37 'model_id': fields.many2one(
38 'ir.model',
39 string='Model',
40 required=True,
41 ),
42 'method_to_call': fields.char(
43 size=128,
44 string='Method to call',
45 required=True,
46 ),
47 }
48
49 _defaults = {
50 'method_to_call': lambda *a: 'import_data_from_csv',
51 }
52
53 def check_method_to_call(self, cr, uid, model_id, method):
54 """
55 Check if the model implements the method
56 :param cr: Cursor to the database
57 :param uid: ID of the res.users that calls the method
58 :param model: ID of ir.model
59 :param method: method name
60 :return: Return True or False
61 """
62 model = self.pool.get('ir.model').browse(cr, uid, model_id)
63 if not hasattr(self.pool.get(model.model), method):
64 raise osv.except_osv(
65 _('Error'),
66 _('The method \'%s\' of the model \'%s\' is not callable') % (model.model, method),
67 )
68 return True
69
70 def create(self, cr, uid, vals, context=None):
71 """
72 Run the check on method to call before create the new record
73 :param cr: Cursor to the database
74 :param uid: ID of the res.users that calls this method
75 :param vals: Values to put on the new record
76 :param context: Context of the call
77 :return: ID of the new automated.import.function
78 """
79 if vals.get('model_id') and vals.get('method_to_call'):
80 self.check_method_to_call(cr, uid, vals.get('model_id'), vals.get('method_to_call'))
81
82 return super(automated_import_function, self).create(cr, uid, vals, context=context)
83
84 def write(self, cr, uid, ids, vals, context=None):
85 """
86 Run the check on method to call before update the record(s)
87 :param cr: Cursor to the database
88 :param uid: ID of the res.users that calls this method
89 :param ids: List of ID of automated.import.function record to update
90 :param vals: Values to put on the new record
91 :param context: Context of the call
92 :return: True
93 """
94 if isinstance(ids, (int, long)):
95 ids = [ids]
96
97 if vals.get('model_id') and vals.get('method_to_call'):
98 self.check_method_to_call(cr, uid, vals.get('model_id'), vals.get('method_to_call'))
99 elif vals.get('model_id') or vals.get('method_to_call'):
100 for rec in self.browse(cr, uid, ids, context=context):
101 model = vals.get('model_id', rec.model_id)
102 func = vals.get('method_to_call', rec.method_to_call)
103 self.check_method_to_call(cr, uid, model, func)
104
105 return super(automated_import_function, self).write(cr, uid, ids, vals, context=context)
106
107automated_import_function()
0\ No newline at end of file108\ No newline at end of file
1109
=== added file 'bin/addons/msf_tools/automated_import_job.py'
--- bin/addons/msf_tools/automated_import_job.py 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/automated_import_job.py 2016-05-24 07:58:03 +0000
@@ -0,0 +1,366 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2016 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (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 Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import os
23import csv
24import time
25import shutil
26import base64
27import hashlib
28
29from osv import osv
30from osv import fields
31
32from tools.translate import _
33
34
35def all_files_under(path):
36 """
37 Iterates through all files that are under the given path.
38 :param path: Path on which we want to iterate
39 """
40 for cur_path, dirnames, filenames in os.walk(path):
41 for filename in filenames:
42 yield os.path.join(cur_path, filename)
43
44
45def move_to_process_path(file, src_path, dest_path):
46 """
47 Move the file `file` from `src_path` to `dest_path`
48 :param file: Name of the file to move
49 :param src_path: Source folder
50 :param dest_path: Destination folder
51 :return: return True
52 """
53 srcname = os.path.join(src_path, file)
54 renamed = os.path.join(dest_path, '%s_%s' % (time.strftime('%Y%m%d_%H%M%S'), file))
55 shutil.move(srcname, renamed)
56 return True
57
58
59class automated_import_job(osv.osv):
60 _name = 'automated.import.job'
61
62 def _get_name(self, cr, uid, ids, field_name, args, context=None):
63 """
64 Build the name of the job by using the function_id and the date and time
65 :param cr: Cursor to the database
66 :param uid: ID of the res.users that calls this issue
67 :param ids: List of ID of automated.import.job to compute name
68 :param field_name: The name of the field to compute (here: name)
69 :param args: Additional parameters
70 :param context: Context of the call
71 :return: A dictionnary with automated.import.job ID as key and computed name as value
72 """
73 if context is None:
74 context = {}
75
76 if isinstance(ids, (int, long)):
77 ids = [ids]
78
79 res = {}
80 for job in self.browse(cr, uid, ids, context=context):
81 res[job.id] = '%s - %s' % (job.import_id.function_id.name, job.start_time or _('Not started'))
82
83 return res
84
85 _columns = {
86 'name': fields.function(
87 _get_name,
88 method=True,
89 type='char',
90 size=128,
91 string='Name',
92 store=True,
93 ),
94 'import_id': fields.many2one(
95 'automated.import',
96 string='Automated import',
97 required=True,
98 readonly=True,
99 ),
100 'file_to_import': fields.binary(
101 string='File to import',
102 ),
103 'filename': fields.char(
104 size=128,
105 string='Name of the file to import',
106 ),
107 'file_sum': fields.char(
108 string='Check sum',
109 size=256,
110 readonly=True,
111 ),
112 'start_time': fields.datetime(
113 string='Start time',
114 readonly=True,
115 ),
116 'end_time': fields.datetime(
117 string='End time',
118 readonly=True,
119 ),
120 'nb_processed_records': fields.integer(
121 string='# of processed records',
122 readonly=True,
123 ),
124 'nb_rejected_records': fields.integer(
125 string='# of rejected records',
126 readonly=True,
127 ),
128 'comment': fields.text(
129 string='Comment',
130 readonly=True,
131 ),
132 'state': fields.selection(
133 selection=[
134 ('draft', 'Draft'),
135 ('in_progress', 'In progress'),
136 ('done', 'Done'),
137 ('error', 'Exception'),
138 ],
139 string='State',
140 readonly=True,
141 required=True,
142 ),
143 }
144
145 _defaults = {
146 'state': lambda *a: 'draft',
147 }
148
149 def process_import(self, cr, uid, ids, context=None):
150 """
151 First, browse the source path, then select the oldest file and run import on this file.
152 After the processing of import, generate a report and move the processed file to the
153 processed folder.
154 :param cr: Cursor to the database
155 :param uid: ID of the res.users that calls this method
156 :param ids: List of ID of automated.import.job to process
157 :param context: Context of the call
158 :return: True
159 """
160 import_obj = self.pool.get('automated.import')
161 data_obj = self.pool.get('ir.model.data')
162
163 if context is None:
164 context = []
165
166 if isinstance(ids, (int, long)):
167 ids = [ids]
168
169 for job in self.browse(cr, uid, ids, context=context):
170 nb_rejected = 0
171 nb_processed = 0
172 start_time = time.strftime('%Y-%m-%d %H:%M:%S')
173 no_file = False
174 md5 = False
175 error = None
176 data64 = None
177 filename = False
178
179 try:
180 for path in [('src_path', 'r'), ('dest_path', 'w'), ('report_path', 'w')]:
181 import_obj.path_is_accessible(job.import_id[path[0]], path[1])
182 except osv.except_osv as e:
183 error = str(e)
184 # In case of manual processing, raise the error
185 if job.file_to_import:
186 raise e
187
188 if not job.file_to_import:
189 try:
190 oldest_file = min(all_files_under(job.import_id.src_path), key=os.path.getmtime)
191 filename = os.path.split(oldest_file)[1]
192 md5 = hashlib.md5(open(oldest_file).read()).hexdigest()
193 data64 = base64.encodestring(open(oldest_file).read())
194 except ValueError:
195 no_file = True
196
197 if not error:
198 if no_file:
199 error = _('No file to import in %s !') % job.import_id.src_path
200 elif md5 and self.search(cr, uid, [('import_id', '=', job.import_id.id), ('file_sum', '=', md5)], limit=1, order='NO_ORDER', context=context):
201 error = _('A file with same checksum has been already imported !')
202 move_to_process_path(filename, job.import_id.src_path, job.import_id.dest_path)
203
204 if error:
205 self.write(cr, uid, [job.id], {
206 'filename': filename,
207 'file_to_import': data64,
208 'start_time': start_time,
209 'end_time': time.strftime('%Y-%m-%d'),
210 'nb_processed_records': 0,
211 'nb_rejected_records': 0,
212 'comment': error,
213 'file_sum': md5,
214 'state': 'error',
215 }, context=context)
216 continue
217 else:
218 oldest_file = open(os.path.join(job.import_id.src_path, job.filename), 'wb+')
219 oldest_file.write(base64.decodestring(job.file_to_import))
220 oldest_file.close()
221 md5 = hashlib.md5(job.file_to_import).hexdigest()
222
223 if job.file_sum != md5:
224 if self.search(cr, uid, [('file_sum', '=', md5), ('id', '!=', job.id)], limit=1, order='NO_ORDER', context=context):
225 self.write(cr, uid, [job.id], {'file_sum': md5}, context=context)
226 return {
227 'type': 'ir.actions.act_window',
228 'res_model': self._name,
229 'res_id': ids[0],
230 'view_type': 'form',
231 'view_mode': 'form,tree',
232 'target': 'new',
233 'view_id': [data_obj.get_object_reference(cr, uid, 'msf_tools', 'automated_import_job_file_view')[1]],
234 'context': context,
235 }
236
237 oldest_file = os.path.join(job.import_id.src_path, job.filename)
238 filename = job.filename
239 data64 = base64.encodestring(job.file_to_import)
240
241 # Process import
242 try:
243 processed, rejected, headers = getattr(
244 self.pool.get(job.import_id.function_id.model_id.model),
245 job.import_id.function_id.method_to_call
246 )(cr, uid, oldest_file)
247 if processed:
248 nb_processed = self.generate_file_report(cr, uid, job, processed, headers)
249
250 if rejected:
251 nb_rejected = self.generate_file_report(cr, uid, job, rejected, headers, rejected=True)
252
253 self.write(cr, uid, [job.id], {
254 'filename': filename,
255 'start_time': start_time,
256 'end_time': time.strftime('%Y-%m-%d %H:%M:%S'),
257 'nb_processed_records': nb_processed,
258 'nb_rejected_records': nb_rejected,
259 'file_sum': md5,
260 'file_to_import': data64,
261 'state': 'done',
262 }, context=context)
263 except Exception as e:
264 self.write(cr, uid, [job.id], {
265 'filename': False,
266 'start_time': start_time,
267 'end_time': time.strftime('%Y-%m-%d'),
268 'nb_processed_records': 0,
269 'nb_rejected_records': 0,
270 'comment': str(e),
271 'file_sum': md5,
272 'file_to_import': data64,
273 'state': 'error',
274 }, context=context)
275 finally:
276 move_to_process_path(filename, job.import_id.src_path, job.import_id.dest_path)
277
278 return {
279 'type': 'ir.actions.act_window',
280 'res_model': self._name,
281 'res_id': ids[0],
282 'view_type': 'form',
283 'view_mode': 'form,tree',
284 'target': 'current',
285 'context': context,
286 }
287
288
289 def generate_file_report(self, cr, uid, job_brw, data_lines, headers, rejected=False):
290 """
291 Create a csv file that contains the processed lines and put this csv file
292 on the report_path directory and attach it to the automated.import.job.
293 :param cr: Cursor to the database
294 :param uid: ID of the res.users that calls this method
295 :param job_brw: browse_record of the automated.import.job that need a report
296 :param data_lines: List of tuple containing the line index and the line data
297 :param headers: List of field names in the file
298 :param rejected: If true, the data_lines tuple is composed of 3 members, else, composed of 2 members
299 :return: # of lines in file
300 """
301 att_obj = self.pool.get('ir.attachment')
302
303 filename = '%s_%s_%s.csv' % (
304 time.strftime('%Y%m%d_%H%M%S'),
305 job_brw.import_id.function_id.model_id.model,
306 rejected and 'rejected' or 'processed'
307 )
308 pth_filename = os.path.join(job_brw.import_id.report_path, filename)
309 delimiter = ','
310 quotechar = '"'
311
312 with open(pth_filename, 'wb') as csvfile:
313 spamwriter = csv.writer(csvfile, delimiter=delimiter, quotechar=quotechar, quoting=csv.QUOTE_MINIMAL)
314 headers_row = [_('Line number')] + headers
315 if rejected:
316 headers_row += [_('Error')]
317 spamwriter.writerow(headers_row)
318 for pl in data_lines:
319 pl_row = [pl[0]] + pl[1]
320 if rejected:
321 pl_row += [pl[2]]
322 spamwriter.writerow(pl_row)
323
324 csvfile = open(pth_filename, 'r')
325 att_obj.create(cr, uid, {
326 'name': filename,
327 'datas_fname': filename,
328 'description': '%s Lines' % (rejected and _('Rejected') or _('Processed')),
329 'res_model': 'automated.import.job',
330 'res_id': job_brw.id,
331 'datas': base64.encodestring(csvfile.read())
332 })
333
334 return len(data_lines)
335
336 def cancel_file_import(self, cr, uid, ids, context=None):
337 """
338 Delete the automated.import.job and close the wizard.
339 :param cr: Cursor to the database
340 :param uid: ID of the res.users that calls this method
341 :param ids: List of automated.import.job to delete
342 :param context: Context of the call
343 :return: The action to close the wizard
344 """
345 self.unlink(cr, uid, ids, context=context)
346 return {'type': 'ir.actions.act_window_close'}
347
348automated_import_job()
349
350
351class automated_import_job_progress(osv.osv_memory):
352 _name = 'automated.import.job.progress'
353
354 _columns = {
355 'job_id': fields.many2one(
356 'automated.import.job',
357 string='Import job',
358 required=True,
359 ),
360 'import_id': fields.related(
361 'automated.import',
362 string='Import',
363 ),
364 }
365
366automated_import_job_progress()
0367
=== modified file 'bin/addons/msf_tools/msf_tools.py'
--- bin/addons/msf_tools/msf_tools.py 2016-04-11 08:10:35 +0000
+++ bin/addons/msf_tools/msf_tools.py 2016-05-24 07:58:03 +0000
@@ -624,10 +624,7 @@
624 tr_split = name.split(',')624 tr_split = name.split(',')
625 res_id = self.pool.get('ir.model.data').find_sd_ref(cr, 1, sdref, field='res_id', context=context)625 res_id = self.pool.get('ir.model.data').find_sd_ref(cr, 1, sdref, field='res_id', context=context)
626 if res_id and tr_split[0] == 'product.template':626 if res_id and tr_split[0] == 'product.template':
627 prod = self.pool.get('product.product').read(cr, 1, [res_id], ['product_tmpl_id'], context=context)627 prod = self.pool.get('product.product').read(cr, 1, [res_id], ['product_tmpl_id'], context=context)[0]
628 if not prod:
629 return False
630 prod = prod[0]
631 if prod['product_tmpl_id']:628 if prod['product_tmpl_id']:
632 return prod['product_tmpl_id'][0]629 return prod['product_tmpl_id'][0]
633 return res_id630 return res_id
634631
=== added directory 'bin/addons/msf_tools/views'
=== added file 'bin/addons/msf_tools/views/automated_import_function_view.xml'
--- bin/addons/msf_tools/views/automated_import_function_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/views/automated_import_function_view.xml 2016-05-24 07:58:03 +0000
@@ -0,0 +1,58 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <record id="automated_import_function_search_view" model="ir.ui.view">
6 <field name="name">automated.import.function.search.view</field>
7 <field name="model">automated.import.function</field>
8 <field name="type">search</field>
9 <field name="arch" type="xml">
10 <search string="Automated import functions">
11 <field name="name" />
12 <field name="model_id" />
13 <field name="method_to_call" />
14 </search>
15 </field>
16 </record>
17
18 <record id="automated_import_function_tree_view" model="ir.ui.view">
19 <field name="name">automated.import.function.tree.view</field>
20 <field name="model">automated.import.function</field>
21 <field name="type">tree</field>
22 <field name="arch" type="xml">
23 <tree string="Automated import functions">
24 <field name="name" />
25 <field name="model_id" />
26 <field name="method_to_call" />
27 </tree>
28 </field>
29 </record>
30
31 <record id="automated_import_function_form_view" model="ir.ui.view">
32 <field name="name">automated.import.function.form.view</field>
33 <field name="model">automated.import.function</field>
34 <field name="type">form</field>
35 <field name="arch" type="xml">
36 <form string="Automated import function">
37 <field name="name" />
38 <newline />
39 <field name="model_id" />
40 <field name="method_to_call" />
41 </form>
42 </field>
43 </record>
44
45 <record id="automated_import_function_action" model="ir.actions.act_window">
46 <field name="name">Automated import functions</field>
47 <field name="res_model">automated.import.function</field>
48 <field name="view_type">form</field>
49 <field name="view_mode">tree,form</field>
50 </record>
51
52 <menuitem
53 id="automated_import_function_menu"
54 action="automated_import_function_action"
55 parent="automated_import_menu" />
56
57 </data>
58</openerp>
0\ No newline at end of file59\ No newline at end of file
160
=== added file 'bin/addons/msf_tools/views/automated_import_job_view.xml'
--- bin/addons/msf_tools/views/automated_import_job_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/views/automated_import_job_view.xml 2016-05-24 07:58:03 +0000
@@ -0,0 +1,120 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <record id="automated_import_job_search_view" model="ir.ui.view">
6 <field name="name">automated.import.job.search.view</field>
7 <field name="model">automated.import.job</field>
8 <field name="type">search</field>
9 <field name="arch" type="xml">
10 <search string="Import job requests">
11 <filter icon="terp-document-new" string="Draft" name="draft" domain="[('state', '=', 'draft')]" help="Draft jobs" />
12 <filter icon="terp-gnome-cpu-frequency-applet+" string="In progress" name="in_progress" domain="[('state', '=', 'in_progress')]" help="In progress jobs" />
13 <filter icon="terp-dialog-close" string="Done" name="done" domain="[('state', '=', 'done')]" help="Done jobs" />
14 <filter icon="terp-emblem-important" string="Exception" name="exceptions" domain="[('state', '=', 'error')]" help="Jobs with error" />
15 <separator orientation="vertical" />
16 <field name="import_id" />
17 <field name="start_time" />
18 <field name="end_time" />
19 </search>
20 </field>
21 </record>
22
23 <record id="automated_import_job_tree_view" model="ir.ui.view">
24 <field name="name">automated.import.job.tree.view</field>
25 <field name="model">automated.import.job</field>
26 <field name="type">tree</field>
27 <field name="arch" type="xml">
28 <tree string="Import job reports" noteditable="True" hide_new_button="True">
29 <field name="import_id" />
30 <field name="start_time" />
31 <field name="end_time" />
32 <field name="state" />
33 </tree>
34 </field>
35 </record>
36
37 <record id="automated_import_job_form_view" model="ir.ui.view">
38 <field name="name">automated.import.job.form.view</field>
39 <field name="model">automated.import.job</field>
40 <field name="type">form</field>
41 <field name="arch" type="xml">
42 <form string="Import job report">
43 <field name="import_id" />
44 <field name="start_time" />
45 <field name="end_time" />
46 <separator colspan="4" string="Import file" />
47 <field name="file_to_import" readonly="True" filename="filename" />
48 <field name="filename" invisible="1" />
49 <separator colspan="4" string="Import results" />
50 <field name="nb_processed_records" />
51 <field name="nb_rejected_records" />
52 <field name="comment" colspan="4" />
53 <separator colspan="4" string="States" />
54 <field name="state" />
55 <button name="process_import" type="object" states="draft" string="Process import" icon="gtk-execute" />
56 </form>
57 </field>
58 </record>
59
60 <record id="automated_import_job_file_view" model="ir.ui.view">
61 <field name="name">automated.import.job.file.view</field>
62 <field name="model">automated.import.job</field>
63 <field name="type">form</field>
64 <field name="priority" eval="99" />
65 <field name="arch" type="xml">
66 <form string="Automated import job">
67 <field name="file_sum" invisible="1" />
68 <separator colspan="4" string="Import file" />
69 <group colspan="4" attrs="{'invisible': [('file_sum', '!=', False)]}">
70 <html>
71 <style>
72 #explanation_message_unifield div
73 {
74 font-weight: bold;
75 font-size: 1.2em;
76 }
77 </style>
78 <div id="explanation_message_unifield">
79 <label colspan="4" string="If no file is selected, the system will try to get the oldest file in the source path." align="0.0" />
80 </div>
81 </html>
82 </group>
83 <group colspan="4" attrs="{'invisible': [('file_sum', '=', False)]}">
84 <html>
85 <style>
86 #warning_message_unifield div
87 {
88 font-weight: bold;
89 font-size: 1.2em;
90 color: red;
91 }
92 </style>
93 <div id="warning_message_unifield">
94 <label colspan="4" string="The file you selected has already been imported in the past. Are you sure you want to import it ?" align="0.0" />
95 </div>
96 </html>
97 </group>
98 <field name="file_to_import" filename="filename" />
99 <field name="filename" invisible="1" />
100 <separator colspan="4" string="Actions" />
101 <button name="cancel_file_import" type="object" string="Cancel" icon="gtk-cancel" colspan="2" />
102 <button name="process_import" type="object" string="Run job" icon="gtk-execute" colspan="2" />
103 </form>
104 </field>
105 </record>
106
107 <record id="automated_import_job_action" model="ir.actions.act_window">
108 <field name="name">Import job reports</field>
109 <field name="res_model">automated.import.job</field>
110 <field name="view_type">form</field>
111 <field name="view_mode">tree,form</field>
112 </record>
113
114 <menuitem
115 id="automated_import_job_menu"
116 action="automated_import_job_action"
117 parent="automated_import_menu" />
118
119 </data>
120</openerp>
0121
=== added file 'bin/addons/msf_tools/views/automated_import_view.xml'
--- bin/addons/msf_tools/views/automated_import_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_tools/views/automated_import_view.xml 2016-05-24 07:58:03 +0000
@@ -0,0 +1,77 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <record id="automated_import_search_view" model="ir.ui.view">
6 <field name="name">automated.import.search.view</field>
7 <field name="model">automated.import</field>
8 <field name="type">search</field>
9 <field name="arch" type="xml">
10 <search string="Automated imports">
11 <filter name="active" domain="[('active', '=', False)]" string="Inactive" icon="gtk-undo" />
12 <field name="name" />
13 <field name="function_id" />
14 </search>
15 </field>
16 </record>
17
18 <record id="automated_import_tree_view" model="ir.ui.view">
19 <field name="name">automated.import.tree.view</field>
20 <field name="model">automated.import</field>
21 <field name="type">tree</field>
22 <field name="arch" type="xml">
23 <tree string="Automated imports">
24 <field name="name" />
25 <field name="function_id" />
26 <field name="start_time" />
27 <field name="interval" />
28 <field name="interval_unit" />
29 </tree>
30 </field>
31 </record>
32
33 <record id="automated_import_form_view" model="ir.ui.view">
34 <field name="name">automated.import.form.view</field>
35 <field name="model">automated.import</field>
36 <field name="type">form</field>
37 <field name="arch" type="xml">
38 <form string="Automated import">
39 <separator colspan="4" string="General configuration" />
40 <field name="name" />
41 <field name="function_id" widget="selection" />
42 <field name="active" />
43 <button name="run_job_manually" string="Run job manually" colspan="2" type="object" icon="gtk-execute" />
44 <separator colspan="4" string="Paths configuration" />
45 <field name="src_path" colspan="4" attrs="{'required': [('active', '=', True)]}" />
46 <field name="dest_path" colspan="4" attrs="{'required': [('active', '=', True)]}" />
47 <field name="report_path" colspan="4" attrs="{'required': [('active', '=', True)]}" />
48 <separator colspan="4" string="Scheduler configuration" />
49 <group colspan="4" col="6">
50 <field name="priority" />
51 <field name="interval" attrs="{'required': [('interval_unit', '&gt;', 0)]}" />
52 <field name="interval_unit" />
53 <field name="start_time" />
54 </group>
55 <separator colspan="4" string="Activation" />
56 <group colspan="4" col="1">
57 <button name="active_import" string="Activate" colspan="1" type="object" icon="gtk-execute" attrs="{'invisible': [('active', '=', True)]}" />
58 <button name="deactive_import" string="De-activate" colspan="1" type="object" icon="gtk-execute" attrs="{'invisible': [('active', '=', False)]}" />
59 </group>
60 </form>
61 </field>
62 </record>
63
64 <record id="automated_import_action" model="ir.actions.act_window">
65 <field name="name">Automated imports</field>
66 <field name="res_model">automated.import</field>
67 <field name="view_type">form</field>
68 <field name="view_mode">tree,form</field>
69 </record>
70
71 <menuitem
72 id="automated_import_menu"
73 action="automated_import_action"
74 parent="object_query.menu_preferences" />
75
76 </data>
77</openerp>
078
=== modified file 'bin/addons/procurement_request/procurement_request.py'
--- bin/addons/procurement_request/procurement_request.py 2016-05-02 07:56:36 +0000
+++ bin/addons/procurement_request/procurement_request.py 2016-05-24 07:58:03 +0000
@@ -497,10 +497,8 @@
497 self.write(cr, uid, ids, {'state': 'cancel'}, context=context)497 self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
498 self.pool.get('sale.order.line').write(cr, uid, line_ids, {'state': 'cancel'}, context=context)498 self.pool.get('sale.order.line').write(cr, uid, line_ids, {'state': 'cancel'}, context=context)
499499
500 for ir in self.read(cr, uid, ids, ['name'], context=context):500 for ir_id in ids:
501 self.infolog(cr, uid, "The IR id:%s (%s) has been canceled" % (501 self.infolog(cr, uid, "The IR id:%s has been canceled" % ir_id)
502 ir['id'], ir['name'],
503 ))
504502
505 return True503 return True
506504
@@ -539,9 +537,6 @@
539 if nb_lines:537 if nb_lines:
540 raise osv.except_osv(_('Error'), _('Please check the lines : you cannot have "To Be confirmed" for Nomenclature Level". You have %s lines to correct !') % nb_lines)538 raise osv.except_osv(_('Error'), _('Please check the lines : you cannot have "To Be confirmed" for Nomenclature Level". You have %s lines to correct !') % nb_lines)
541 self.log(cr, uid, req.id, _("The internal request '%s' has been validated (nb lines: %s).") % (req.name, len(req.order_line)), context=context)539 self.log(cr, uid, req.id, _("The internal request '%s' has been validated (nb lines: %s).") % (req.name, len(req.order_line)), context=context)
542 self.infolog(cr, uid, "The internal request id:%s (%s) has been validated." % (
543 req.id, req.name,
544 ))
545 line_obj.update_supplier_on_line(cr, uid, line_ids, context=context)540 line_obj.update_supplier_on_line(cr, uid, line_ids, context=context)
546 line_obj.write(cr, uid, reset_soq, {'soq_updated': False,}, context=context)541 line_obj.write(cr, uid, reset_soq, {'soq_updated': False,}, context=context)
547 self.write(cr, uid, ids, {'state': 'validated'}, context=context)542 self.write(cr, uid, ids, {'state': 'validated'}, context=context)
548543
=== modified file 'bin/addons/purchase_override/purchase.py'
--- bin/addons/purchase_override/purchase.py 2016-05-19 07:37:10 +0000
+++ bin/addons/purchase_override/purchase.py 2016-05-24 07:58:03 +0000
@@ -1103,9 +1103,6 @@
11031103
1104 message = _("Purchase order '%s' is validated.") % (po.name,)1104 message = _("Purchase order '%s' is validated.") % (po.name,)
1105 self.log(cr, uid, po.id, message)1105 self.log(cr, uid, po.id, message)
1106 self.infolog(cr, uid, "Purchase order id:%s (%s) is validated." % (
1107 po.id, po.name,
1108 ))
1109 # hook for corresponding Fo update1106 # hook for corresponding Fo update
1110 self._hook_confirm_order_update_corresponding_so(cr, uid, ids, context=context, po=po)1107 self._hook_confirm_order_update_corresponding_so(cr, uid, ids, context=context, po=po)
11111108
@@ -1235,9 +1232,8 @@
1235 vals.update({'order_id': l.link_so_id.original_so_id_sale_order.id,1232 vals.update({'order_id': l.link_so_id.original_so_id_sale_order.id,
1236 'state': 'done'})1233 'state': 'done'})
1237 sol_id = sol_obj.create(cr, uid, vals, context=context)1234 sol_id = sol_obj.create(cr, uid, vals, context=context)
1238 self.infolog(cr, uid, "The FO/IR line id:%s (line number: %s) has been added from the PO line id:%s (line number: %s)" % (1235 self.infolog(cr, uid, "The FO/IR line id:%s has been added from the PO line id:%s" % (
1239 sol_id, sol_obj.read(cr, uid, sol_id, ['line_number'], context=context)['line_number'],1236 sol_id, l.id,
1240 l.id, l.line_number,
1241 ))1237 ))
1242 context['sale_id'] = tmp_sale_context1238 context['sale_id'] = tmp_sale_context
12431239
@@ -1265,9 +1261,8 @@
1265 pick_obj.action_confirm(cr, uid, pick_to_confirm, context=context)1261 pick_obj.action_confirm(cr, uid, pick_to_confirm, context=context)
12661262
1267 sol_ids.add(l.link_so_id.id)1263 sol_ids.add(l.link_so_id.id)
1268 self.infolog(cr, uid, "The FO/IR line id:%s (line number: %s) has been added from the PO line id:%s (line number: %s)" % (1264 self.infolog(cr, uid, "The FO/IR line id:%s has been added from the PO line id:%s" % (
1269 new_line_id, sol_obj.read(cr, uid, new_line_id, ['line_number'], context=context)['line_number'],1265 new_line_id, l.id,
1270 l.id, l.line_number,
1271 ))1266 ))
12721267
1273 if sol_ids:1268 if sol_ids:
@@ -1330,7 +1325,7 @@
1330 context['wait_order'] = True1325 context['wait_order'] = True
1331 self._hook_confirm_order_update_corresponding_so(cr, uid, ids, context=context, po=po, so_ids=so_ids)1326 self._hook_confirm_order_update_corresponding_so(cr, uid, ids, context=context, po=po, so_ids=so_ids)
1332 del context['wait_order']1327 del context['wait_order']
1333 self.infolog(cr, uid, "The PO id:%s (%s) has been confirmed" % (po.id, po.name))1328 self.infolog(cr, uid, "The PO id:%s has been confirmed" % po.id)
13341329
1335 return True1330 return True
13361331
@@ -3413,10 +3408,8 @@
34133408
3414 res = super(purchase_order_line, self).unlink(cr, uid, ids, context=context)3409 res = super(purchase_order_line, self).unlink(cr, uid, ids, context=context)
34153410
3416 for pol in self.read(cr, uid, ids, ['line_number'], context=context):3411 for pol_id in ids:
3417 self.infolog(cr, uid, "The PO/RfQ line id:%s (line number: %s) has been deleted" % (3412 self.infolog(cr, uid, "The PO/RfQ line id:%s has been deleted" % pol_id)
3418 pol['id'], pol['name'],
3419 ))
34203413
3421 po_obj.wkf_confirm_trigger(cr, uid, order_ids, context=context)3414 po_obj.wkf_confirm_trigger(cr, uid, order_ids, context=context)
34223415
34233416
=== modified file 'bin/addons/register_accounting/account_move_line.py'
--- bin/addons/register_accounting/account_move_line.py 2016-04-18 14:37:27 +0000
+++ bin/addons/register_accounting/account_move_line.py 2016-05-24 07:58:03 +0000
@@ -77,7 +77,7 @@
77 ('state', '=', 'valid'),77 ('state', '=', 'valid'),
78 ('move_state', '=', 'posted'), # UFTP-204: Exclude the Direct Invoice from the list78 ('move_state', '=', 'posted'), # UFTP-204: Exclude the Direct Invoice from the list
79 ('journal_id.type', 'not in', ['migration']), # US-70 Open the pending payment to receivable and payable entries from all journals except for the migration journal79 ('journal_id.type', 'not in', ['migration']), # US-70 Open the pending payment to receivable and payable entries from all journals except for the migration journal
80 ('account_id.type_for_register', 'not in', ['down_payment', 'advance', 'donation', ]),80 ('account_id.type_for_register', 'not in', ['down_payment', 'advance', ]),
81 # UTP-1088 exclude correction/reversal lines as can be in journal of type correction81 # UTP-1088 exclude correction/reversal lines as can be in journal of type correction
82 ('corrected_line_id', '=', False), # is a correction line if has a corrected line82 ('corrected_line_id', '=', False), # is a correction line if has a corrected line
83 ('reversal_line_id', '=', False), # is a reversal line if a reversed line83 ('reversal_line_id', '=', False), # is a reversal line if a reversed line
8484
=== modified file 'bin/addons/sale_override/sale.py'
--- bin/addons/sale_override/sale.py 2016-05-10 09:47:26 +0000
+++ bin/addons/sale_override/sale.py 2016-05-24 07:58:03 +0000
@@ -635,13 +635,7 @@
635635
636 context.update({'no_check_line': True})636 context.update({'no_check_line': True})
637 self.write(cr, uid, ids, {'delivery_confirmed_date': time.strftime('%Y-%m-%d')}, context=context)637 self.write(cr, uid, ids, {'delivery_confirmed_date': time.strftime('%Y-%m-%d')}, context=context)
638 res = super(sale_order, self).action_cancel(cr, uid, ids, context=context)638 return super(sale_order, self).action_cancel(cr, uid, ids, context=context)
639 for order in self.browse(cr, uid, ids, context=context):
640 self.infolog(cr, uid, "The %s id:%s (%s) has been canceled." % (
641 order.procurement_request and 'Internal request' or 'Field order',
642 order.id, order.name,
643 ))
644 return res
645639
646 #@@@override sale.sale_order._invoiced640 #@@@override sale.sale_order._invoiced
647 def _invoiced(self, cr, uid, ids, name, arg, context=None):641 def _invoiced(self, cr, uid, ids, name, arg, context=None):
@@ -814,9 +808,6 @@
814 get function values808 get function values
815 '''809 '''
816 result = {}810 result = {}
817 if context is None:
818 context = {}
819
820 for obj in self.browse(cr, uid, ids, context=context):811 for obj in self.browse(cr, uid, ids, context=context):
821 result[obj.id] = {}812 result[obj.id] = {}
822 for f in fields:813 for f in fields:
@@ -827,10 +818,8 @@
827 if obj.state == 'done' and obj.split_type_sale_order == 'original_sale_order' and not obj.procurement_request:818 if obj.state == 'done' and obj.split_type_sale_order == 'original_sale_order' and not obj.procurement_request:
828 result[obj.id]['state_hidden_sale_order'] = 'split_so'819 result[obj.id]['state_hidden_sale_order'] = 'split_so'
829820
830 if obj.state_hidden_sale_order != result[obj.id]['state_hidden_sale_order'] and \821 if obj.state_hidden_sale_order != result[obj.id]['state_hidden_sale_order']:
831 (not obj.original_so_id_sale_order or obj.state_hidden_sale_order not in (False, 'draft')):822 self.add_audit_line(cr, uid, obj.id,
832 real_uid = context.get('computed_for_uid', uid)
833 self.add_audit_line(cr, real_uid, obj.id,
834 obj.state_hidden_sale_order,823 obj.state_hidden_sale_order,
835 result[obj.id]['state_hidden_sale_order'],824 result[obj.id]['state_hidden_sale_order'],
836 context=context)825 context=context)
@@ -1330,10 +1319,8 @@
1330 for order in order_brw_list:1319 for order in order_brw_list:
1331 if not order.procurement_request:1320 if not order.procurement_request:
1332 self.log(cr, uid, order.id, 'The Field order \'%s\' has been validated (nb lines: %s).' % (order.name, len(order.order_line)), context=context)1321 self.log(cr, uid, order.id, 'The Field order \'%s\' has been validated (nb lines: %s).' % (order.name, len(order.order_line)), context=context)
1333 self.infolog(cr, uid, "The Field order id:%s (%s) has been validated." % (order.id, order.name))
1334 else:1322 else:
1335 self.log(cr, uid, order.id, 'The Internal Request \'%s\' has been validated (nb lines: %s).' % (order.name, len(order.order_line)), context=context)1323 self.log(cr, uid, order.id, 'The Internal Request \'%s\' has been validated (nb lines: %s).' % (order.name, len(order.order_line)), context=context)
1336 self.infolog(cr, uid, "The Internal request id:%s (%s) has been validated." % (order.id, order.name))
13371324
1338 return True1325 return True
13391326
@@ -1421,9 +1408,6 @@
1421 'original_so_id_sale_order': so.id}, context=dict(context, keepDateAndDistrib=True, keepClientOrder=True))1408 'original_so_id_sale_order': so.id}, context=dict(context, keepDateAndDistrib=True, keepClientOrder=True))
1422 # log the action of split1409 # log the action of split
1423 self.log(cr, uid, split_id, _('The %s split %s has been created.') % (selec_name, fo_name))1410 self.log(cr, uid, split_id, _('The %s split %s has been created.') % (selec_name, fo_name))
1424 self.infolog(cr, uid, "The %s split id:%s (%s) has been created." % (
1425 selec_name, split_id, fo_name,
1426 ))
1427 split_fo_dic[fo_type] = split_id1411 split_fo_dic[fo_type] = split_id
1428 # For loans, change the subflow1412 # For loans, change the subflow
1429 if fo_type == 'stock_split_sale_order':1413 if fo_type == 'stock_split_sale_order':
@@ -1537,10 +1521,8 @@
1537 self.write(cr, uid, ids, {'state': 'done',1521 self.write(cr, uid, ids, {'state': 'done',
1538 'active': False}, context=context)1522 'active': False}, context=context)
15391523
1540 for order in self.read(cr, uid, ids, ['name'], context=context):1524 for order_id in ids:
1541 self.infolog(cr, uid, "The splitted FO id:%s (%s) has been closed" % (1525 self.infolog(cr, uid, "The splitted FO id:%s has been closed" % order_id)
1542 order['id'], order['name'],
1543 ))
15441526
1545 return True1527 return True
15461528
@@ -1958,15 +1940,6 @@
1958 date_tools = self.pool.get('date.tools')1940 date_tools = self.pool.get('date.tools')
1959 fields_tools = self.pool.get('fields.tools')1941 fields_tools = self.pool.get('fields.tools')
19601942
1961 msg_type = {
1962 'in': 'Incoming shipment',
1963 'internal': 'Internal picking',
1964 'out': {
1965 'standard': 'Delivery order',
1966 'picking': 'Picking Ticket,'
1967 }
1968 }
1969
1970 if context is None:1943 if context is None:
1971 context = {}1944 context = {}
19721945
@@ -2004,14 +1977,6 @@
2004 if not picking_id:1977 if not picking_id:
2005 picking_data = self._get_picking_data(cr, uid, order)1978 picking_data = self._get_picking_data(cr, uid, order)
2006 picking_id = picking_obj.create(cr, uid, picking_data, context=context)1979 picking_id = picking_obj.create(cr, uid, picking_data, context=context)
2007 self.infolog(cr, uid, "The %s id:%s (%s) has been created from %s id:%s (%s)." % (
2008 picking_data.get('type', '') == 'out' and \
2009 msg_type.get('out', {}).get(picking_data.get('subtype', ''), '') or \
2010 msg_type.get(picking_data.get('type', ''), ''),
2011 picking_id, picking_data.get('name', ''),
2012 order.procurement_request and 'Internal request' or 'Field order',
2013 order.id, order.name,
2014 ))
20151980
2016 # Get move data and create the move1981 # Get move data and create the move
2017 move_data = self._get_move_data(cr, uid, order, line, picking_id, context=context)1982 move_data = self._get_move_data(cr, uid, order, line, picking_id, context=context)
@@ -2125,9 +2090,9 @@
21252090
2126 line_done += 12091 line_done += 1
2127 if line.type == 'make_to_stock':2092 if line.type == 'make_to_stock':
2128 msg = 'The line id:%s (line number: %s) of FO/IR id:%s (%s) has been sourced \'from stock\' with the stock.move id:%s' % (2093 msg = 'The line id:%s of FO/IR id:%s has been sourced \'from stock\' with the stock.move id:%s' % (
2129 line.id, line.line_number,2094 line.id,
2130 line.order_id.id, line.order_id.name,2095 line.order_id.id,
2131 move_id,2096 move_id,
2132 )2097 )
2133 self.infolog(cr, uid, msg)2098 self.infolog(cr, uid, msg)
@@ -2868,31 +2833,17 @@
2868 lines_to_check = []2833 lines_to_check = []
2869 if isinstance(ids, (int, long)):2834 if isinstance(ids, (int, long)):
2870 ids = [ids]2835 ids = [ids]
28712836 for line in self.read(cr, uid, ids, ['order_id'], context=context):
2872 lines_to_log = []
2873
2874 for line in self.browse(cr, uid, ids, context=context):
2875 ltc_ids = self.search(cr, uid, [2837 ltc_ids = self.search(cr, uid, [
2876 ('order_id', '=', line.order_id.id),2838 ('order_id', '=', line['order_id'][0]),
2877 ('order_id.state', '=', 'validated'),2839 ('order_id.state', '=', 'validated'),
2878 ('id', '!=', line.id),2840 ('id', '!=', line['id']),
2879 ], limit=1, context=context)2841 ], limit=1, context=context)
2880 if ltc_ids and ltc_ids[0] not in lines_to_check:2842 if ltc_ids and ltc_ids[0] not in lines_to_check:
2881 lines_to_check.append(ltc_ids[0])2843 lines_to_check.append(ltc_ids[0])
28822844
2883 lines_to_log.append((
2884 line.id,
2885 line.line_number,
2886 line.order_id.procurement_request and 'Internal request' or 'Field orer',
2887 line.order_id.id,
2888 line.order_id.name,
2889 ))
2890
2891 res = super(sale_order_line, self).unlink(cr, uid, ids, context=context)2845 res = super(sale_order_line, self).unlink(cr, uid, ids, context=context)
28922846
2893 for ltl in lines_to_log:
2894 self.infolog(cr, uid, "The line id:%s (line number: %s) of the %s id:%s (%s) has been deleted." % ltl)
2895
2896 if lines_to_check:2847 if lines_to_check:
2897 self.check_confirm_order(cr, uid, lines_to_check, run_scheduler=False, context=context)2848 self.check_confirm_order(cr, uid, lines_to_check, run_scheduler=False, context=context)
28982849
28992850
=== modified file 'bin/addons/sourcing/procurement_order.py'
--- bin/addons/sourcing/procurement_order.py 2016-04-25 09:24:04 +0000
+++ bin/addons/sourcing/procurement_order.py 2016-05-24 07:58:03 +0000
@@ -348,11 +348,7 @@
348 }, context=context)348 }, context=context)
349349
350 if line:350 if line:
351 self.infolog(cr, uid, "The FO/IR line id:%s (line number: %s) has been sourced on order to the PO line id:%s (line number: %s) of the PO id:%s (%s)" % (351 self.infolog(cr, uid, "The FO/IR line id:%s has been sourced on order to the PO line id:%s of the PO id:%s" % (line.id, pol_id, purchase_ids[0]))
352 line.id, line.line_number,
353 pol_id, self.pool.get('purchase.order.line').read(cr, uid, pol_id, ['line_number'], context=context)['line_number'],
354 purchase_ids[0], self.pool.get('purchase.order').read(cr, uid, purchase_ids[0], ['name'], context=context)['name'],
355 ))
356352
357 return purchase_ids[0]353 return purchase_ids[0]
358 else:354 else:
@@ -386,10 +382,8 @@
386 }, context=context)382 }, context=context)
387383
388 if line:384 if line:
389 self.infolog(cr, uid, "The FO/IR line id:%s (line number: %s) has been sourced on order to the PO id:%s (%s)" % (385 self.infolog(cr, uid, "The FO/IR line id:%s has been sourced on order to the PO id:%s" % (
390 line.id, line.line_number,386 line.id, purchase_id))
391 purchase_id, self.pool.get('purchase.order').read(cr, uid, purchase_id, ['name'], context=context)['name'],
392 ))
393387
394 return purchase_id388 return purchase_id
395389
396390
=== modified file 'bin/addons/sourcing/sale_order_line.py'
--- bin/addons/sourcing/sale_order_line.py 2016-05-11 08:59:01 +0000
+++ bin/addons/sourcing/sale_order_line.py 2016-05-24 07:58:03 +0000
@@ -1058,7 +1058,7 @@
10581058
1059 return result1059 return result
10601060
1061 def confirmLine(self, cr, uid, ids, context=None, run_scheduler=False):1061 def confirmLine(self, cr, uid, ids, run_scheduler=False, context=None):
1062 """1062 """
1063 Set the line as confirmed and check if all lines1063 Set the line as confirmed and check if all lines
1064 of the FO/IR are confirmed. If yes, launch the1064 of the FO/IR are confirmed. If yes, launch the
@@ -1248,12 +1248,6 @@
1248 'start_date': time.strftime('%Y-%m-%d %H:%M:%S'),1248 'start_date': time.strftime('%Y-%m-%d %H:%M:%S'),
1249 }, context=context)1249 }, context=context)
12501250
1251 order = self.pool.get('sale.order').read(cr, uid, order_id, ['name'], context=context)
1252 self.infolog(cr, uid, "All lines of the FO/IR id:%s (%s) have been sourced" % (
1253 order['id'],
1254 order['name'],
1255 ))
1256
1257 self.pool.get('sale.order').write(cr, uid, order_ids, {1251 self.pool.get('sale.order').write(cr, uid, order_ids, {
1258 'sourcing_trace_ok': True,1252 'sourcing_trace_ok': True,
1259 'sourcing_trace': 'Sourcing in progress',1253 'sourcing_trace': 'Sourcing in progress',
12601254
=== modified file 'bin/addons/specific_rules/specific_rules.py'
--- bin/addons/specific_rules/specific_rules.py 2016-04-25 09:24:04 +0000
+++ bin/addons/specific_rules/specific_rules.py 2016-05-24 07:58:03 +0000
@@ -1655,10 +1655,10 @@
1655 # super function after production lot creation - production lot are therefore taken into account at stock move creation1655 # super function after production lot creation - production lot are therefore taken into account at stock move creation
1656 result = super(stock_inventory, self).action_confirm(cr, uid, ids, context=context)1656 result = super(stock_inventory, self).action_confirm(cr, uid, ids, context=context)
16571657
1658 self.infolog(cr, uid, 'The %s inventor%s %s (%s) ha%s been confirmed' % (1658 self.infolog(cr, uid, 'The %s inventor%s %s ha%s been confirmed' % (
1659 self._name == 'initial.stock.inventory' and 'Initial stock' or 'Physical',1659 self._name == 'initial.stock.inventory' and 'Initial stock' or 'Physical',
1660 len(ids) > 1 and 'ies' or 'y',1660 len(ids) > 1 and 'ies' or 'y',
1661 ids, ', '.join(x['name'] for x in self.read(cr, uid, ids, ['name'], context=context)),1661 ids,
1662 len(ids) > 1 and 've' or 's',1662 len(ids) > 1 and 've' or 's',
1663 ))1663 ))
16641664
@@ -1667,10 +1667,10 @@
1667 def action_cancel_draft(self, cr, uid, ids, context=None):1667 def action_cancel_draft(self, cr, uid, ids, context=None):
1668 res = super(stock_inventory, self).action_cancel_draft(cr, uid, ids, context=context)1668 res = super(stock_inventory, self).action_cancel_draft(cr, uid, ids, context=context)
16691669
1670 for inv in self.read(cr, uid, ids, ['name'], context=context):1670 for inv_id in ids:
1671 self.infolog(cr, uid, "The %s inventory id:%s (%s) has been re-set to draft" % (1671 self.infolog(cr, uid, "The %s inventory id:%s has been re-set to draft" % (
1672 self._name == 'initial.stock.inventory' and 'Initial stock' or 'Physical',1672 self._name == 'initial.stock.inventory' and 'Initial stock' or 'Physical',
1673 inv['id'], inv['name'],1673 inv_id,
1674 ))1674 ))
16751675
1676 return res1676 return res
@@ -1678,9 +1678,9 @@
1678 def action_done(self, cr, uid, ids, context=None):1678 def action_done(self, cr, uid, ids, context=None):
1679 res = super(stock_inventory, self).action_done(cr, uid, ids, context=context)1679 res = super(stock_inventory, self).action_done(cr, uid, ids, context=context)
16801680
1681 self.infolog(cr, uid, 'The Physical inventor%s %s (%s) ha%s been validated' % (1681 self.infolog(cr, uid, 'The Physical inventor%s %s ha%s been validated' % (
1682 len(ids) > 1 and 'ies' or 'y',1682 len(ids) > 1 and 'ies' or 'y',
1683 ids, ', '.join(x['name'] for x in self.read(cr, uid, ids, ['name'], context=context)),1683 ids,
1684 len(ids) > 1 and 've' or 's',1684 len(ids) > 1 and 've' or 's',
1685 ))1685 ))
16861686
16871687
=== modified file 'bin/addons/stock/stock.py'
--- bin/addons/stock/stock.py 2016-04-25 08:27:30 +0000
+++ bin/addons/stock/stock.py 2016-05-24 07:58:03 +0000
@@ -1432,9 +1432,6 @@
1432 }1432 }
1433 # modify the list of views1433 # modify the list of views
1434 message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "1434 message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "
1435 infolog_message = None
1436 if pick.state == 'assigned':
1437 infolog_message = type_list.get(pick.type, _('Document')) + " id:" + str(pick.id) or 'False' + " '" + (pick.name or '?') + "' "
1438 if pick.min_date:1435 if pick.min_date:
1439 msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime(date_format).decode('utf-8')1436 msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime(date_format).decode('utf-8')
1440 state_list = {1437 state_list = {
@@ -1448,21 +1445,14 @@
1448 res = self._hook_picking_get_view(cr, uid, ids, context=context, pick=pick)1445 res = self._hook_picking_get_view(cr, uid, ids, context=context, pick=pick)
1449 context.update({'view_id': res and res[1] or False})1446 context.update({'view_id': res and res[1] or False})
1450 message += state_list[pick.state]1447 message += state_list[pick.state]
1451 if infolog_message:
1452 infolog_message += state_list[pick.state]
1453 # modify the message to be displayed1448 # modify the message to be displayed
1454 message = self._hook_log_picking_modify_message(cr, uid, ids, context=context, message=message, pick=pick)1449 message = self._hook_log_picking_modify_message(cr, uid, ids, context=context, message=message, pick=pick)
1455 if infolog_message:
1456 infolog_message = self._hook_log_picking_modify_message(cr, uid, ids, context=context, message=infolog_message, pick=pick)
1457 # conditional test for message log1450 # conditional test for message log
1458 log_cond = self._hook_log_picking_log_cond(cr, uid, ids, context=context, pick=pick)1451 log_cond = self._hook_log_picking_log_cond(cr, uid, ids, context=context, pick=pick)
1459 if log_cond and log_cond != 'packing':1452 if log_cond and log_cond != 'packing':
1460 self.log(cr, uid, pick.id, message, context=context)1453 self.log(cr, uid, pick.id, message, context=context)
1461 elif not log_cond:1454 elif not log_cond:
1462 self._hook_custom_log(cr, uid, ids, context=context, message=message, pick=pick)1455 self._hook_custom_log(cr, uid, ids, context=context, message=message, pick=pick)
1463
1464 if infolog_message:
1465 self.infolog(cr, uid, message)
1466 return True1456 return True
14671457
1468stock_picking()1458stock_picking()
@@ -2898,9 +2888,9 @@
2898 account_move_obj.unlink(cr, uid, [account_move['id']], context=context)2888 account_move_obj.unlink(cr, uid, [account_move['id']], context=context)
2899 self.write(cr, uid, [inv.id], {'state': 'cancel'}, context=context)2889 self.write(cr, uid, [inv.id], {'state': 'cancel'}, context=context)
2900 if self._name == 'initial.stock.inventory':2890 if self._name == 'initial.stock.inventory':
2901 self.infolog(cr, uid, "The Initial Stock inventory id:%s (%s) has been canceled" % (inv.id, inv.name))2891 self.infolog(cr, uid, "The Initial Stock inventory id:%s has been canceled" % inv.id)
2902 else:2892 else:
2903 self.infolog(cr, uid, "The Physical inventory id:%s (%s) has been canceled" % (inv.id, inv.name))2893 self.infolog(cr, uid, "The Physical inventory id:%s has been canceled" % inv.id)
2904 return True2894 return True
29052895
2906stock_inventory()2896stock_inventory()
29072897
=== modified file 'bin/addons/stock_override/stock.py'
--- bin/addons/stock_override/stock.py 2016-04-25 10:27:20 +0000
+++ bin/addons/stock_override/stock.py 2016-05-24 07:58:03 +0000
@@ -627,28 +627,22 @@
627 @check_cp_rw627 @check_cp_rw
628 def force_assign(self, cr, uid, ids, context=None):628 def force_assign(self, cr, uid, ids, context=None):
629 res = super(stock_picking, self).force_assign(cr, uid, ids)629 res = super(stock_picking, self).force_assign(cr, uid, ids)
630 for pick in self.read(cr, uid, ids, ['name'], context=context):630 for pick_id in ids:
631 self.infolog(cr, uid, 'Force availability ran on stock.picking id:%s (%s)' % (631 self.infolog(cr, uid, 'Force availability ran on stock.picking id:%s' % pick_id)
632 pick['id'], pick['name'],
633 ))
634 return res632 return res
635633
636 @check_cp_rw634 @check_cp_rw
637 def action_assign(self, cr, uid, ids, context=None):635 def action_assign(self, cr, uid, ids, context=None):
638 res = super(stock_picking, self).action_assign(cr, uid, ids, context=context)636 res = super(stock_picking, self).action_assign(cr, uid, ids, context=context)
639 for pick in self.read(cr, uid, ids, ['name'], context=context):637 for pick_id in ids:
640 self.infolog(cr, uid, 'Check availability ran on stock.picking id:%s (%s)' % (638 self.infolog(cr, uid, 'Check availability ran on stock.picking id:%s' % pick_id)
641 pick['id'], pick['name'],
642 ))
643 return res639 return res
644640
645 @check_cp_rw641 @check_cp_rw
646 def cancel_assign(self, cr, uid, ids, *args, **kwargs):642 def cancel_assign(self, cr, uid, ids, *args, **kwargs):
647 res = super(stock_picking, self).cancel_assign(cr, uid, ids)643 res = super(stock_picking, self).cancel_assign(cr, uid, ids)
648 for pick in self.read(cr, uid, ids, ['name']):644 for pick_id in ids:
649 self.infolog(cr, uid, 'Cancel availability ran on stock.picking id:%s (%s)' % (645 self.infolog(cr, uid, 'Cancel availability ran on stock.picking id:%s' % pick_id)
650 pick['id'], pick['name'],
651 ))
652 return res646 return res
653647
654 648
@@ -999,7 +993,7 @@
999993
1000 return res994 return res
1001995
1002 def is_invoice_needed(self, cr, uid, sp=None, invoice_type=None):996 def is_invoice_needed(self, cr, uid, sp=None):
1003 """997 """
1004 Check if invoice is needed. Cases where we do not need invoice:998 Check if invoice is needed. Cases where we do not need invoice:
1005 - OUT from scratch (without purchase_id and sale_id) AND stock picking type in internal, external or esc999 - OUT from scratch (without purchase_id and sale_id) AND stock picking type in internal, external or esc
@@ -1032,8 +1026,7 @@
1032 res = False1026 res = False
10331027
1034 # (US-952) Move out on an external partner should not create a Stock Transfer Voucher1028 # (US-952) Move out on an external partner should not create a Stock Transfer Voucher
1035 # US-1212: but should create refund1029 if sp.type == 'out' and sp.partner_id.partner_type == 'external':
1036 if sp.type == 'out' and sp.partner_id.partner_type == 'external' and invoice_type != 'in_refund':
1037 res = False1030 res = False
10381031
1039 return res1032 return res
@@ -1047,7 +1040,7 @@
1047 invoice_type = self._get_invoice_type(stock_picking)1040 invoice_type = self._get_invoice_type(stock_picking)
10481041
1049 # Check if no invoice needed1042 # Check if no invoice needed
1050 if not self.is_invoice_needed(cr, uid, stock_picking, invoice_type):1043 if not self.is_invoice_needed(cr, uid, stock_picking):
1051 return1044 return
10521045
1053 # we do not create invoice for procurement_request (Internal Request)1046 # we do not create invoice for procurement_request (Internal Request)
@@ -1231,7 +1224,6 @@
12311224
1232 return True1225 return True
12331226
1234 @check_cp_rw
1235 def change_all_location(self, cr, uid, ids, context=None):1227 def change_all_location(self, cr, uid, ids, context=None):
1236 '''1228 '''
1237 Launch the wizard to change all destination location of stock moves1229 Launch the wizard to change all destination location of stock moves
@@ -1483,9 +1475,7 @@
1483 if move.product_id.id == product_tbd and move.from_wkf_line:1475 if move.product_id.id == product_tbd and move.from_wkf_line:
1484 ids.pop(ids.index(move.id))1476 ids.pop(ids.index(move.id))
1485 else:1477 else:
1486 self.infolog(cr, uid, 'Force availability run on stock move #%s (id:%s) of picking id:%s (%s)' % (1478 self.infolog(cr, uid, 'Force availability run on stock move #%s (id:%s) of picking id:%s' % (move.line_number, move.id, move.picking_id.id))
1487 move.line_number, move.id, move.picking_id.id, move.picking_id.name,
1488 ))
14891479
1490 return super(stock_move, self).force_assign(cr, uid, ids, context=context)1480 return super(stock_move, self).force_assign(cr, uid, ids, context=context)
14911481
@@ -1938,6 +1928,8 @@
19381928
1939 def check_assign(self, cr, uid, ids, context=None):1929 def check_assign(self, cr, uid, ids, context=None):
1940 res = super(stock_move, self).check_assign(cr, uid, ids, context=context)1930 res = super(stock_move, self).check_assign(cr, uid, ids, context=context)
1931 for move_id in ids:
1932 self.infolog(cr, uid, 'Check availability ran on stock.move id:%s' % move_id)
1941 return res1933 return res
19421934
1943 @check_cp_rw1935 @check_cp_rw
@@ -1952,12 +1944,10 @@
1952 for move_data in self.read(cr, uid, ids, fields_to_read, context=context):1944 for move_data in self.read(cr, uid, ids, fields_to_read, context=context):
1953 search_domain = [('state', '=', 'confirmed'), ('id', '!=', move_data['id'])]1945 search_domain = [('state', '=', 'confirmed'), ('id', '!=', move_data['id'])]
19541946
1955 self.infolog(cr, uid, 'Cancel availability run on stock move #%s (id:%s) of picking id:%s (%s)' % (1947 self.infolog(cr, uid, 'Cancel availability run on stock move #%s (id:%s) of picking id:%s' % (
1956 move_data['line_number'],1948 move_data['line_number'],
1957 move_data['id'],1949 move_data['id'],
1958 move_data['picking_id'][0],1950 move_data['picking_id'][0]))
1959 self.pool.get('stock.picking').read(cr, uid, move_data['picking_id'][0], ['name'], context=context)['name'],
1960 ))
19611951
1962 for f in fields_to_read:1952 for f in fields_to_read:
1963 if f in ('product_qty', 'product_uos_qty'):1953 if f in ('product_qty', 'product_uos_qty'):
@@ -2536,17 +2526,9 @@
2536 move_ids = move_obj.search(cr, uid, [('id', '=', wiz.move_id.id)],2526 move_ids = move_obj.search(cr, uid, [('id', '=', wiz.move_id.id)],
2537 limit=1, order='NO_ORDER', context=context)2527 limit=1, order='NO_ORDER', context=context)
2538 if move_ids and wiz.move_id.has_to_be_resourced:2528 if move_ids and wiz.move_id.has_to_be_resourced:
2539 self.infolog(cr, uid, "The stock.move id:%s of the picking id:%s (%s) has been canceled and resourced" % (2529 self.infolog(cr, uid, "The stock.move id:%s of the picking id:%s has been canceled and resourced" % (move_id, picking_id))
2540 move_id,
2541 picking_id,
2542 pick_obj.read(cr, uid, picking_id, ['name'], context=context)['name'],
2543 ))
2544 else:2530 else:
2545 self.infolog(cr, uid, "The stock.move id:%s of the picking id:%s (%s) has been canceled" % (2531 self.infolog(cr, uid, "The stock.move id:%s of the picking id:%s has been canceled" % (move_id, picking_id))
2546 move_id,
2547 picking_id,
2548 pick_obj.read(cr, uid, picking_id, ['name'], context=context)['name'],
2549 ))
25502532
2551 if move_ids and wiz.move_id.picking_id:2533 if move_ids and wiz.move_id.picking_id:
2552 lines = wiz.move_id.picking_id.move_lines2534 lines = wiz.move_id.picking_id.move_lines
@@ -2602,23 +2584,9 @@
2602 '''2584 '''
2603 Just call the cancel of the stock.picking2585 Just call the cancel of the stock.picking
2604 '''2586 '''
2605 msg_type = {
2606 'in': 'Incoming Shipment',
2607 'internal': 'Internal Picking',
2608 'out': {
2609 'standard': 'Delivery Order',
2610 'picking': 'Picking Ticket',
2611 }
2612 }
2613
2614 wf_service = netsvc.LocalService("workflow")2587 wf_service = netsvc.LocalService("workflow")
2615 for wiz in self.browse(cr, uid, ids, context=context):2588 for wiz in self.browse(cr, uid, ids, context=context):
2616 wf_service.trg_validate(uid, 'stock.picking', wiz.picking_id.id, 'button_cancel', cr)2589 wf_service.trg_validate(uid, 'stock.picking', wiz.picking_id.id, 'button_cancel', cr)
2617 self.infolog(cr, uid, "The %s id:%s (%s) has been canceled%s." % (
2618 wiz.picking_id.type == 'out' and msg_type.get('out', {}).get(wiz.picking_id.subtype, '') or msg_type.get(wiz.picking_id.type),
2619 wiz.picking_id.id,
2620 wiz.picking_id.has_to_be_resourced and ' and resourced' or '',
2621 ))
26222590
2623 return {'type': 'ir.actions.act_window_close'}2591 return {'type': 'ir.actions.act_window_close'}
26242592
26252593
=== modified file 'bin/addons/stock_override/stock_view.xml'
--- bin/addons/stock_override/stock_view.xml 2016-04-25 10:27:20 +0000
+++ bin/addons/stock_override/stock_view.xml 2016-05-24 07:58:03 +0000
@@ -469,7 +469,7 @@
469 <button name="draft_force_assign" states="draft,confirmed,assigned" string="Confirm" type="object" icon="gtk-apply" attrs="{'invisible': ['|', '&amp;', ('state', 'in', ['done', 'cancel', 'import']), ('state', '!=', 'draft'), ('has_draft_moves', '=', False)]}" />469 <button name="draft_force_assign" states="draft,confirmed,assigned" string="Confirm" type="object" icon="gtk-apply" attrs="{'invisible': ['|', '&amp;', ('state', 'in', ['done', 'cancel', 'import']), ('state', '!=', 'draft'), ('has_draft_moves', '=', False)]}" />
470 <button name="action_assign" states="confirmed,assigned" string="Check Availability" type="object" icon="gtk-find" context="{'from_button': True}"/>470 <button name="action_assign" states="confirmed,assigned" string="Check Availability" type="object" icon="gtk-find" context="{'from_button': True}"/>
471 <button name="force_assign" states="confirmed,assigned" string="Force Availability" type="object" icon="gtk-jump-to" context="{'from_button': True}" />471 <button name="force_assign" states="confirmed,assigned" string="Force Availability" type="object" icon="gtk-jump-to" context="{'from_button': True}" />
472 <button name="change_all_location" string="Change All destinations" icon="gtk-execute" type="object" states="draft,confirmed,assigned" context="{'from_button': True}" />472 <button name="change_all_location" string="Change All destinations" icon="gtk-execute" type="object" states="draft,confirmed,assigned" />
473 <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward" context="{'from_button': True}"/>473 <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward" context="{'from_button': True}"/>
474 <field name="certificate_donation" invisible="1"/>474 <field name="certificate_donation" invisible="1"/>
475 <button name="print_certificate" string="Print certificate" type="object" icon="gtk-print" attrs="{'invisible': [('certificate_donation', '=', False)]}"/>475 <button name="print_certificate" string="Print certificate" type="object" icon="gtk-print" attrs="{'invisible': [('certificate_donation', '=', False)]}"/>
476476
=== modified file 'bin/addons/sync_client/sync_client.py'
--- bin/addons/sync_client/sync_client.py 2016-05-02 08:02:47 +0000
+++ bin/addons/sync_client/sync_client.py 2016-05-24 07:58:03 +0000
@@ -69,7 +69,6 @@
69 connected = False69 connected = False
70 raise osv.except_osv(_("Error!"), _("Not connected: please try to log on in the Connection Manager"))70 raise osv.except_osv(_("Error!"), _("Not connected: please try to log on in the Connection Manager"))
71 # Check for update71 # Check for update
72
73 if hasattr(entity, 'upgrade'):72 if hasattr(entity, 'upgrade'):
74 up_to_date = entity.upgrade(cr, uid, context=context)73 up_to_date = entity.upgrade(cr, uid, context=context)
75 if not up_to_date[0]:74 if not up_to_date[0]:
7675
=== modified file 'bin/addons/tender_flow/tender_flow.py'
--- bin/addons/tender_flow/tender_flow.py 2016-04-25 09:24:04 +0000
+++ bin/addons/tender_flow/tender_flow.py 2016-05-24 07:58:03 +0000
@@ -385,11 +385,8 @@
385 'res_id': po_id,385 'res_id': po_id,
386 'domain': [('rfq_ok', '=', True)],386 'domain': [('rfq_ok', '=', True)],
387 }, context={'rfq_ok': True})387 }, context={'rfq_ok': True})
388 self.infolog(cr, uid, "The RfQ id:%s (%s) has been generated from tender id:%s (%s)" % (388 self.infolog(cr, uid, "The RfQ id:%s has been generated from tender id:%s" % (
389 po_id,389 po_id, tender.id,
390 po_obj.read(cr, uid, po_id, ['name'], context=context)['name'],
391 tender.id,
392 tender.name,
393 ))390 ))
394 391
395 self.write(cr, uid, ids, {'state':'comparison'}, context=context)392 self.write(cr, uid, ids, {'state':'comparison'}, context=context)
@@ -475,10 +472,7 @@
475472
476 sol_ids.add(tender.sale_order_id.id)473 sol_ids.add(tender.sale_order_id.id)
477474
478 self.infolog(cr, uid, "The tender id:%s (%s) has been closed" % (475 self.infolog(cr, uid, "The tender id:%s has been closed" % tender.id)
479 tender.id,
480 tender.name,
481 ))
482476
483 if sol_ids:477 if sol_ids:
484 so_obj.action_ship_proc_create(cr, uid, list(sol_ids), context=context)478 so_obj.action_ship_proc_create(cr, uid, list(sol_ids), context=context)
@@ -681,12 +675,7 @@
681 po_id = po_obj.create(cr, uid, po_data, context=context)675 po_id = po_obj.create(cr, uid, po_data, context=context)
682 po = po_obj.browse(cr, uid, po_id, context=context)676 po = po_obj.browse(cr, uid, po_id, context=context)
683 po_obj.log(cr, uid, po_id, 'The Purchase order %s for supplier %s has been created.'%(po.name, po.partner_id.name))677 po_obj.log(cr, uid, po_id, 'The Purchase order %s for supplier %s has been created.'%(po.name, po.partner_id.name))
684 self.infolog(cr, uid, "The PO id:%s (%s) has been generated from tender id:%s (%s)" % (678 self.infolog(cr, uid, "The PO id:%s has been generated from tender" % po_id)
685 po_id,
686 po.name,
687 tender.id,
688 tender.name,
689 ))
690 #UF-802: the PO created must be in draft state, and not validated!679 #UF-802: the PO created must be in draft state, and not validated!
691 #wf_service.trg_validate(uid, 'purchase.order', po_id, 'purchase_confirm', cr)680 #wf_service.trg_validate(uid, 'purchase.order', po_id, 'purchase_confirm', cr)
692 681
@@ -750,10 +739,7 @@
750739
751 for line in tender.tender_line_ids:740 for line in tender.tender_line_ids:
752 t_line_obj.cancel_sourcing(cr, uid, [line.id], context=context)741 t_line_obj.cancel_sourcing(cr, uid, [line.id], context=context)
753 self.infolog(cr, uid, "The tender id:%s (%s) has been canceled" % (742 self.infolog(cr, uid, "The tender id:%s has been canceled" % tender.id)
754 tender.id,
755 tender.name,
756 ))
757743
758 return True744 return True
759745
@@ -1123,12 +1109,8 @@
1123 '''1109 '''
1124 to_remove = self.cancel_sourcing(cr, uid, ids, context=dict(context, fake_unlink=True))1110 to_remove = self.cancel_sourcing(cr, uid, ids, context=dict(context, fake_unlink=True))
11251111
1126 for tl in self.browse(cr, uid, ids, context=context):1112 for tl_id in ids:
1127 self.infolog(cr, uid, "The tender line id:%s of tender id:%s (%s) has been canceled" % (1113 self.infolog(cr, uid, "The tender line id:%s has been canceled" % tl_id)
1128 tl.id,
1129 tl.tender_id.id,
1130 tl.tender_id.name,
1131 ))
11321114
1133 return self.unlink(cr, uid, to_remove, context=context)1115 return self.unlink(cr, uid, to_remove, context=context)
11341116
@@ -1400,14 +1382,8 @@
1400 1382
1401 # log message concerning RfQ creation1383 # log message concerning RfQ creation
1402 rfq_obj.log(cr, uid, rfq_id, "The Request for Quotation '%s' has been created and must be completed before purchase order creation."%rfq_obj.browse(cr, uid, rfq_id, context=context).name, context={'rfq_ok': 1})1384 rfq_obj.log(cr, uid, rfq_id, "The Request for Quotation '%s' has been created and must be completed before purchase order creation."%rfq_obj.browse(cr, uid, rfq_id, context=context).name, context={'rfq_ok': 1})
1403 rfq_line = rfq_line_obj.browse(cr, uid, rfq_line_id, context=context)1385 self.infolog(cr, uid, "The FO/IR line id:%s has been sourced on order to RfQ line id:%s of the RfQ id:%s" % (
1404 self.infolog(cr, uid, "The FO/IR line id:%s (line number: %s) has been sourced on order to RfQ line id:%s (line number: %s) of the RfQ id:%s (%s)" % (1386 sale_order_line.id, rfq_line_id, rfq_id,
1405 sale_order_line.id,
1406 sale_order_line.line_number,
1407 rfq_line.id,
1408 rfq_line.line_number,
1409 rfq_line.order_id.id,
1410 rfq_line.order_id.name,
1411 ))1387 ))
1412 # state of procurement is Tender1388 # state of procurement is Tender
1413 self.write(cr, uid, ids, {'state': 'rfq'}, context=context)1389 self.write(cr, uid, ids, {'state': 'rfq'}, context=context)
@@ -1465,14 +1441,9 @@
1465 self.write(cr, uid, ids, {'tender_id': tender_id, 'tender_line_id': tender_line_id}, context=context)1441 self.write(cr, uid, ids, {'tender_id': tender_id, 'tender_line_id': tender_line_id}, context=context)
1466 1442
1467 # log message concerning tender creation1443 # log message concerning tender creation
1468 tender_line = tender_line_obj.browse(cr, uid, tender_line_id, context=context)1444 tender_obj.log(cr, uid, tender_id, "The tender '%s' has been created and must be completed before purchase order creation."%tender_obj.browse(cr, uid, tender_id, context=context).name)
1469 tender_obj.log(cr, uid, tender_id, "The tender '%s' has been created and must be completed before purchase order creation."%tender_line.tender_id.name)1445 self.infolog(cr, uid, "The FO/IR line id:%s has been sourced on order to tender line id:%s of the tender id:%s" % (
1470 self.infolog(cr, uid, "The FO/IR line id:%s (%s) has been sourced on order to tender line id:%s of the tender id:%s (%s)" % (1446 sale_order_line.id, tender_line_id, tender_id,
1471 sale_order_line.id,
1472 sale_order_line.line_number,
1473 tender_line.id,
1474 tender_line.tender_id.id,
1475 tender_line.tender_id.name,
1476 ))1447 ))
1477 # state of procurement is Tender1448 # state of procurement is Tender
1478 self.write(cr, uid, ids, {'state': 'tender'}, context=context)1449 self.write(cr, uid, ids, {'state': 'tender'}, context=context)
@@ -1705,9 +1676,6 @@
1705 for rfq in self.browse(cr, uid, ids, context=context):1676 for rfq in self.browse(cr, uid, ids, context=context):
1706 wf_service = netsvc.LocalService("workflow")1677 wf_service = netsvc.LocalService("workflow")
1707 wf_service.trg_validate(uid, 'purchase.order', rfq.id, 'rfq_sent', cr)1678 wf_service.trg_validate(uid, 'purchase.order', rfq.id, 'rfq_sent', cr)
1708 self.infolog(cr, uid, "The RfQ id:%s (%s) has been sent." % (
1709 rfq.id, rfq.name,
1710 ))
1711 1679
1712 self.write(cr, uid, ids, {'date_confirm': time.strftime('%Y-%m-%d')}, context=context)1680 self.write(cr, uid, ids, {'date_confirm': time.strftime('%Y-%m-%d')}, context=context)
17131681
@@ -1745,8 +1713,8 @@
1745 'tender_id': rfq.tender_id.id,1713 'tender_id': rfq.tender_id.id,
1746 'created_by_rfq': True}1714 'created_by_rfq': True}
1747 tl_id = tl_obj.create(cr, uid, tl_vals, context=context)1715 tl_id = tl_obj.create(cr, uid, tl_vals, context=context)
1748 self.infolog(cr, uid, "The tender line id:%s has been created by the RfQ line id:%s (line number: %s)" % (1716 self.infolog(cr, uid, "The tender line id:%s has been created by the RfQ line id:%s" % (
1749 tl_id, line.id, line.line_number,1717 tl_id, line.id,
1750 ))1718 ))
1751 line_obj.write(cr, uid, [line.id], {'tender_line_id': tl_id}, context=context)1719 line_obj.write(cr, uid, [line.id], {'tender_line_id': tl_id}, context=context)
1752 elif rfq.rfq_ok:1720 elif rfq.rfq_ok:
@@ -1762,9 +1730,7 @@
1762 )1730 )
17631731
1764 wf_service.trg_validate(uid, 'purchase.order', rfq.id, 'rfq_updated', cr)1732 wf_service.trg_validate(uid, 'purchase.order', rfq.id, 'rfq_updated', cr)
1765 self.infolog(cr, uid, "The RfQ id:%s (%s) has been updated" % (1733 self.infolog(cr, uid, "The RfQ id:%s has been updated" % rfq.id)
1766 rfq.id, rfq.name,
1767 ))
17681734
1769 return {1735 return {
1770 'type': 'ir.actions.act_window',1736 'type': 'ir.actions.act_window',
@@ -1831,7 +1797,7 @@
1831 ids = [ids]1797 ids = [ids]
18321798
1833 for rfq in self.browse(cr, uid, ids, context=context):1799 for rfq in self.browse(cr, uid, ids, context=context):
1834 self.infolog(cr, uid, "The RfQ id:%s (%s) has been closed" % (rfq.id, rfq.name))1800 self.infolog(cr, uid, "The RfQ id:%s has been closed" % rfq.id)
1835 if rfq.from_procurement:1801 if rfq.from_procurement:
1836 for line in rfq.order_line:1802 for line in rfq.order_line:
1837 if line.procurement_id:1803 if line.procurement_id:
18381804
=== modified file 'bin/osv/orm.py' (properties changed: +x to -x)
--- bin/osv/orm.py 2016-04-12 16:43:36 +0000
+++ bin/osv/orm.py 2016-05-24 07:58:03 +0000
@@ -48,6 +48,7 @@
48import time48import time
49import traceback49import traceback
50import types50import types
51import csv
5152
52import netsvc53import netsvc
53from lxml import etree54from lxml import etree
@@ -745,6 +746,48 @@
745 datas += self.__export_row(cr, uid, row, fields_to_export, context)746 datas += self.__export_row(cr, uid, row, fields_to_export, context)
746 return {'datas': datas}747 return {'datas': datas}
747748
749 def import_data_with_wizard(self, cr, uid, csv_file, quotechar="'", delimiter=","):
750 import base64
751
752 import_obj = self.pool.get('import_data')
753 import_id = import_obj.create(cr, uid, {
754 'ignore': 1,
755 'file': base64.encodestring(open(csv_file, 'r').read()),
756 'object': self._name,
757 'import_mode': 'create',
758 })
759 processed, rejected, headers = import_obj._import(cr, uid, import_id, use_new_cursor=False, auto_import=True)
760 return processed, rejected, headers
761
762 def import_data_from_csv(self, cr, uid, csv_file, quotechar='"', delimiter=','):
763 headers = []
764 list_data = []
765 with open(csv_file, 'r') as fcsv:
766 reader = csv.reader(fcsv, quotechar=quotechar, delimiter=delimiter)
767 for row in reader:
768 if not headers:
769 headers = row
770 else:
771 list_data.append(row)
772
773 rejected = []
774 processed = []
775 i = 1
776 for d in list_data:
777 i += 1
778 try:
779 res = self.import_data(cr, uid, headers, [d])
780 if res[0] == -1:
781 rejected.append((i, d, res[2]))
782 else:
783 processed.append((i, d))
784 cr.commit()
785 except Exception as e:
786 rejected.append((i, d, str(e)))
787 cr.commit()
788
789 return processed, rejected, headers
790
748 def import_data(self, cr, uid, fields, datas, mode='init', current_module='', noupdate=False, context=None, filename=None):791 def import_data(self, cr, uid, fields, datas, mode='init', current_module='', noupdate=False, context=None, filename=None):
749 """792 """
750 Import given data in given module793 Import given data in given module
@@ -4173,15 +4216,7 @@
4173 val = todo[key]4216 val = todo[key]
4174 if key:4217 if key:
4175 # uid == 1 for accessing objects having rules defined on store fields4218 # uid == 1 for accessing objects having rules defined on store fields
4176 if hasattr(uid, 'realUid'):
4177 context['computed_for_uid'] = uid.realUid
4178 else:
4179 context['computed_for_uid'] = uid
4180 result = self._columns[val[0]].get(cr, self, ids, val, 1, context=context)4219 result = self._columns[val[0]].get(cr, self, ids, val, 1, context=context)
4181 try:
4182 del context['computed_for_uid']
4183 except KeyError:
4184 pass
4185 for id, value in result.items():4220 for id, value in result.items():
4186 if field_flag:4221 if field_flag:
4187 for f in value.keys():4222 for f in value.keys():
41884223
=== modified file 'bin/release.py'
--- bin/release.py 2016-05-19 07:14:29 +0000
+++ bin/release.py 2016-05-24 07:58:03 +0000
@@ -20,7 +20,7 @@
20##############################################################################20##############################################################################
2121
22name = 'openerp-server'22name = 'openerp-server'
23version = 'UF2.1-2dev'23version = 'UF2.1-1dev'
24major_version = '6.0'24major_version = '6.0'
25description = 'OpenERP Server'25description = 'OpenERP Server'
26long_desc = '''OpenERP is a complete ERP and CRM. The main features are accounting (analytic26long_desc = '''OpenERP is a complete ERP and CRM. The main features are accounting (analytic
@@ -41,3 +41,4 @@
4141
42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4343
44version = "UF2.1-1rc2-20160405-085815"
4445
=== modified file 'bin/unifield-version.txt'
--- bin/unifield-version.txt 2016-05-02 07:25:38 +0000
+++ bin/unifield-version.txt 2016-05-24 07:58:03 +0000
@@ -39,3 +39,4 @@
399cc36509c8e23277fa984c409108214a 2016-04-19 17:00:00 UF2.1-1399cc36509c8e23277fa984c409108214a 2016-04-19 17:00:00 UF2.1-1
4002fefe702b11f65e825167449ffbcd16 2016-05-02 10:00:00 UF2.1-1p14002fefe702b11f65e825167449ffbcd16 2016-05-02 10:00:00 UF2.1-1p1
4141
422b35d23b977618a2abab522b3681147c 2016-04-05 10:06:58 UF2.1-1rc2

Subscribers

People subscribed via source and target branches

to all changes: