Merge lp:~mukunde/unifield-server/8088 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6255
Proposed branch: lp:~mukunde/unifield-server/8088
Merge into: lp:unifield-server
Diff against target: 238 lines (+97/-4) (has conflicts)
4 files modified
bin/addons/msf_doc_import/msf_import_export.py (+42/-3)
bin/addons/msf_doc_import/msf_import_export_conf.py (+2/-0)
bin/addons/msf_doc_import/report/import_generic_template.py (+1/-1)
bin/addons/msf_profile/i18n/fr_MF.po (+52/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~mukunde/unifield-server/8088
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+420749@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/msf_import_export.py'
--- bin/addons/msf_doc_import/msf_import_export.py 2021-11-02 16:20:11 +0000
+++ bin/addons/msf_doc_import/msf_import_export.py 2022-04-28 16:07:53 +0000
@@ -843,7 +843,7 @@
843 self._cache[dbname].setdefault('product.product.%s' % field, {})843 self._cache[dbname].setdefault('product.product.%s' % field, {})
844 self._cache[dbname]['product.product.%s.%s' % (field, value)] = key844 self._cache[dbname]['product.product.%s.%s' % (field, value)] = key
845 break845 break
846 if fields_def[field]['type'] == 'many2many':846 if fields_def[field]['type'] == 'many2many' and field != 'fp_account_ids':
847 new_obj = self.pool.get(fields_def[field]['relation'])847 new_obj = self.pool.get(fields_def[field]['relation'])
848 ret = [(6, 0, [])]848 ret = [(6, 0, [])]
849 for name in value.split(','):849 for name in value.split(','):
@@ -964,8 +964,13 @@
964 data[points[0]] = False964 data[points[0]] = False
965 elif line_data[n]:965 elif line_data[n]:
966 data[points[0]] = _get_obj(h, line_data[n], fields_def) or False966 data[points[0]] = _get_obj(h, line_data[n], fields_def) or False
967 elif fields_def[points[0]]['type'] == 'many2many' and line_data[n]:967 elif fields_def[points[0]]['type'] == 'many2many' and line_data[n] :
968 data.setdefault(points[0], []).append((4, _get_obj(h, line_data[n], fields_def)))968 if points[0] == 'fp_account_ids' :
969 value = process_data(points[0], line_data[n], fields_def)
970 if value is not None:
971 data[points[0]] = value
972 else:
973 data.setdefault(points[0], []).append((4, _get_obj(h, line_data[n], fields_def)))
969974
970 if not line_ok:975 if not line_ok:
971 rejected.append((row_index+1, line_data, ''))976 rejected.append((row_index+1, line_data, ''))
@@ -1047,6 +1052,12 @@
1047 raise Exception(_('The Parent Analytic Account must be a View type Funding Pool.'))1052 raise Exception(_('The Parent Analytic Account must be a View type Funding Pool.'))
1048 # Cost Centers1053 # Cost Centers
1049 if data.get('cost_center_ids'):1054 if data.get('cost_center_ids'):
1055 # Block the possibility to have both a list of Cost Centers and "Allow all Cost Centers" set to "True"
1056 if data.get('allow_all_cc_with_fp'):
1057 raise Exception(_('Import error for account "%s" : If listing Cost Centers, "Allow all Cost Centers" must be set to False.') % data.get('name'))
1058 else:
1059 # Listing "Cost Centers" unticks the box "Allow all Cost Centers" in the FP form
1060 data['allow_all_cc_with_fp'] = False
1050 cc_list = []1061 cc_list = []
1051 for cost_center in data.get('cost_center_ids').split(','):1062 for cost_center in data.get('cost_center_ids').split(','):
1052 cc = cost_center.strip()1063 cc = cost_center.strip()
@@ -1062,6 +1073,12 @@
1062 data['cost_center_ids'] = [(6, 0, [])]1073 data['cost_center_ids'] = [(6, 0, [])]
1063 # Account/Destination1074 # Account/Destination
1064 if data.get('tuple_destination_account_ids'):1075 if data.get('tuple_destination_account_ids'):
1076 # Block the possibility to have both "Accounts/Destinations" and "G/L Accounts
1077 if data.get('fp_account_ids'):
1078 raise Exception(_('Import error for account "%s" : Listing both Accounts/Destinations and G/L Accounts is not allowed') % data.get('name'))
1079 else:
1080 # Listing "Accounts/Destinations" unticks the box "Select Accounts Only" in the FP form
1081 data['select_accounts_only'] = False
1065 dest_acc_list = []1082 dest_acc_list = []
1066 for destination_account in data.get('tuple_destination_account_ids').split(','):1083 for destination_account in data.get('tuple_destination_account_ids').split(','):
1067 dest_acc_ids = []1084 dest_acc_ids = []
@@ -1080,6 +1097,28 @@
1080 data['tuple_destination_account_ids'] = [(6, 0, dest_acc_list)]1097 data['tuple_destination_account_ids'] = [(6, 0, dest_acc_list)]
1081 else:1098 else:
1082 data['tuple_destination_account_ids'] = [(6, 0, [])]1099 data['tuple_destination_account_ids'] = [(6, 0, [])]
1100 # G/L Accounts
1101 if data.get('fp_account_ids'):
1102 gl_list = []
1103 # Block the possibility to have both "Accounts/Destinations" and "G/L Accounts
1104 if data.get('tuple_destination_account_ids')[0][2]: # at this stage even though the dest/acc is empty, data['tuple_destination_account_ids'] is filled with (6, 0, [])
1105 raise Exception(_('Import error for account "%s" : Listing both Accounts/Destinations and G/L Accounts is not allowed') % data.get('name'))
1106 else:
1107 # Listing "G/L Accounts" ticks the box "Select Accounts Only" in the FP form
1108 data['select_accounts_only'] = True
1109 gl_iter = data.get('fp_account_ids').split(',')
1110 for name in gl_iter:
1111 name = name.strip()
1112 # Allow the same accounts as in the interface
1113 gl_dom = [('type', '!=', 'view'), ('is_analytic_addicted', '=', True), ('active', '=', 't'), ('code', '=', name), ('user_type_code', 'in', ['expense', 'income'])]
1114 gl_ids = acc_obj.search(cr, uid, gl_dom, limit=1, context=context)
1115 if gl_ids:
1116 gl_list.append(gl_ids[0])
1117 else:
1118 raise Exception(_('Import error for account "%s" : G/L Account "%s" not found or not of type Income or Expense') % (data.get('name'), name))
1119 data['fp_account_ids'] = [(6, 0, gl_list)]
1120 else:
1121 data['fp_account_ids'] = [(6, 0, [])]
10831122
1084 # Destinations1123 # Destinations
1085 dest_cc_tuple_list = []1124 dest_cc_tuple_list = []
10861125
=== modified file 'bin/addons/msf_doc_import/msf_import_export_conf.py'
--- bin/addons/msf_doc_import/msf_import_export_conf.py 2021-11-16 14:37:35 +0000
+++ bin/addons/msf_doc_import/msf_import_export_conf.py 2022-04-28 16:07:53 +0000
@@ -517,6 +517,8 @@
517 'cost_center_ids',517 'cost_center_ids',
518 'tuple_destination_account_ids',518 'tuple_destination_account_ids',
519 'instance_id.code',519 'instance_id.code',
520 'allow_all_cc_with_fp',
521 'fp_account_ids',
520 ],522 ],
521 'required_field_list': [523 'required_field_list': [
522 'name',524 'name',
523525
=== modified file 'bin/addons/msf_doc_import/report/import_generic_template.py'
--- bin/addons/msf_doc_import/report/import_generic_template.py 2019-05-24 15:09:28 +0000
+++ bin/addons/msf_doc_import/report/import_generic_template.py 2022-04-28 16:07:53 +0000
@@ -147,7 +147,7 @@
147 new_ctx = context.copy()147 new_ctx = context.copy()
148 if 'lang' in MODEL_DICT.get(data['selection'], {}):148 if 'lang' in MODEL_DICT.get(data['selection'], {}):
149 new_ctx['lang'] = MODEL_DICT[data['selection']]['lang']149 new_ctx['lang'] = MODEL_DICT[data['selection']]['lang']
150 if data['selection'] == 'destinations':150 if data['selection'] in ['destinations', 'funding_pools']:
151 new_ctx['account_only_code'] = True151 new_ctx['account_only_code'] = True
152 for i in range(0, len(ids), chunk_size):152 for i in range(0, len(ids), chunk_size):
153 ids_chunk = ids[i:i + chunk_size]153 ids_chunk = ids[i:i + chunk_size]
154154
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2022-04-27 14:36:40 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2022-04-28 16:07:53 +0000
@@ -43433,8 +43433,12 @@
43433#: field:replenishment.segment.line,product_id:043433#: field:replenishment.segment.line,product_id:0
43434#: report:kitting.order.report:043434#: report:kitting.order.report:0
43435#: code:addons/msf_doc_import/report/return_from_unit_export.py:11843435#: code:addons/msf_doc_import/report/return_from_unit_export.py:118
43436<<<<<<< TREE
43436#: field:wizard.import.po.simulation.screen.line,in_product_code:043437#: field:wizard.import.po.simulation.screen.line,in_product_code:0
43437#: field:tender.line,product_default_code:043438#: field:tender.line,product_default_code:0
43439=======
43440#: field:wizard.import.po.simulation.screen.line,in_product_code:0
43441>>>>>>> MERGE-SOURCE
43438#, python-format43442#, python-format
43439msgid "Product Code"43443msgid "Product Code"
43440msgstr "Code Produit"43444msgstr "Code Produit"
@@ -43865,12 +43869,21 @@
43865msgid "Update Instance"43869msgid "Update Instance"
43866msgstr "Mise à jour Instance"43870msgstr "Mise à jour Instance"
4386743871
43872<<<<<<< TREE
43868#. modules: msf_doc_import, tender_flow, delete_button, sync_so, sales_followup43873#. modules: msf_doc_import, tender_flow, delete_button, sync_so, sales_followup
43869#: constraint:tender:043874#: constraint:tender:0
43870#: constraint:tender:043875#: constraint:tender:0
43871#: constraint:tender:043876#: constraint:tender:0
43872#: constraint:tender:043877#: constraint:tender:0
43873#: constraint:tender.line:043878#: constraint:tender.line:0
43879=======
43880#. modules: msf_doc_import, tender_flow, delete_button, sync_so
43881#: constraint:tender:0
43882#: constraint:tender:0
43883#: constraint:tender:0
43884#: constraint:tender:0
43885#: constraint:tender.line:0
43886>>>>>>> MERGE-SOURCE
43874msgid "You cannot validate this tender because it contains a line with an inactive product"43887msgid "You cannot validate this tender because it contains a line with an inactive product"
43875msgstr "Vous ne pouvez pas valider cet appel d'offre car il contient une ligne avec un produit inactif"43888msgstr "Vous ne pouvez pas valider cet appel d'offre car il contient une ligne avec un produit inactif"
4387643889
@@ -48996,10 +49009,16 @@
48996#: selection:res.partner,transport_2:049009#: selection:res.partner,transport_2:0
48997#: selection:purchase.order,transport_type:049010#: selection:purchase.order,transport_type:0
48998#: selection:shipment.add.pack.processor,transport_type:049011#: selection:shipment.add.pack.processor,transport_type:0
49012<<<<<<< TREE
48999#: selection:wizard.import.in.simulation.screen,transport_type:049013#: selection:wizard.import.in.simulation.screen,transport_type:0
49000#: selection:wizard.import.po.simulation.screen,imp_transport_type:049014#: selection:wizard.import.po.simulation.screen,imp_transport_type:0
49001#: selection:wizard.import.po.simulation.screen,in_transport_type:049015#: selection:wizard.import.po.simulation.screen,in_transport_type:0
49002#: selection:international.transport.cost.report,transport_type:049016#: selection:international.transport.cost.report,transport_type:0
49017=======
49018#: selection:wizard.import.in.simulation.screen,transport_type:0
49019#: selection:wizard.import.po.simulation.screen,imp_transport_type:0
49020#: selection:wizard.import.po.simulation.screen,in_transport_type:0
49021>>>>>>> MERGE-SOURCE
49003msgid "Air"49022msgid "Air"
49004msgstr "Air"49023msgstr "Air"
4900549024
@@ -90786,12 +90805,16 @@
90786#: view:stock.move.cancel.more.wizard:090805#: view:stock.move.cancel.more.wizard:0
90787#: view:stock.picking.cancel.more.wizard:090806#: view:stock.picking.cancel.more.wizard:0
90788#: view:product.ask.activate.wizard:090807#: view:product.ask.activate.wizard:0
90808<<<<<<< TREE
90789#: view:wizard.cancel.lines:090809#: view:wizard.cancel.lines:0
90790#: view:shipment.add.pack.processor:090810#: view:shipment.add.pack.processor:0
90791#: view:po.follow.up:090811#: view:po.follow.up:0
90792#: view:supplier.performance.wizard:090812#: view:supplier.performance.wizard:0
90793#: view:wizard.pick.import:090813#: view:wizard.pick.import:0
90794#: view:stock.delivery.wizard:090814#: view:stock.delivery.wizard:0
90815=======
90816#: view:wizard.cancel.lines:0
90817>>>>>>> MERGE-SOURCE
90795msgid "Actions"90818msgid "Actions"
90796msgstr "Actions"90819msgstr "Actions"
9079790820
@@ -93283,8 +93306,13 @@
93283msgid "Need Batch Number (Standard) not Expiry Date (Internal)"93306msgid "Need Batch Number (Standard) not Expiry Date (Internal)"
93284msgstr "Mention nécessaire d'un numéro de lot (Standard) mais pas d'une date d'expiration (Interne)"93307msgstr "Mention nécessaire d'un numéro de lot (Standard) mais pas d'une date d'expiration (Interne)"
9328593308
93309<<<<<<< TREE
93286#. module: msf_outgoing, msf_doc_import,return_claim,kit,stock93310#. module: msf_outgoing, msf_doc_import,return_claim,kit,stock
93311=======
93312#. module: msf_outgoing, msf_doc_import
93313>>>>>>> MERGE-SOURCE
93287#: code:addons/msf_outgoing/__init__.py:4393314#: code:addons/msf_outgoing/__init__.py:43
93315<<<<<<< TREE
93288#: selection:assign.to.kit.line,integrity_status:093316#: selection:assign.to.kit.line,integrity_status:0
93289#: selection:kit.selection.line,integrity_status:093317#: selection:kit.selection.line,integrity_status:0
93290#: selection:kit.selection.sale.line,integrity_status:093318#: selection:kit.selection.sale.line,integrity_status:0
@@ -93298,6 +93326,9 @@
93298#: selection:stock.move.processor,integrity_status:093326#: selection:stock.move.processor,integrity_status:0
93299#: selection:claim.product.line,integrity_status_claim_product_line:093327#: selection:claim.product.line,integrity_status_claim_product_line:0
93300#: selection:stock.move,integrity_error:093328#: selection:stock.move,integrity_error:0
93329=======
93330#: selection:wizard.import.in.line.simulation.screen,integrity_status:0
93331>>>>>>> MERGE-SOURCE
93301msgid "BN is linked to another product"93332msgid "BN is linked to another product"
93302msgstr "Ce lot est lié à un autre produit"93333msgstr "Ce lot est lié à un autre produit"
9330393334
@@ -114589,6 +114620,7 @@
114589msgid "Remove taxes on lines"114620msgid "Remove taxes on lines"
114590msgstr "Supprimer les taxes des lignes"114621msgstr "Supprimer les taxes des lignes"
114591114622
114623<<<<<<< TREE
114592#. module: stock114624#. module: stock
114593#: code:addons/stock/physical_inventory.py:1068114625#: code:addons/stock/physical_inventory.py:1068
114594#, python-format114626#, python-format
@@ -114821,3 +114853,23 @@
114821#, python-format114853#, python-format
114822msgid "There is already an Internal Partner with the name '%s'. The Intermission Partner could not be activated"114854msgid "There is already an Internal Partner with the name '%s'. The Intermission Partner could not be activated"
114823msgstr "Il y a déjà un Partenaire Interne ayant le nom '%s'. Le Partenaire Intermission n'a pas pu être activé"114855msgstr "Il y a déjà un Partenaire Interne ayant le nom '%s'. Le Partenaire Intermission n'a pas pu être activé"
114856=======
114857#. module: msf_doc_import
114858#: code:addons/msf_doc_import/msf_import_export.py:1113
114859#, python-format
114860msgid "Import error for account \"%s\" : G/L Account \"%s\" not found or not of type Income or Expense"
114861msgstr "Erreur lors de l'import du compte \"%s\" : Le Compte Grand Livre \"%s\" n'a pas été trouvé ou n'est pas de type Compte de Produits ou Compte de Charge"
114862
114863#. module: msf_doc_import
114864#: code:addons/msf_doc_import/msf_import_export.py:1052
114865#, python-format
114866msgid "Import error for account \"%s\" : If listing Cost Centers, \"Allow all Cost Centers\" must be set to False."
114867msgstr "Erreur lors de l'import du compte \"%s\" : Si vous listez les Centres de Coût, \"Autoriser tous les Centres de Coût\" doit être mis sur Faux"
114868
114869#. module: msf_doc_import
114870#: code:addons/msf_doc_import/msf_import_export.py:1073
114871#: code:addons/msf_doc_import/msf_import_export.py:1100
114872#, python-format
114873msgid "Import error for account \"%s\" : Listing both Accounts/Destinations and G/L Accounts is not allowed"
114874msgstr "Erreur lors de l'import du compte \"%s\" : Lister à la fois les Comptes/Destinations et les Comptes Grand Livre n'est pas permis"
114875>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches