Merge lp:~mukunde/unifield-server/8088 into lp:unifield-server
- 8088
- Merge into trunk
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+420749@code.launchpad.net |
Commit message
Description of the change
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
1 | === modified file 'bin/addons/msf_doc_import/msf_import_export.py' | |||
2 | --- bin/addons/msf_doc_import/msf_import_export.py 2021-11-02 16:20:11 +0000 | |||
3 | +++ bin/addons/msf_doc_import/msf_import_export.py 2022-04-28 16:07:53 +0000 | |||
4 | @@ -843,7 +843,7 @@ | |||
5 | 843 | self._cache[dbname].setdefault('product.product.%s' % field, {}) | 843 | self._cache[dbname].setdefault('product.product.%s' % field, {}) |
6 | 844 | self._cache[dbname]['product.product.%s.%s' % (field, value)] = key | 844 | self._cache[dbname]['product.product.%s.%s' % (field, value)] = key |
7 | 845 | break | 845 | break |
9 | 846 | if fields_def[field]['type'] == 'many2many': | 846 | if fields_def[field]['type'] == 'many2many' and field != 'fp_account_ids': |
10 | 847 | new_obj = self.pool.get(fields_def[field]['relation']) | 847 | new_obj = self.pool.get(fields_def[field]['relation']) |
11 | 848 | ret = [(6, 0, [])] | 848 | ret = [(6, 0, [])] |
12 | 849 | for name in value.split(','): | 849 | for name in value.split(','): |
13 | @@ -964,8 +964,13 @@ | |||
14 | 964 | data[points[0]] = False | 964 | data[points[0]] = False |
15 | 965 | elif line_data[n]: | 965 | elif line_data[n]: |
16 | 966 | data[points[0]] = _get_obj(h, line_data[n], fields_def) or False | 966 | data[points[0]] = _get_obj(h, line_data[n], fields_def) or False |
19 | 967 | elif fields_def[points[0]]['type'] == 'many2many' and line_data[n]: | 967 | elif fields_def[points[0]]['type'] == 'many2many' and line_data[n] : |
20 | 968 | data.setdefault(points[0], []).append((4, _get_obj(h, line_data[n], fields_def))) | 968 | if points[0] == 'fp_account_ids' : |
21 | 969 | value = process_data(points[0], line_data[n], fields_def) | ||
22 | 970 | if value is not None: | ||
23 | 971 | data[points[0]] = value | ||
24 | 972 | else: | ||
25 | 973 | data.setdefault(points[0], []).append((4, _get_obj(h, line_data[n], fields_def))) | ||
26 | 969 | 974 | ||
27 | 970 | if not line_ok: | 975 | if not line_ok: |
28 | 971 | rejected.append((row_index+1, line_data, '')) | 976 | rejected.append((row_index+1, line_data, '')) |
29 | @@ -1047,6 +1052,12 @@ | |||
30 | 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.')) |
31 | 1048 | # Cost Centers | 1053 | # Cost Centers |
32 | 1049 | if data.get('cost_center_ids'): | 1054 | if data.get('cost_center_ids'): |
33 | 1055 | # Block the possibility to have both a list of Cost Centers and "Allow all Cost Centers" set to "True" | ||
34 | 1056 | if data.get('allow_all_cc_with_fp'): | ||
35 | 1057 | raise Exception(_('Import error for account "%s" : If listing Cost Centers, "Allow all Cost Centers" must be set to False.') % data.get('name')) | ||
36 | 1058 | else: | ||
37 | 1059 | # Listing "Cost Centers" unticks the box "Allow all Cost Centers" in the FP form | ||
38 | 1060 | data['allow_all_cc_with_fp'] = False | ||
39 | 1050 | cc_list = [] | 1061 | cc_list = [] |
40 | 1051 | for cost_center in data.get('cost_center_ids').split(','): | 1062 | for cost_center in data.get('cost_center_ids').split(','): |
41 | 1052 | cc = cost_center.strip() | 1063 | cc = cost_center.strip() |
42 | @@ -1062,6 +1073,12 @@ | |||
43 | 1062 | data['cost_center_ids'] = [(6, 0, [])] | 1073 | data['cost_center_ids'] = [(6, 0, [])] |
44 | 1063 | # Account/Destination | 1074 | # Account/Destination |
45 | 1064 | if data.get('tuple_destination_account_ids'): | 1075 | if data.get('tuple_destination_account_ids'): |
46 | 1076 | # Block the possibility to have both "Accounts/Destinations" and "G/L Accounts | ||
47 | 1077 | if data.get('fp_account_ids'): | ||
48 | 1078 | raise Exception(_('Import error for account "%s" : Listing both Accounts/Destinations and G/L Accounts is not allowed') % data.get('name')) | ||
49 | 1079 | else: | ||
50 | 1080 | # Listing "Accounts/Destinations" unticks the box "Select Accounts Only" in the FP form | ||
51 | 1081 | data['select_accounts_only'] = False | ||
52 | 1065 | dest_acc_list = [] | 1082 | dest_acc_list = [] |
53 | 1066 | for destination_account in data.get('tuple_destination_account_ids').split(','): | 1083 | for destination_account in data.get('tuple_destination_account_ids').split(','): |
54 | 1067 | dest_acc_ids = [] | 1084 | dest_acc_ids = [] |
55 | @@ -1080,6 +1097,28 @@ | |||
56 | 1080 | data['tuple_destination_account_ids'] = [(6, 0, dest_acc_list)] | 1097 | data['tuple_destination_account_ids'] = [(6, 0, dest_acc_list)] |
57 | 1081 | else: | 1098 | else: |
58 | 1082 | data['tuple_destination_account_ids'] = [(6, 0, [])] | 1099 | data['tuple_destination_account_ids'] = [(6, 0, [])] |
59 | 1100 | # G/L Accounts | ||
60 | 1101 | if data.get('fp_account_ids'): | ||
61 | 1102 | gl_list = [] | ||
62 | 1103 | # Block the possibility to have both "Accounts/Destinations" and "G/L Accounts | ||
63 | 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, []) | ||
64 | 1105 | raise Exception(_('Import error for account "%s" : Listing both Accounts/Destinations and G/L Accounts is not allowed') % data.get('name')) | ||
65 | 1106 | else: | ||
66 | 1107 | # Listing "G/L Accounts" ticks the box "Select Accounts Only" in the FP form | ||
67 | 1108 | data['select_accounts_only'] = True | ||
68 | 1109 | gl_iter = data.get('fp_account_ids').split(',') | ||
69 | 1110 | for name in gl_iter: | ||
70 | 1111 | name = name.strip() | ||
71 | 1112 | # Allow the same accounts as in the interface | ||
72 | 1113 | gl_dom = [('type', '!=', 'view'), ('is_analytic_addicted', '=', True), ('active', '=', 't'), ('code', '=', name), ('user_type_code', 'in', ['expense', 'income'])] | ||
73 | 1114 | gl_ids = acc_obj.search(cr, uid, gl_dom, limit=1, context=context) | ||
74 | 1115 | if gl_ids: | ||
75 | 1116 | gl_list.append(gl_ids[0]) | ||
76 | 1117 | else: | ||
77 | 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)) | ||
78 | 1119 | data['fp_account_ids'] = [(6, 0, gl_list)] | ||
79 | 1120 | else: | ||
80 | 1121 | data['fp_account_ids'] = [(6, 0, [])] | ||
81 | 1083 | 1122 | ||
82 | 1084 | # Destinations | 1123 | # Destinations |
83 | 1085 | dest_cc_tuple_list = [] | 1124 | dest_cc_tuple_list = [] |
84 | 1086 | 1125 | ||
85 | === modified file 'bin/addons/msf_doc_import/msf_import_export_conf.py' | |||
86 | --- bin/addons/msf_doc_import/msf_import_export_conf.py 2021-11-16 14:37:35 +0000 | |||
87 | +++ bin/addons/msf_doc_import/msf_import_export_conf.py 2022-04-28 16:07:53 +0000 | |||
88 | @@ -517,6 +517,8 @@ | |||
89 | 517 | 'cost_center_ids', | 517 | 'cost_center_ids', |
90 | 518 | 'tuple_destination_account_ids', | 518 | 'tuple_destination_account_ids', |
91 | 519 | 'instance_id.code', | 519 | 'instance_id.code', |
92 | 520 | 'allow_all_cc_with_fp', | ||
93 | 521 | 'fp_account_ids', | ||
94 | 520 | ], | 522 | ], |
95 | 521 | 'required_field_list': [ | 523 | 'required_field_list': [ |
96 | 522 | 'name', | 524 | 'name', |
97 | 523 | 525 | ||
98 | === modified file 'bin/addons/msf_doc_import/report/import_generic_template.py' | |||
99 | --- bin/addons/msf_doc_import/report/import_generic_template.py 2019-05-24 15:09:28 +0000 | |||
100 | +++ bin/addons/msf_doc_import/report/import_generic_template.py 2022-04-28 16:07:53 +0000 | |||
101 | @@ -147,7 +147,7 @@ | |||
102 | 147 | new_ctx = context.copy() | 147 | new_ctx = context.copy() |
103 | 148 | if 'lang' in MODEL_DICT.get(data['selection'], {}): | 148 | if 'lang' in MODEL_DICT.get(data['selection'], {}): |
104 | 149 | new_ctx['lang'] = MODEL_DICT[data['selection']]['lang'] | 149 | new_ctx['lang'] = MODEL_DICT[data['selection']]['lang'] |
106 | 150 | if data['selection'] == 'destinations': | 150 | if data['selection'] in ['destinations', 'funding_pools']: |
107 | 151 | new_ctx['account_only_code'] = True | 151 | new_ctx['account_only_code'] = True |
108 | 152 | for i in range(0, len(ids), chunk_size): | 152 | for i in range(0, len(ids), chunk_size): |
109 | 153 | ids_chunk = ids[i:i + chunk_size] | 153 | ids_chunk = ids[i:i + chunk_size] |
110 | 154 | 154 | ||
111 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
112 | --- bin/addons/msf_profile/i18n/fr_MF.po 2022-04-27 14:36:40 +0000 | |||
113 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2022-04-28 16:07:53 +0000 | |||
114 | @@ -43433,8 +43433,12 @@ | |||
115 | 43433 | #: field:replenishment.segment.line,product_id:0 | 43433 | #: field:replenishment.segment.line,product_id:0 |
116 | 43434 | #: report:kitting.order.report:0 | 43434 | #: report:kitting.order.report:0 |
117 | 43435 | #: code:addons/msf_doc_import/report/return_from_unit_export.py:118 | 43435 | #: code:addons/msf_doc_import/report/return_from_unit_export.py:118 |
118 | 43436 | <<<<<<< TREE | ||
119 | 43436 | #: field:wizard.import.po.simulation.screen.line,in_product_code:0 | 43437 | #: field:wizard.import.po.simulation.screen.line,in_product_code:0 |
120 | 43437 | #: field:tender.line,product_default_code:0 | 43438 | #: field:tender.line,product_default_code:0 |
121 | 43439 | ======= | ||
122 | 43440 | #: field:wizard.import.po.simulation.screen.line,in_product_code:0 | ||
123 | 43441 | >>>>>>> MERGE-SOURCE | ||
124 | 43438 | #, python-format | 43442 | #, python-format |
125 | 43439 | msgid "Product Code" | 43443 | msgid "Product Code" |
126 | 43440 | msgstr "Code Produit" | 43444 | msgstr "Code Produit" |
127 | @@ -43865,12 +43869,21 @@ | |||
128 | 43865 | msgid "Update Instance" | 43869 | msgid "Update Instance" |
129 | 43866 | msgstr "Mise à jour Instance" | 43870 | msgstr "Mise à jour Instance" |
130 | 43867 | 43871 | ||
131 | 43872 | <<<<<<< TREE | ||
132 | 43868 | #. modules: msf_doc_import, tender_flow, delete_button, sync_so, sales_followup | 43873 | #. modules: msf_doc_import, tender_flow, delete_button, sync_so, sales_followup |
133 | 43869 | #: constraint:tender:0 | 43874 | #: constraint:tender:0 |
134 | 43870 | #: constraint:tender:0 | 43875 | #: constraint:tender:0 |
135 | 43871 | #: constraint:tender:0 | 43876 | #: constraint:tender:0 |
136 | 43872 | #: constraint:tender:0 | 43877 | #: constraint:tender:0 |
137 | 43873 | #: constraint:tender.line:0 | 43878 | #: constraint:tender.line:0 |
138 | 43879 | ======= | ||
139 | 43880 | #. modules: msf_doc_import, tender_flow, delete_button, sync_so | ||
140 | 43881 | #: constraint:tender:0 | ||
141 | 43882 | #: constraint:tender:0 | ||
142 | 43883 | #: constraint:tender:0 | ||
143 | 43884 | #: constraint:tender:0 | ||
144 | 43885 | #: constraint:tender.line:0 | ||
145 | 43886 | >>>>>>> MERGE-SOURCE | ||
146 | 43874 | msgid "You cannot validate this tender because it contains a line with an inactive product" | 43887 | msgid "You cannot validate this tender because it contains a line with an inactive product" |
147 | 43875 | msgstr "Vous ne pouvez pas valider cet appel d'offre car il contient une ligne avec un produit inactif" | 43888 | msgstr "Vous ne pouvez pas valider cet appel d'offre car il contient une ligne avec un produit inactif" |
148 | 43876 | 43889 | ||
149 | @@ -48996,10 +49009,16 @@ | |||
150 | 48996 | #: selection:res.partner,transport_2:0 | 49009 | #: selection:res.partner,transport_2:0 |
151 | 48997 | #: selection:purchase.order,transport_type:0 | 49010 | #: selection:purchase.order,transport_type:0 |
152 | 48998 | #: selection:shipment.add.pack.processor,transport_type:0 | 49011 | #: selection:shipment.add.pack.processor,transport_type:0 |
153 | 49012 | <<<<<<< TREE | ||
154 | 48999 | #: selection:wizard.import.in.simulation.screen,transport_type:0 | 49013 | #: selection:wizard.import.in.simulation.screen,transport_type:0 |
155 | 49000 | #: selection:wizard.import.po.simulation.screen,imp_transport_type:0 | 49014 | #: selection:wizard.import.po.simulation.screen,imp_transport_type:0 |
156 | 49001 | #: selection:wizard.import.po.simulation.screen,in_transport_type:0 | 49015 | #: selection:wizard.import.po.simulation.screen,in_transport_type:0 |
157 | 49002 | #: selection:international.transport.cost.report,transport_type:0 | 49016 | #: selection:international.transport.cost.report,transport_type:0 |
158 | 49017 | ======= | ||
159 | 49018 | #: selection:wizard.import.in.simulation.screen,transport_type:0 | ||
160 | 49019 | #: selection:wizard.import.po.simulation.screen,imp_transport_type:0 | ||
161 | 49020 | #: selection:wizard.import.po.simulation.screen,in_transport_type:0 | ||
162 | 49021 | >>>>>>> MERGE-SOURCE | ||
163 | 49003 | msgid "Air" | 49022 | msgid "Air" |
164 | 49004 | msgstr "Air" | 49023 | msgstr "Air" |
165 | 49005 | 49024 | ||
166 | @@ -90786,12 +90805,16 @@ | |||
167 | 90786 | #: view:stock.move.cancel.more.wizard:0 | 90805 | #: view:stock.move.cancel.more.wizard:0 |
168 | 90787 | #: view:stock.picking.cancel.more.wizard:0 | 90806 | #: view:stock.picking.cancel.more.wizard:0 |
169 | 90788 | #: view:product.ask.activate.wizard:0 | 90807 | #: view:product.ask.activate.wizard:0 |
170 | 90808 | <<<<<<< TREE | ||
171 | 90789 | #: view:wizard.cancel.lines:0 | 90809 | #: view:wizard.cancel.lines:0 |
172 | 90790 | #: view:shipment.add.pack.processor:0 | 90810 | #: view:shipment.add.pack.processor:0 |
173 | 90791 | #: view:po.follow.up:0 | 90811 | #: view:po.follow.up:0 |
174 | 90792 | #: view:supplier.performance.wizard:0 | 90812 | #: view:supplier.performance.wizard:0 |
175 | 90793 | #: view:wizard.pick.import:0 | 90813 | #: view:wizard.pick.import:0 |
176 | 90794 | #: view:stock.delivery.wizard:0 | 90814 | #: view:stock.delivery.wizard:0 |
177 | 90815 | ======= | ||
178 | 90816 | #: view:wizard.cancel.lines:0 | ||
179 | 90817 | >>>>>>> MERGE-SOURCE | ||
180 | 90795 | msgid "Actions" | 90818 | msgid "Actions" |
181 | 90796 | msgstr "Actions" | 90819 | msgstr "Actions" |
182 | 90797 | 90820 | ||
183 | @@ -93283,8 +93306,13 @@ | |||
184 | 93283 | msgid "Need Batch Number (Standard) not Expiry Date (Internal)" | 93306 | msgid "Need Batch Number (Standard) not Expiry Date (Internal)" |
185 | 93284 | msgstr "Mention nécessaire d'un numéro de lot (Standard) mais pas d'une date d'expiration (Interne)" | 93307 | msgstr "Mention nécessaire d'un numéro de lot (Standard) mais pas d'une date d'expiration (Interne)" |
186 | 93285 | 93308 | ||
187 | 93309 | <<<<<<< TREE | ||
188 | 93286 | #. module: msf_outgoing, msf_doc_import,return_claim,kit,stock | 93310 | #. module: msf_outgoing, msf_doc_import,return_claim,kit,stock |
189 | 93311 | ======= | ||
190 | 93312 | #. module: msf_outgoing, msf_doc_import | ||
191 | 93313 | >>>>>>> MERGE-SOURCE | ||
192 | 93287 | #: code:addons/msf_outgoing/__init__.py:43 | 93314 | #: code:addons/msf_outgoing/__init__.py:43 |
193 | 93315 | <<<<<<< TREE | ||
194 | 93288 | #: selection:assign.to.kit.line,integrity_status:0 | 93316 | #: selection:assign.to.kit.line,integrity_status:0 |
195 | 93289 | #: selection:kit.selection.line,integrity_status:0 | 93317 | #: selection:kit.selection.line,integrity_status:0 |
196 | 93290 | #: selection:kit.selection.sale.line,integrity_status:0 | 93318 | #: selection:kit.selection.sale.line,integrity_status:0 |
197 | @@ -93298,6 +93326,9 @@ | |||
198 | 93298 | #: selection:stock.move.processor,integrity_status:0 | 93326 | #: selection:stock.move.processor,integrity_status:0 |
199 | 93299 | #: selection:claim.product.line,integrity_status_claim_product_line:0 | 93327 | #: selection:claim.product.line,integrity_status_claim_product_line:0 |
200 | 93300 | #: selection:stock.move,integrity_error:0 | 93328 | #: selection:stock.move,integrity_error:0 |
201 | 93329 | ======= | ||
202 | 93330 | #: selection:wizard.import.in.line.simulation.screen,integrity_status:0 | ||
203 | 93331 | >>>>>>> MERGE-SOURCE | ||
204 | 93301 | msgid "BN is linked to another product" | 93332 | msgid "BN is linked to another product" |
205 | 93302 | msgstr "Ce lot est lié à un autre produit" | 93333 | msgstr "Ce lot est lié à un autre produit" |
206 | 93303 | 93334 | ||
207 | @@ -114589,6 +114620,7 @@ | |||
208 | 114589 | msgid "Remove taxes on lines" | 114620 | msgid "Remove taxes on lines" |
209 | 114590 | msgstr "Supprimer les taxes des lignes" | 114621 | msgstr "Supprimer les taxes des lignes" |
210 | 114591 | 114622 | ||
211 | 114623 | <<<<<<< TREE | ||
212 | 114592 | #. module: stock | 114624 | #. module: stock |
213 | 114593 | #: code:addons/stock/physical_inventory.py:1068 | 114625 | #: code:addons/stock/physical_inventory.py:1068 |
214 | 114594 | #, python-format | 114626 | #, python-format |
215 | @@ -114821,3 +114853,23 @@ | |||
216 | 114821 | #, python-format | 114853 | #, python-format |
217 | 114822 | msgid "There is already an Internal Partner with the name '%s'. The Intermission Partner could not be activated" | 114854 | msgid "There is already an Internal Partner with the name '%s'. The Intermission Partner could not be activated" |
218 | 114823 | msgstr "Il y a déjà un Partenaire Interne ayant le nom '%s'. Le Partenaire Intermission n'a pas pu être activé" | 114855 | msgstr "Il y a déjà un Partenaire Interne ayant le nom '%s'. Le Partenaire Intermission n'a pas pu être activé" |
219 | 114856 | ======= | ||
220 | 114857 | #. module: msf_doc_import | ||
221 | 114858 | #: code:addons/msf_doc_import/msf_import_export.py:1113 | ||
222 | 114859 | #, python-format | ||
223 | 114860 | msgid "Import error for account \"%s\" : G/L Account \"%s\" not found or not of type Income or Expense" | ||
224 | 114861 | msgstr "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" | ||
225 | 114862 | |||
226 | 114863 | #. module: msf_doc_import | ||
227 | 114864 | #: code:addons/msf_doc_import/msf_import_export.py:1052 | ||
228 | 114865 | #, python-format | ||
229 | 114866 | msgid "Import error for account \"%s\" : If listing Cost Centers, \"Allow all Cost Centers\" must be set to False." | ||
230 | 114867 | msgstr "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" | ||
231 | 114868 | |||
232 | 114869 | #. module: msf_doc_import | ||
233 | 114870 | #: code:addons/msf_doc_import/msf_import_export.py:1073 | ||
234 | 114871 | #: code:addons/msf_doc_import/msf_import_export.py:1100 | ||
235 | 114872 | #, python-format | ||
236 | 114873 | msgid "Import error for account \"%s\" : Listing both Accounts/Destinations and G/L Accounts is not allowed" | ||
237 | 114874 | msgstr "Erreur lors de l'import du compte \"%s\" : Lister à la fois les Comptes/Destinations et les Comptes Grand Livre n'est pas permis" | ||
238 | 114875 | >>>>>>> MERGE-SOURCE |