Merge lp:~unifield-team/unifield-server/US-5343-5790-6099 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5432
Proposed branch: lp:~unifield-team/unifield-server/US-5343-5790-6099
Merge into: lp:unifield-server
Diff against target: 585 lines (+194/-62) (has conflicts)
8 files modified
bin/addons/msf_doc_import/purchase_order.py (+3/-4)
bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako (+1/-1)
bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py (+97/-33)
bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml (+2/-2)
bin/addons/msf_profile/i18n/fr_MF.po (+79/-12)
bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako (+10/-2)
bin/addons/msf_tools/automated_export_job.py (+1/-4)
bin/addons/msf_tools/automated_import_job.py (+1/-4)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~unifield-team/unifield-server/US-5343-5790-6099
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+368521@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/msf_doc_import/purchase_order.py'
--- bin/addons/msf_doc_import/purchase_order.py 2019-05-17 09:46:15 +0000
+++ bin/addons/msf_doc_import/purchase_order.py 2019-06-07 07:31:09 +0000
@@ -427,19 +427,18 @@
427 # create tmp file427 # create tmp file
428 tmp_file = tempfile.NamedTemporaryFile(mode='w', delete=False)428 tmp_file = tempfile.NamedTemporaryFile(mode='w', delete=False)
429 tmp_file.write(base64.decodestring(file_res['result']))429 tmp_file.write(base64.decodestring(file_res['result']))
430 tmpname = tmp_file.name
430 tmp_file.close()431 tmp_file.close()
431 new_tmp_file_name = os.path.join(os.path.dirname(tmp_file.name), filename)
432 os.rename(tmp_file.name, new_tmp_file_name)
433432
434 # transfer tmp file on SFTP server433 # transfer tmp file on SFTP server
435 try:434 try:
436 with sftp.cd(export_wiz.dest_path):435 with sftp.cd(export_wiz.dest_path):
437 sftp.put(new_tmp_file_name, preserve_mtime=True)436 sftp.put(tmpname, filename, preserve_mtime=True)
438 except:437 except:
439 raise osv.except_osv(_('Error'), _('Unable to write on SFTP server at location %s') % export_wiz.dest_path)438 raise osv.except_osv(_('Error'), _('Unable to write on SFTP server at location %s') % export_wiz.dest_path)
440439
441 # now we can remove tmp file440 # now we can remove tmp file
442 os.remove(new_tmp_file_name)441 os.remove(tmpname)
443 else:442 else:
444 # write export in local file443 # write export in local file
445 with open(path_to_file, 'w') as fich:444 with open(path_to_file, 'w') as fich:
446445
=== modified file 'bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako'
--- bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako 2018-08-10 09:51:23 +0000
+++ bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako 2019-06-07 07:31:09 +0000
@@ -323,7 +323,7 @@
323323
324 <Row>324 <Row>
325 <Cell ss:StyleID="header" ><Data ss:Type="String">${_('Information (Line numbers refer to the line numbers of the PO confirmation import file)')}</Data></Cell>325 <Cell ss:StyleID="header" ><Data ss:Type="String">${_('Information (Line numbers refer to the line numbers of the PO confirmation import file)')}</Data></Cell>
326 <Cell ss:StyleID="line" MergeAcross="3" ><Data ss:Type="String">${(o.message or '')|x}</Data></Cell>326 <Cell ss:StyleID="line" ss:MergeAcross="2" ><Data ss:Type="String">${(o.message or '')|x}</Data></Cell>
327 </Row>327 </Row>
328328
329</Table>329</Table>
330330
=== modified file 'bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py'
--- bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2019-05-28 07:30:48 +0000
+++ bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2019-06-07 07:31:09 +0000
@@ -734,7 +734,9 @@
734 lines_to_ignored = [] # Bad formatting lines734 lines_to_ignored = [] # Bad formatting lines
735 file_format_errors = []735 file_format_errors = []
736 values_header_errors = []736 values_header_errors = []
737 values_header_warnings = []
737 values_line_errors = []738 values_line_errors = []
739 values_line_warnings = []
738 message = ''740 message = ''
739 header_values = {}741 header_values = {}
740742
@@ -803,10 +805,10 @@
803 message = '''## IMPORT STOPPED ##805 message = '''## IMPORT STOPPED ##
804806
805 LINE 1 OF THE IMPORTED FILE: THE ORDER REFERENCE \807 LINE 1 OF THE IMPORTED FILE: THE ORDER REFERENCE \
806 IN THE FILE IS NOT THE SAME AS THE ORDER REFERENCE OF THE SIMULATION SCREEN.\808IN THE FILE IS NOT THE SAME AS THE ORDER REFERENCE OF THE SIMULATION SCREEN. \
807809
808 YOU SHOULD IMPORT A FILE THAT HAS THE SAME ORDER REFERENCE THAN THE SIMULATION\810 YOU SHOULD IMPORT A FILE THAT HAS THE SAME ORDER REFERENCE THAN THE SIMULATION \
809 SCREEN !'''811SCREEN !'''
810 self.write(cr, uid, [wiz.id], {'message': message, 'state': 'error'}, context)812 self.write(cr, uid, [wiz.id], {'message': message, 'state': 'error'}, context)
811 res = self.go_to_simulation(cr, uid, [wiz.id], context=context)813 res = self.go_to_simulation(cr, uid, [wiz.id], context=context)
812 cr.commit()814 cr.commit()
@@ -941,7 +943,10 @@
941 for manda_field in LINES_COLUMNS:943 for manda_field in LINES_COLUMNS:
942 if manda_field[2] == 'mandatory' and not values.get(x, [])[manda_field[0]]:944 if manda_field[2] == 'mandatory' and not values.get(x, [])[manda_field[0]]:
943 not_ok = True945 not_ok = True
944 err1 = _('The column \'%s\' mustn\'t be empty%s') % (manda_field[1], manda_field[0] == 0 and ' - Line not imported' or '')946 if manda_field[0] == 4: # Product Qty
947 err1 = _('You can not have an order line with a negative or zero quantity. Updated quantity is ignored')
948 else:
949 err1 = _('The column \'%s\' mustn\'t be empty%s') % (manda_field[1], manda_field[0] == 0 and ' - Line not imported' or '')
945 err = _('Line %s of the PO: %s') % (line_number, err1)950 err = _('Line %s of the PO: %s') % (line_number, err1)
946 values_line_errors.append(err)951 values_line_errors.append(err)
947 file_line_error.append(err1)952 file_line_error.append(err1)
@@ -976,9 +981,6 @@
976 if not ext_ref and line_number and line_number in EXT_REF_BY_LN[wiz.id].keys():981 if not ext_ref and line_number and line_number in EXT_REF_BY_LN[wiz.id].keys():
977 ext_ref = EXT_REF_BY_LN[wiz.id][line_number][0]982 ext_ref = EXT_REF_BY_LN[wiz.id][line_number][0]
978983
979 if not_ok:
980 not_ok_file_lines[x] = ' - '.join(err for err in file_line_error)
981
982# if not line_number and not ext_ref:984# if not line_number and not ext_ref:
983# continue985# continue
984986
@@ -1005,12 +1007,20 @@
1005 uom_id = uom_ids[0]1007 uom_id = uom_ids[0]
1006 UOM_NAME_ID.setdefault(vals[5], uom_id)1008 UOM_NAME_ID.setdefault(vals[5], uom_id)
1007 # Qty1009 # Qty
1010 qty = 0
1008 if vals[4]:1011 if vals[4]:
1009 qty = float(vals[4])1012 try:
1013 qty = float(vals[4])
1014 except Exception:
1015 qty = 0
10101016
1011 # AD on line1017 # AD on line
1012 file_lines[x] = (line_number, product_id, uom_id, qty, ext_ref, vals[20:])1018 file_lines[x] = (line_number, product_id, uom_id, qty, ext_ref, vals[20:])
10131019
1020 # If error(s)
1021 if not_ok:
1022 not_ok_file_lines[x] = ' - '.join(err for err in file_line_error)
1023
1014 '''1024 '''
1015 Get the best matching line :1025 Get the best matching line :
1016 1/ Within lines with same line number, same product, same UoM and same qty1026 1/ Within lines with same line number, same product, same UoM and same qty
@@ -1117,7 +1127,7 @@
1117 'percent_completed': percent_completed}, context=context)1127 'percent_completed': percent_completed}, context=context)
1118 vals = values.get(file_line[0], [])1128 vals = values.get(file_line[0], [])
1119 if file_line[1] == 'match':1129 if file_line[1] == 'match':
1120 err_msg = wl_obj.import_line(cr, uid, po_line, vals, cc_cache, context=context)1130 err_msg, warn_msg = wl_obj.import_line(cr, uid, po_line, vals, cc_cache, context=context)
1121 if file_line[0] in not_ok_file_lines:1131 if file_line[0] in not_ok_file_lines:
1122 wl_obj.write(cr, uid, [po_line], {'type_change': 'error', 'error_msg': not_ok_file_lines[file_line[0]]}, context=context)1132 wl_obj.write(cr, uid, [po_line], {'type_change': 'error', 'error_msg': not_ok_file_lines[file_line[0]]}, context=context)
1123 elif file_line[1] == 'split':1133 elif file_line[1] == 'split':
@@ -1127,7 +1137,7 @@
1127 'parent_line_id': po_line,1137 'parent_line_id': po_line,
1128 'imp_dcd': False,1138 'imp_dcd': False,
1129 'po_line_id': False}, context=context)1139 'po_line_id': False}, context=context)
1130 err_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context)1140 err_msg, warn_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context)
1131 if file_line[0] in not_ok_file_lines:1141 if file_line[0] in not_ok_file_lines:
1132 wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[file_line[0]]}, context=context)1142 wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[file_line[0]]}, context=context)
1133 # Commit modifications1143 # Commit modifications
@@ -1135,8 +1145,12 @@
11351145
1136 if err_msg:1146 if err_msg:
1137 for err in err_msg:1147 for err in err_msg:
1138 err = 'Line %s of the PO: %s' % (file_line[2], err)1148 err = _('Line %s of the PO: %s') % (file_line[2], err)
1139 values_line_errors.append(err)1149 values_line_errors.append(err)
1150 if warn_msg:
1151 for warn in warn_msg:
1152 warn = _('Line %s of the PO: %s') % (file_line[2], warn)
1153 values_line_errors.append(warn)
11401154
11411155
1142 # Create new lines1156 # Create new lines
@@ -1153,7 +1167,7 @@
1153 'in_line_number': values.get(po_line, [])[0] and int(values.get(po_line, [])[0]) or False,1167 'in_line_number': values.get(po_line, [])[0] and int(values.get(po_line, [])[0]) or False,
1154 'in_ext_ref': values.get(po_line, [])[1] or False,1168 'in_ext_ref': values.get(po_line, [])[1] or False,
1155 'simu_id': wiz.id}, context=context)1169 'simu_id': wiz.id}, context=context)
1156 err_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context)1170 err_msg, warn_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context)
1157 if po_line in not_ok_file_lines:1171 if po_line in not_ok_file_lines:
1158 wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[po_line]}, context=context)1172 wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[po_line]}, context=context)
11591173
@@ -1161,10 +1175,17 @@
1161 if err_msg:1175 if err_msg:
1162 for err in err_msg:1176 for err in err_msg:
1163 if line_n:1177 if line_n:
1164 err = 'Line %s of the PO: %s' % (line_n, err)1178 err = _('Line %s of the PO: %s') % (line_n, err)
1165 else:1179 else:
1166 err = 'Line %s of the file: %s' % (po_line, err)1180 err = _('Line %s of the file: %s') % (po_line, err)
1167 values_line_errors.append(err)1181 values_line_errors.append(err)
1182 if warn_msg:
1183 for warn in warn_msg:
1184 if line_n:
1185 warn = _('Line %s of the PO: %s') % (line_n, warn)
1186 else:
1187 warn = _('Line %s of the file: %s') % (po_line, warn)
1188 values_line_warnings.append(warn)
1168 # Commit modifications1189 # Commit modifications
1169 cr.commit()1190 cr.commit()
11701191
@@ -1176,27 +1197,41 @@
11761197
1177 '''1198 '''
1178 We generate the message which will be displayed on the simulation1199 We generate the message which will be displayed on the simulation
1179 screen. This message is a merge between all errors.1200 screen. This message is a merge between all errors and warnings.
1180 '''1201 '''
1181 # Generate the message1202 # Generate the message
1182 import_error_ok = False1203 import_error_ok = False
1204 import_warning_ok = False
1183 if len(values_header_errors):1205 if len(values_header_errors):
1184 import_error_ok = True1206 import_error_ok = True
1185 message += '\n## Error on header values ##\n\n'1207 message += _('\n## Error on header values ##\n\n')
1186 for err in values_header_errors:1208 for err in values_header_errors:
1187 message += '%s\n' % err1209 message += '%s\n' % err
11881210
1211 if len(values_header_warnings):
1212 import_warning_ok = True
1213 message += _('\n## Warning on header values ##\n\n')
1214 for warn in values_header_warnings:
1215 message += '%s\n' % warn
1216
1189 if len(values_line_errors):1217 if len(values_line_errors):
1190 import_error_ok = True1218 import_error_ok = True
1191 message += '\n## Error on line values ##\n\n'1219 message += _('\n## Error on line values ##\n\n')
1192 for err in values_line_errors:1220 for err in values_line_errors:
1193 message += '%s\n' % err1221 message += '%s\n' % err
11941222
1223 if len(values_line_warnings):
1224 import_warning_ok = True
1225 message += _('\n## Warning on line values ##\n\n')
1226 for warn in values_line_warnings:
1227 message += '%s\n' % warn
1228
1195 header_values.update({1229 header_values.update({
1196 'message': message,1230 'message': message,
1197 'state': 'simu_done',1231 'state': 'simu_done',
1198 'percent_completed': 100.0,1232 'percent_completed': 100.0,
1199 'import_error_ok': import_error_ok,1233 'import_error_ok': import_error_ok,
1234 'import_warning_ok': import_warning_ok,
1200 })1235 })
1201 self.write(cr, uid, [wiz.id], header_values, context=context)1236 self.write(cr, uid, [wiz.id], header_values, context=context)
12021237
@@ -1504,6 +1539,7 @@
1504 'change_ok': fields.function(_get_line_info, method=True, multi='line',1539 'change_ok': fields.function(_get_line_info, method=True, multi='line',
1505 type='boolean', string='Change', store=False),1540 type='boolean', string='Change', store=False),
1506 'error_msg': fields.text(string='Error message', readonly=True),1541 'error_msg': fields.text(string='Error message', readonly=True),
1542 'warning_msg': fields.text(string='Warning message', readonly=True),
1507 'parent_line_id': fields.many2one('wizard.import.po.simulation.screen.line',1543 'parent_line_id': fields.many2one('wizard.import.po.simulation.screen.line',
1508 string='Parent line id',1544 string='Parent line id',
1509 help='Use to split the good PO line',1545 help='Use to split the good PO line',
@@ -1522,6 +1558,19 @@
15221558
1523 for line in self.browse(cr, uid, ids, context=context):1559 for line in self.browse(cr, uid, ids, context=context):
1524 if line.error_msg:1560 if line.error_msg:
1561 raise osv.except_osv(_('Error'), line.error_msg)
1562
1563 return True
1564
1565 def get_warning_msg(self, cr, uid, ids, context=None):
1566 '''
1567 Display the warning message
1568 '''
1569 if isinstance(ids, (int, long)):
1570 ids = [ids]
1571
1572 for line in self.browse(cr, uid, ids, context=context):
1573 if line.error_msg:
1525 raise osv.except_osv(_('Warning'), line.error_msg)1574 raise osv.except_osv(_('Warning'), line.error_msg)
15261575
1527 return True1576 return True
@@ -1538,6 +1587,7 @@
1538 ids = [ids]1587 ids = [ids]
15391588
1540 errors = []1589 errors = []
1590 warnings = []
15411591
1542 for line in self.browse(cr, uid, ids, context=context):1592 for line in self.browse(cr, uid, ids, context=context):
1543 write_vals = {}1593 write_vals = {}
@@ -1545,10 +1595,9 @@
1545 # Comment1595 # Comment
1546 write_vals['imp_comment'] = values[15] and values[15].strip()1596 write_vals['imp_comment'] = values[15] and values[15].strip()
15471597
1548 if line.po_line_id.state in ('confirmed', 'done') or ( line.po_line_id.state in ('cancel', 'cancel_r') and write_vals['imp_comment'] != '[DELETE]'):1598 if line.po_line_id.state in ('confirmed', 'done') or (line.po_line_id.state in ('cancel', 'cancel_r') and write_vals['imp_comment'] != '[DELETE]'):
1549 write_vals['type_change'] = 'error'1599 write_vals['type_change'] = 'warning'
1550 errors.append(_('PO line has been confirmed or cancelled and consequently is not editable'))1600 warnings.append(_('PO line has been confirmed or cancelled and consequently is not editable'))
1551
15521601
1553 # External Ref.1602 # External Ref.
1554 write_vals['imp_external_ref'] = values[1]1603 write_vals['imp_external_ref'] = values[1]
@@ -1556,17 +1605,17 @@
1556 if line.in_line_number:1605 if line.in_line_number:
1557 pol_ids = self.pool.get('purchase.order.line').search(cr, uid, [('order_id', '=', line.simu_id.order_id.id), ('line_number', '=', line.in_line_number)], context=context)1606 pol_ids = self.pool.get('purchase.order.line').search(cr, uid, [('order_id', '=', line.simu_id.order_id.id), ('line_number', '=', line.in_line_number)], context=context)
1558 if not pol_ids and not (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'):1607 if not pol_ids and not (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'):
1559 errors.append(_('Line no is not consistent with validated PO.'))1608 warnings.append(_('Line no is not consistent with validated PO.'))
1560 write_vals['in_line_number'] = False1609 write_vals['in_line_number'] = False
1561 write_vals['type_change'] = 'warning'1610 write_vals['type_change'] = 'warning'
15621611
1563 if (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'):1612 if write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]':
1564 if not pol_ids:1613 if not pol_ids:
1565 write_vals['type_change'] = 'warning'1614 write_vals['type_change'] = 'warning'
1566 if line.in_line_number:1615 if line.in_line_number:
1567 errors.append(_('The import file is inconsistent. Line no. %s is not existing or was previously deleted') % line.in_line_number)1616 warnings.append(_('The import file is inconsistent. Line no. %s is not existing or was previously deleted') % line.in_line_number)
1568 else:1617 else:
1569 errors.append(_('The import file is inconsistent. The matching line is not existing or was previously deleted'))1618 warnings.append(_('The import file is inconsistent. The matching line is not existing or was previously deleted'))
1570 else:1619 else:
1571 if line.po_line_id.state in ('validated', 'validated_n'):1620 if line.po_line_id.state in ('validated', 'validated_n'):
1572 write_vals['type_change'] = 'del'1621 write_vals['type_change'] = 'del'
@@ -1617,12 +1666,19 @@
1617 write_vals['ad_info'] = ad_info1666 write_vals['ad_info'] = ad_info
16181667
1619 # Qty1668 # Qty
1620 err_msg = _('Incorrect float value for field \'Product Qty\'')1669 if values[4]:
1621 try:1670 try:
1622 qty = float(values[4])1671 qty = float(values[4])
1623 write_vals['imp_qty'] = qty1672 write_vals['imp_qty'] = qty
1624 except Exception:1673 if qty <= 0:
1625 errors.append(err_msg)1674 errors.append(_('You can not have an order line with a negative or zero quantity. Updated quantity is ignored'))
1675 write_vals['type_change'] = 'error'
1676 write_vals['imp_qty'] = 0.00
1677 except Exception:
1678 errors.append(_('Incorrect float value for field \'Product Qty\''))
1679 write_vals['type_change'] = 'error'
1680 write_vals['imp_qty'] = 0.00
1681 else:
1626 write_vals['type_change'] = 'error'1682 write_vals['type_change'] = 'error'
1627 write_vals['imp_qty'] = 0.001683 write_vals['imp_qty'] = 0.00
16281684
@@ -1776,18 +1832,26 @@
17761832
1777 if line.error_msg:1833 if line.error_msg:
1778 write_vals['type_change'] = 'error'1834 write_vals['type_change'] = 'error'
1835 if line.warning_msg and write_vals.get('type_change') != 'error':
1836 write_vals['type_change'] = 'warning'
17791837
1780 if write_vals.get('type_change') in ['error', 'warning']:1838 if write_vals.get('type_change') in ['warning', 'error']:
1781 err_msg = line.error_msg or ''1839 err_msg = line.error_msg or ''
1782 for err in errors:1840 for err in errors:
1783 if err_msg:1841 if err_msg:
1784 err_msg += ' - '1842 err_msg += ' - '
1785 err_msg += err1843 err_msg += err
1786 write_vals['error_msg'] = err_msg1844 write_vals['error_msg'] = err_msg
1845 warn_msg = line.error_msg or ''
1846 for warn in warnings:
1847 if warn_msg:
1848 warn_msg += ' - '
1849 warn_msg += warn
1850 write_vals['warn_msg'] = warn_msg
17871851
1788 self.write(cr, uid, [line.id], write_vals, context=context)1852 self.write(cr, uid, [line.id], write_vals, context=context)
17891853
1790 return errors1854 return errors, warnings
17911855
1792 def update_po_line(self, cr, uid, ids, context=None):1856 def update_po_line(self, cr, uid, ids, context=None):
1793 '''1857 '''
17941858
=== modified file 'bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml'
--- bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml 2019-03-29 17:02:16 +0000
+++ bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml 2019-06-07 07:31:09 +0000
@@ -33,7 +33,7 @@
33 <button name="print_simulation_report" string="Print report" icon="gtk-print" type="object" states="simu_done,import_progress,done" />33 <button name="print_simulation_report" string="Print report" icon="gtk-print" type="object" states="simu_done,import_progress,done" />
34 </group>34 </group>
35 <notebook colspan="4">35 <notebook colspan="4">
36 <page string="Error" attrs="{'invisible': [('import_error_ok', '=', False), ('state', '!=', 'error')]}">36 <page string="Errors/Warnings" attrs="{'invisible': [('import_error_ok', '=', False), ('state', '!=', 'error')]}">
37 <field name="message" nolabel="1" colspan="4" readonly="1" widget="full_text" />37 <field name="message" nolabel="1" colspan="4" readonly="1" widget="full_text" />
38 </page>38 </page>
39 <page string="Purchase Order">39 <page string="Purchase Order">
@@ -80,7 +80,7 @@
80 <page string="Details">80 <page string="Details">
81 <!-- LINES -->81 <!-- LINES -->
82 <field name="simu_line_ids" nolabel="1" colspan="4">82 <field name="simu_line_ids" nolabel="1" colspan="4">
83 <tree string="Lines" colors="grey: type_change == 'del'; red: type_change in ('warning', 'error'); orange: change_ok==True and type_change not in ('del', 'ignore', 'error', 'warning'); blue: type_change=='split'; green: type_change=='new'">83 <tree string="Lines" colors="grey: type_change == 'del'; red: type_change == 'error'; orange: type_change == 'warning'; darkgreen: change_ok==True and type_change not in ('del', 'ignore', 'error', 'warning'); green:type_change=='new'; blue: type_change=='split'">
84 <field name="in_product_id" />84 <field name="in_product_id" />
85 <field name="in_nomen" />85 <field name="in_nomen" />
86 <field name="in_comment" />86 <field name="in_comment" />
8787
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2019-06-04 19:13:17 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2019-06-07 07:31:09 +0000
@@ -28224,11 +28224,11 @@
28224msgstr "Chercher champs"28224msgstr "Chercher champs"
2822528225
28226#. module: msf_doc_import28226#. module: msf_doc_import
28227#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:69028227#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:728
28228#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:69828228#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:736
28229#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:81028229#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:964
28230#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:82028230#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1172
28231#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:82728231#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1179
28232#, python-format28232#, python-format
28233msgid "Line %s of the file: %s"28233msgid "Line %s of the file: %s"
28234msgstr "Ligne %s du fichier: %s"28234msgstr "Ligne %s du fichier: %s"
@@ -28386,12 +28386,13 @@
28386msgid "Determines the percentage which will be applied on field price from the product form."28386msgid "Determines the percentage which will be applied on field price from the product form."
28387msgstr "Détermine le pourcentage qui sera appliqué sur le champ du prix à partir du formulaire de produits."28387msgstr "Détermine le pourcentage qui sera appliqué sur le champ du prix à partir du formulaire de produits."
2838828388
28389#. modules: stock_override, kit28389#. modules: stock_override, kit, msf_doc_import
28390#: field:kit.mass.import,warning_import:028390#: field:kit.mass.import,warning_import:0
28391#: field:kit.mass.import,warning_message:028391#: field:kit.mass.import,warning_message:0
28392#: field:wizard.import.po.simulation.screen.line,warning_msg:0
28392#: field:change.dest.location,warn_msg:028393#: field:change.dest.location,warn_msg:0
28393msgid "Warning message"28394msgid "Warning message"
28394msgstr "Warning message"28395msgstr "Message d'avertissement"
2839528396
28396#. modules: product_attributes, product28397#. modules: product_attributes, product
28397#: selection:product.price.type,field:028398#: selection:product.price.type,field:0
@@ -41986,10 +41987,10 @@
41986msgstr "Nom de modèle facultatif des objets pour lesquels cette action doit être visible"41987msgstr "Nom de modèle facultatif des objets pour lesquels cette action doit être visible"
4198741988
41988#. module: msf_doc_import41989#. module: msf_doc_import
41989#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:138141990#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1600
41990#, python-format41991#, python-format
41991msgid "Line no is not consistent with validated PO."41992msgid "Line no is not consistent with validated PO."
41992msgstr "Line no is not consistent with validated PO."41993msgstr "Le num de ligne n'est pas cohérent avec le BC validé."
4199341994
41994#. module: unifield_setup41995#. module: unifield_setup
41995#: view:field.orders.setup:041996#: view:field.orders.setup:0
@@ -74683,7 +74684,6 @@
74683#: code:addons/msf_doc_import/wizard/wizard_import_po_line.py:32974684#: code:addons/msf_doc_import/wizard/wizard_import_po_line.py:329
74684#: code:addons/msf_doc_import/wizard/wizard_import_po_line.py:33174685#: code:addons/msf_doc_import/wizard/wizard_import_po_line.py:331
74685#: view:wizard.import.in.simulation.screen:074686#: view:wizard.import.in.simulation.screen:0
74686#: view:wizard.import.po.simulation.screen:0
74687#: code:addons/msf_instance/account.py:5774687#: code:addons/msf_instance/account.py:57
74688#: code:addons/msf_instance/account.py:6074688#: code:addons/msf_instance/account.py:60
74689#: code:addons/msf_instance/add_instance.py:59074689#: code:addons/msf_instance/add_instance.py:590
@@ -101894,8 +101894,12 @@
101894msgstr "Vous ne pouvez avoir qu'une seule Expédition en brouillon pour la même adresse, veuillez vérifier %s "101894msgstr "Vous ne pouvez avoir qu'une seule Expédition en brouillon pour la même adresse, veuillez vérifier %s "
101895101895
101896#. module: msf_doc_import101896#. module: msf_doc_import
101897#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:811101897#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:947
101898#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:827101898#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:971
101899#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1140
101900#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1144
101901#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1170
101902#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1177
101899#, python-format101903#, python-format
101900msgid "Line %s of the PO: %s"101904msgid "Line %s of the PO: %s"
101901msgstr "Ligne %s du BC: %s"101905msgstr "Ligne %s du BC: %s"
@@ -106784,6 +106788,59 @@
106784msgstr "Montant Estimé:"106788msgstr "Montant Estimé:"
106785106789
106786#. module: msf_doc_import106790#. module: msf_doc_import
106791#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1199
106792#, python-format
106793msgid "\n"
106794"## Error on header values ##\n"
106795"\n"
106796""
106797msgstr "\n"
106798"## Erreur sur les valeurs de l'entête ##\n"
106799"\n"
106800""
106801
106802#. module: msf_doc_import
106803#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1205
106804#, python-format
106805msgid "\n"
106806"## Warning on header values ##\n"
106807"\n"
106808""
106809msgstr "\n"
106810"## Avertissement sur les valeurs de l'entete ##\n"
106811"\n"
106812""
106813
106814#. module: msf_doc_import
106815#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1211
106816#, python-format
106817msgid "\n"
106818"## Error on line values ##\n"
106819"\n"
106820""
106821msgstr "\n"
106822"## Erreur sur les valeurs des lignes ##\n"
106823"\n"
106824""
106825
106826#. module: msf_doc_import
106827#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1217
106828#, python-format
106829msgid "\n"
106830"## Warning on line values ##\n"
106831"\n"
106832""
106833msgstr "\n"
106834"## Avertissement sur les valeurs des lignes ##\n"
106835"\n"
106836""
106837
106838#. module: msf_doc_import
106839#: view:wizard.import.po.simulation.screen:0
106840msgid "Errors/Warnings"
106841msgstr "Erreurs/Avertissements"
106842
106843#. module: msf_doc_import
106787#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1705106844#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1705
106788#, python-format106845#, python-format
106789msgid "A PO with a Loan, Donation before expiry, Standard donation or In Kind Donation Order Type can't have an Source Document in its lines"106846msgid "A PO with a Loan, Donation before expiry, Standard donation or In Kind Donation Order Type can't have an Source Document in its lines"
@@ -106795,6 +106852,7 @@
106795#, python-format106852#, python-format
106796msgid "You can't change the Order Type to Loan, Donation before expiry, Standard donation or In Kind Donation if a line has a Source Document"106853msgid "You can't change the Order Type to Loan, Donation before expiry, Standard donation or In Kind Donation if a line has a Source Document"
106797msgstr "Vous ne pouvez pas changer le Type de Commande en Prêt, Donation avant expiration, Donation normale ou Donation en Nature si une des lignes a un Document d'Origine"106854msgstr "Vous ne pouvez pas changer le Type de Commande en Prêt, Donation avant expiration, Donation normale ou Donation en Nature si une des lignes a un Document d'Origine"
106855<<<<<<< TREE
106798106856
106799#. module: stock106857#. module: stock
106800#: report:addons/stock/report/products_situation_report_xls.mako:217106858#: report:addons/stock/report/products_situation_report_xls.mako:217
@@ -106827,3 +106885,12 @@
106827msgid "Stop report"106885msgid "Stop report"
106828msgstr "Arrêter le rapport"106886msgstr "Arrêter le rapport"
106829106887
106888=======
106889
106890#. module: msf_doc_import
106891#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:947
106892#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1674
106893#, python-format
106894msgid "You can not have an order line with a negative or zero quantity. Updated quantity is ignored"
106895msgstr "Vous ne pouvez pas avoir de ligne de commande avec une quantité négative ou nulle. La quantité mise à jour est ignorée"
106896>>>>>>> MERGE-SOURCE
106830106897
=== modified file 'bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako'
--- bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako 2018-08-10 10:21:43 +0000
+++ bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako 2019-06-07 07:31:09 +0000
@@ -12,7 +12,11 @@
12 % endif12 % endif
13 <field name="partner_ref">${o.partner_ref or ''|x}</field>13 <field name="partner_ref">${o.partner_ref or ''|x}</field>
14 <field name="details">${o.details or ''|x}</field>14 <field name="details">${o.details or ''|x}</field>
15 <field name="stock_take_date">${o.stock_take_date or ''|x}</field>15 % if o.stock_take_date and o.stock_take_date not in (False, 'False'):
16 <field name="stock_take_date">${o.stock_take_date|n}</field>
17 % else:
18 <field name="stock_take_date"></field>
19 % endif
16 % if o.delivery_requested_date and o.delivery_requested_date not in (False, 'False'):20 % if o.delivery_requested_date and o.delivery_requested_date not in (False, 'False'):
17 <field name="delivery_requested_date">${o.delivery_requested_date or ''|n}</field>21 <field name="delivery_requested_date">${o.delivery_requested_date or ''|n}</field>
18 % else:22 % else:
@@ -77,7 +81,11 @@
77 <field name="name">${l.currency_id and l.currency_id.name or ''|x}</field>81 <field name="name">${l.currency_id and l.currency_id.name or ''|x}</field>
78 </field>82 </field>
79 <field name="origin">${l.origin or ''|x}</field>83 <field name="origin">${l.origin or ''|x}</field>
80 <field name="stock_take_date">${l.stock_take_date or ''|x}</field>84 % if l.stock_take_date and l.stock_take_date not in (False, 'False'):
85 <field name="stock_take_date">${l.stock_take_date|n}</field>
86 % else:
87 <field name="stock_take_date"></field>
88 % endif
81 % if l.date_planned and l.date_planned not in (False, 'False'):89 % if l.date_planned and l.date_planned not in (False, 'False'):
82 <field name="date_planned">${l.date_planned|n}</field>90 <field name="date_planned">${l.date_planned|n}</field>
83 % else:91 % else:
8492
=== modified file 'bin/addons/msf_tools/automated_export_job.py'
--- bin/addons/msf_tools/automated_export_job.py 2019-03-21 11:29:45 +0000
+++ bin/addons/msf_tools/automated_export_job.py 2019-06-07 07:31:09 +0000
@@ -242,12 +242,9 @@
242 if not rep.startswith('2'):242 if not rep.startswith('2'):
243 raise osv.except_osv(_('Error'), _('Unable to write report on FTP server'))243 raise osv.except_osv(_('Error'), _('Unable to write report on FTP server'))
244 elif on_ftp and job_brw.export_id.ftp_protocol == 'sftp':244 elif on_ftp and job_brw.export_id.ftp_protocol == 'sftp':
245 new_tmp_file_name = os.path.join(os.path.dirname(temp_path), filename)
246 os.rename(temp_path, new_tmp_file_name)
247 temp_path = new_tmp_file_name
248 try:245 try:
249 with sftp.cd(job_brw.export_id.report_path):246 with sftp.cd(job_brw.export_id.report_path):
250 sftp.put(new_tmp_file_name, preserve_mtime=True)247 sftp.put(temp_path, filename, preserve_mtime=True)
251 except:248 except:
252 raise osv.except_osv(_('Error'), _('Unable to write report on SFTP server'))249 raise osv.except_osv(_('Error'), _('Unable to write report on SFTP server'))
253250
254251
=== modified file 'bin/addons/msf_tools/automated_import_job.py'
--- bin/addons/msf_tools/automated_import_job.py 2019-04-15 12:49:45 +0000
+++ bin/addons/msf_tools/automated_import_job.py 2019-06-07 07:31:09 +0000
@@ -622,12 +622,9 @@
622 if not rep.startswith('2'):622 if not rep.startswith('2'):
623 raise osv.except_osv(_('Error'), _('Unable to write report on FTP server'))623 raise osv.except_osv(_('Error'), _('Unable to write report on FTP server'))
624 elif on_ftp and job_brw.import_id.ftp_protocol == 'sftp':624 elif on_ftp and job_brw.import_id.ftp_protocol == 'sftp':
625 new_tmp_file_name = os.path.join(os.path.dirname(temp_path), filename)
626 os.rename(temp_path, new_tmp_file_name)
627 temp_path = new_tmp_file_name
628 try:625 try:
629 with sftp.cd(job_brw.import_id.report_path):626 with sftp.cd(job_brw.import_id.report_path):
630 sftp.put(new_tmp_file_name, preserve_mtime=True)627 sftp.put(temp_path, filename, preserve_mtime=True)
631 except:628 except:
632 raise osv.except_osv(_('Error'), _('Unable to write report on SFTP server'))629 raise osv.except_osv(_('Error'), _('Unable to write report on SFTP server'))
633630

Subscribers

People subscribed via source and target branches

to all changes: