Merge lp:~dorian-kemps/unifield-server/US-7323 into lp:unifield-server
- US-7323
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 6274 |
Proposed branch: | lp:~dorian-kemps/unifield-server/US-7323 |
Merge into: | lp:unifield-server |
Diff against target: |
879 lines (+408/-59) (has conflicts) 19 files modified
bin/addons/base/ir/ir_actions.py (+2/-0) bin/addons/base/ir/ir_values.py (+14/-2) bin/addons/msf_outgoing/msf_outgoing_view.xml (+3/-0) bin/addons/msf_profile/i18n/fr_MF.po (+37/-14) bin/addons/procurement_request/procurement_request_view.xml (+13/-14) bin/addons/product/product.py (+21/-0) bin/addons/product_attributes/product_attributes_view.xml (+190/-16) bin/addons/purchase/purchase_order.py (+15/-3) bin/addons/purchase/purchase_view.xml (+0/-6) bin/addons/reason_types_moves/reason_type_view.xml (+1/-0) bin/addons/reason_types_moves/stock_view.xml (+1/-0) bin/addons/sale/sale_order.py (+35/-1) bin/addons/sale/sale_view.xml (+2/-0) bin/addons/stock/stock.py (+35/-0) bin/addons/stock/stock_view.xml (+1/-0) bin/addons/tender_flow/tender_flow.py (+35/-1) bin/addons/tender_flow/tender_flow_view.xml (+1/-1) bin/import_xml.rng (+1/-0) bin/tools/convert.py (+1/-1) Text conflict in bin/addons/msf_profile/i18n/fr_MF.po |
To merge this branch: | bzr merge lp:~dorian-kemps/unifield-server/US-7323 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+424784@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/base/ir/ir_actions.py' | |||
2 | --- bin/addons/base/ir/ir_actions.py 2021-10-12 16:20:20 +0000 | |||
3 | +++ bin/addons/base/ir/ir_actions.py 2022-07-13 15:38:28 +0000 | |||
4 | @@ -373,6 +373,8 @@ | |||
5 | 373 | if not new_tab: | 373 | if not new_tab: |
6 | 374 | res['target'] = 'crush' | 374 | res['target'] = 'crush' |
7 | 375 | return res | 375 | return res |
8 | 376 | |||
9 | 377 | |||
10 | 376 | act_window() | 378 | act_window() |
11 | 377 | 379 | ||
12 | 378 | class act_window_view(osv.osv): | 380 | class act_window_view(osv.osv): |
13 | 379 | 381 | ||
14 | === modified file 'bin/addons/base/ir/ir_values.py' | |||
15 | --- bin/addons/base/ir/ir_values.py 2021-08-20 10:32:29 +0000 | |||
16 | +++ bin/addons/base/ir/ir_values.py 2022-07-13 15:38:28 +0000 | |||
17 | @@ -237,11 +237,23 @@ | |||
18 | 237 | # for the admin only add the "Update Sent / Received" links in the menu on the right for all synched objects | 237 | # for the admin only add the "Update Sent / Received" links in the menu on the right for all synched objects |
19 | 238 | if key == 'action' and key2 == 'client_action_relate' and uid == 1 and self.pool.get('update.link') and models: | 238 | if key == 'action' and key2 == 'client_action_relate' and uid == 1 and self.pool.get('update.link') and models: |
20 | 239 | obj_model = models[0][0] | 239 | obj_model = models[0][0] |
21 | 240 | act_to_add = [] | ||
22 | 240 | if self.pool.get('sync.client.rule').search_exist(cr, uid, [('model', '=', obj_model), ('type', '!=', 'USB')]): | 241 | if self.pool.get('sync.client.rule').search_exist(cr, uid, [('model', '=', obj_model), ('type', '!=', 'USB')]): |
23 | 241 | act_sent_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sync_client', 'action_open_updates_sent')[1] | 242 | act_sent_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sync_client', 'action_open_updates_sent')[1] |
25 | 242 | result.append((act_sent_id, 'Updates_Sent', u'ir.actions.server,%d' % act_sent_id, True, None, u'action')) | 243 | act_to_add.append((act_sent_id, 'Updates_Sent', u'ir.actions.server,%d' % act_sent_id, True, None, u'action')) |
26 | 243 | act_rcv_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sync_client', 'action_open_updates_received')[1] | 244 | act_rcv_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sync_client', 'action_open_updates_received')[1] |
28 | 244 | result.append((act_rcv_id, 'Updates_Received', u'ir.actions.server,%d' % act_rcv_id, True, None, u'action')) | 245 | act_to_add.append((act_rcv_id, 'Updates_Received', u'ir.actions.server,%d' % act_rcv_id, True, None, u'action')) |
29 | 246 | |||
30 | 247 | if obj_model == 'product.product': | ||
31 | 248 | # on product updates links are not at the end | ||
32 | 249 | new_res = [] | ||
33 | 250 | for x in result: | ||
34 | 251 | new_res.append(x) | ||
35 | 252 | if x[1] == u'View_log_product.product': | ||
36 | 253 | new_res += act_to_add | ||
37 | 254 | result = new_res | ||
38 | 255 | else: | ||
39 | 256 | result += act_to_add | ||
40 | 245 | 257 | ||
41 | 246 | if not result: | 258 | if not result: |
42 | 247 | return [] | 259 | return [] |
43 | 248 | 260 | ||
44 | === modified file 'bin/addons/msf_outgoing/msf_outgoing_view.xml' | |||
45 | --- bin/addons/msf_outgoing/msf_outgoing_view.xml 2022-03-09 10:33:36 +0000 | |||
46 | +++ bin/addons/msf_outgoing/msf_outgoing_view.xml 2022-07-13 15:38:28 +0000 | |||
47 | @@ -467,6 +467,7 @@ | |||
48 | 467 | <field name="reason_type_id" widget="selection" domain="[('outgoing_ok', '=', True)]" /> | 467 | <field name="reason_type_id" widget="selection" domain="[('outgoing_ok', '=', True)]" /> |
49 | 468 | <field name="date" /> | 468 | <field name="date" /> |
50 | 469 | <field name="min_date" /> | 469 | <field name="min_date" /> |
51 | 470 | <field name="product_id" /> | ||
52 | 470 | </group> | 471 | </group> |
53 | 471 | <newline /> | 472 | <newline /> |
54 | 472 | <group string="State of lines" col="8" colspan="4"> | 473 | <group string="State of lines" col="8" colspan="4"> |
55 | @@ -803,8 +804,10 @@ | |||
56 | 803 | <field name="order_category" /> | 804 | <field name="order_category" /> |
57 | 804 | <field name="reason_type_id" widget="selection" /> | 805 | <field name="reason_type_id" widget="selection" /> |
58 | 805 | <field name="company_id" widget="selection" groups="base.group_multi_company"/> | 806 | <field name="company_id" widget="selection" groups="base.group_multi_company"/> |
59 | 807 | <newline/> | ||
60 | 806 | <field name="date" /> | 808 | <field name="date" /> |
61 | 807 | <field name="min_date" /> | 809 | <field name="min_date" /> |
62 | 810 | <field name="product_id" /> | ||
63 | 808 | </group> | 811 | </group> |
64 | 809 | <newline/> | 812 | <newline/> |
65 | 810 | <group expand="0" string="Group By..." colspan="4" col="8"> | 813 | <group expand="0" string="Group By..." colspan="4" col="8"> |
66 | 811 | 814 | ||
67 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
68 | --- bin/addons/msf_profile/i18n/fr_MF.po 2022-07-11 08:43:43 +0000 | |||
69 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2022-07-13 15:38:28 +0000 | |||
70 | @@ -10568,11 +10568,12 @@ | |||
71 | 10568 | msgid "Lists/Sublists" | 10568 | msgid "Lists/Sublists" |
72 | 10569 | msgstr "Listes/Sous-listes" | 10569 | msgstr "Listes/Sous-listes" |
73 | 10570 | 10570 | ||
75 | 10571 | #. modules: sale, useability_dashboard_and_menu | 10571 | #. modules: sale, useability_dashboard_and_menu, product_attributes |
76 | 10572 | #: view:sale.report:0 | 10572 | #: view:sale.report:0 |
77 | 10573 | #: view:sale.order:0 | 10573 | #: view:sale.order:0 |
78 | 10574 | #: model:ir.actions.server,name:product_attributes.action_product_fo_tree | ||
79 | 10574 | msgid "Field Orders" | 10575 | msgid "Field Orders" |
81 | 10575 | msgstr "Commandes du terrain" | 10576 | msgstr "Commandes de Terrain" |
82 | 10576 | 10577 | ||
83 | 10577 | #. modules: purchase_msf, purchase_override | 10578 | #. modules: purchase_msf, purchase_override |
84 | 10578 | #: field:purchase.order.line,internal_name:0 | 10579 | #: field:purchase.order.line,internal_name:0 |
85 | @@ -12144,11 +12145,6 @@ | |||
86 | 12144 | msgid "Draft statement" | 12145 | msgid "Draft statement" |
87 | 12145 | msgstr "Relevé sous statut brouillon" | 12146 | msgstr "Relevé sous statut brouillon" |
88 | 12146 | 12147 | ||
89 | 12147 | #. module: product_attributes | ||
90 | 12148 | #: model:ir.actions.act_window,name:product_attributes.action_order_line_product_tree | ||
91 | 12149 | msgid "Field orders" | ||
92 | 12150 | msgstr "Commandes de terrain" | ||
93 | 12151 | |||
94 | 12152 | #. module: tender_flow | 12148 | #. module: tender_flow |
95 | 12153 | #: selection:tender,internal_state:0 | 12149 | #: selection:tender,internal_state:0 |
96 | 12154 | msgid "Rfq Updated" | 12150 | msgid "Rfq Updated" |
97 | @@ -17168,7 +17164,7 @@ | |||
98 | 17168 | msgstr "Employé - Etat civil " | 17164 | msgstr "Employé - Etat civil " |
99 | 17169 | 17165 | ||
100 | 17170 | #. modules: product_attributes, tender_flow, sales_followup | 17166 | #. modules: product_attributes, tender_flow, sales_followup |
102 | 17171 | #: model:ir.actions.act_window,name:product_attributes.action_tender_product_tree | 17167 | #: model:ir.actions.server,name:product_attributes.action_product_tender_tree |
103 | 17172 | #: view:sale.order.line.followup:0 | 17168 | #: view:sale.order.line.followup:0 |
104 | 17173 | #: model:ir.actions.act_window,name:tender_flow.tender_action | 17169 | #: model:ir.actions.act_window,name:tender_flow.tender_action |
105 | 17174 | #: model:ir.ui.menu,name:tender_flow.menu_tender | 17170 | #: model:ir.ui.menu,name:tender_flow.menu_tender |
106 | @@ -23027,7 +23023,7 @@ | |||
107 | 23027 | msgid "Pacific/Easter" | 23023 | msgid "Pacific/Easter" |
108 | 23028 | msgstr "Pacific/Easter" | 23024 | msgstr "Pacific/Easter" |
109 | 23029 | 23025 | ||
111 | 23030 | #. modules: purchase, msf_outgoing, useability_dashboard_and_menu, stock | 23026 | #. modules: purchase, msf_outgoing, useability_dashboard_and_menu, stock, product_attributes |
112 | 23031 | #: view:purchase.order:0 | 23027 | #: view:purchase.order:0 |
113 | 23032 | #: model:ir.actions.act_window,name:stock.action_picking_tree | 23028 | #: model:ir.actions.act_window,name:stock.action_picking_tree |
114 | 23033 | #: model:ir.ui.menu,name:stock.menu_action_picking_tree | 23029 | #: model:ir.ui.menu,name:stock.menu_action_picking_tree |
115 | @@ -23037,6 +23033,7 @@ | |||
116 | 23037 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:185 | 23033 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:185 |
117 | 23038 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:205 | 23034 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:205 |
118 | 23039 | #: code:addons/msf_outgoing/wizard/outgoing_delivery_processor.py:104 | 23035 | #: code:addons/msf_outgoing/wizard/outgoing_delivery_processor.py:104 |
119 | 23036 | #: model:ir.actions.server,name:product_attributes.action_product_out_tree | ||
120 | 23040 | #, python-format | 23037 | #, python-format |
121 | 23041 | msgid "Delivery Orders" | 23038 | msgid "Delivery Orders" |
122 | 23042 | msgstr "Bons de Livraison" | 23039 | msgstr "Bons de Livraison" |
123 | @@ -39331,9 +39328,10 @@ | |||
124 | 39331 | msgid "Cross-docking Val." | 39328 | msgid "Cross-docking Val." |
125 | 39332 | msgstr "Transbordement - Valeur." | 39329 | msgstr "Transbordement - Valeur." |
126 | 39333 | 39330 | ||
128 | 39334 | #. module: tender_flow | 39331 | #. module: tender_flow, product_attributes |
129 | 39335 | #: view:tender:0 | 39332 | #: view:tender:0 |
130 | 39336 | #: field:tender,rfq_ids:0 | 39333 | #: field:tender,rfq_ids:0 |
131 | 39334 | #: model:ir.actions.server,name:product_attributes.action_product_rfq_tree | ||
132 | 39337 | msgid "RfQs" | 39335 | msgid "RfQs" |
133 | 39338 | msgstr "DdD" | 39336 | msgstr "DdD" |
134 | 39339 | 39337 | ||
135 | @@ -69281,7 +69279,7 @@ | |||
136 | 69281 | msgid "Display graph" | 69279 | msgid "Display graph" |
137 | 69282 | msgstr "Affichage du Graphique" | 69280 | msgstr "Affichage du Graphique" |
138 | 69283 | 69281 | ||
140 | 69284 | #. modules: purchase, useability_dashboard_and_menu, stock, msf_outgoing | 69282 | #. modules: purchase, useability_dashboard_and_menu, stock, msf_outgoing, product_attributes |
141 | 69285 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:183 | 69283 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:183 |
142 | 69286 | #: model:ir.ui.menu,name:purchase.menu_action_picking_tree4 | 69284 | #: model:ir.ui.menu,name:purchase.menu_action_picking_tree4 |
143 | 69287 | #: model:ir.actions.act_window,name:stock.action_picking_tree4 | 69285 | #: model:ir.actions.act_window,name:stock.action_picking_tree4 |
144 | @@ -69289,6 +69287,7 @@ | |||
145 | 69289 | #: view:stock.picking:0 | 69287 | #: view:stock.picking:0 |
146 | 69290 | #: view:board.board:0 | 69288 | #: view:board.board:0 |
147 | 69291 | #: model:ir.actions.act_window,name:useability_dashboard_and_menu.action_picking_tree_available | 69289 | #: model:ir.actions.act_window,name:useability_dashboard_and_menu.action_picking_tree_available |
148 | 69290 | #: model:ir.actions.server,name:product_attributes.action_product_in_tree | ||
149 | 69292 | #, python-format | 69291 | #, python-format |
150 | 69293 | msgid "Incoming Shipments" | 69292 | msgid "Incoming Shipments" |
151 | 69294 | msgstr "Livraisons Entrantes" | 69293 | msgstr "Livraisons Entrantes" |
152 | @@ -78816,12 +78815,13 @@ | |||
153 | 78816 | msgid "Subtotal (functional currency)" | 78815 | msgid "Subtotal (functional currency)" |
154 | 78817 | msgstr "Sous-Total (devise fonctionnelle)" | 78816 | msgstr "Sous-Total (devise fonctionnelle)" |
155 | 78818 | 78817 | ||
157 | 78819 | #. modules: stock, msf_outgoing | 78818 | #. modules: stock, msf_outgoing, product_attributes |
158 | 78820 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:184 | 78819 | #: code:addons/msf_outgoing/wizard/internal_move_processor.py:184 |
159 | 78821 | #: model:ir.actions.act_window,name:stock.action_picking_tree6 | 78820 | #: model:ir.actions.act_window,name:stock.action_picking_tree6 |
160 | 78822 | #: model:ir.ui.menu,name:stock.menu_action_picking_tree6 | 78821 | #: model:ir.ui.menu,name:stock.menu_action_picking_tree6 |
161 | 78823 | #: view:stock.picking:0 | 78822 | #: view:stock.picking:0 |
162 | 78824 | #: field:stock.picking,move_lines:0 | 78823 | #: field:stock.picking,move_lines:0 |
163 | 78824 | #: model:ir.actions.server,name:product_attributes.action_product_int_tree | ||
164 | 78825 | #, python-format | 78825 | #, python-format |
165 | 78826 | msgid "Internal Moves" | 78826 | msgid "Internal Moves" |
166 | 78827 | msgstr "Mouvements Internes" | 78827 | msgstr "Mouvements Internes" |
167 | @@ -79431,9 +79431,10 @@ | |||
168 | 79431 | msgid "You do not have access to the field (%s). If you did not edit this field, please let an OpenERP administrator know about this error message, and the field name." | 79431 | msgid "You do not have access to the field (%s). If you did not edit this field, please let an OpenERP administrator know about this error message, and the field name." |
169 | 79432 | msgstr "You do not have access to the field (%s). If you did not edit this field, please let an OpenERP administrator know about this error message, and the field name." | 79432 | msgstr "You do not have access to the field (%s). If you did not edit this field, please let an OpenERP administrator know about this error message, and the field name." |
170 | 79433 | 79433 | ||
172 | 79434 | #. module: procurement_request | 79434 | #. module: procurement_request, product_attributes |
173 | 79435 | #: model:ir.actions.act_window,name:procurement_request.action_procurement_request | 79435 | #: model:ir.actions.act_window,name:procurement_request.action_procurement_request |
174 | 79436 | #: model:ir.ui.menu,name:procurement_request.menu_procurement_request | 79436 | #: model:ir.ui.menu,name:procurement_request.menu_procurement_request |
175 | 79437 | #: model:ir.actions.server,name:product_attributes.action_product_ir_tree | ||
176 | 79437 | #: view:sale.order:0 | 79438 | #: view:sale.order:0 |
177 | 79438 | msgid "Internal Requests" | 79439 | msgid "Internal Requests" |
178 | 79439 | msgstr "Demandes Internes" | 79440 | msgstr "Demandes Internes" |
179 | @@ -82989,6 +82990,7 @@ | |||
180 | 82989 | #: field:view.expired.expiring.stock.lines,product_id:0 | 82990 | #: field:view.expired.expiring.stock.lines,product_id:0 |
181 | 82990 | #: field:account.commitment.line,line_product_id:0 | 82991 | #: field:account.commitment.line,line_product_id:0 |
182 | 82991 | #: field:product.ed_bn.mass.update.history,product_id:0 | 82992 | #: field:product.ed_bn.mass.update.history,product_id:0 |
183 | 82993 | #: field:stock.picking,product_id:0 | ||
184 | 82992 | #, python-format | 82994 | #, python-format |
185 | 82993 | msgid "Product" | 82995 | msgid "Product" |
186 | 82994 | msgstr "Produit" | 82996 | msgstr "Produit" |
187 | @@ -87933,7 +87935,7 @@ | |||
188 | 87933 | #: view:account.analytic.line:0 | 87935 | #: view:account.analytic.line:0 |
189 | 87934 | #: field:analytic.distribution,purchase_ids:0 | 87936 | #: field:analytic.distribution,purchase_ids:0 |
190 | 87935 | #: model:ir.ui.menu,name:base.menu_purchase_root | 87937 | #: model:ir.ui.menu,name:base.menu_purchase_root |
192 | 87936 | #: model:ir.actions.act_window,name:purchase.action_purchase_line_product_tree2 | 87938 | #: model:ir.actions.server,name:product_attributes.action_product_po_tree |
193 | 87937 | msgid "Purchases" | 87939 | msgid "Purchases" |
194 | 87938 | msgstr "Achats" | 87940 | msgstr "Achats" |
195 | 87939 | 87941 | ||
196 | @@ -115351,6 +115353,7 @@ | |||
197 | 115351 | #, python-format | 115353 | #, python-format |
198 | 115352 | msgid "Cannot update these products, ED/BN attributes have not changed since the KCL creation" | 115354 | msgid "Cannot update these products, ED/BN attributes have not changed since the KCL creation" |
199 | 115353 | msgstr "Impossible de mettre à jour ces produits. Les attributs NL/DE n'ont pas changé depuis la création du Kit" | 115355 | msgstr "Impossible de mettre à jour ces produits. Les attributs NL/DE n'ont pas changé depuis la création du Kit" |
200 | 115356 | <<<<<<< TREE | ||
201 | 115354 | 115357 | ||
202 | 115355 | #. module: board | 115358 | #. module: board |
203 | 115356 | #: report:addons/board/report/integrity.mako:83 | 115359 | #: report:addons/board/report/integrity.mako:83 |
204 | @@ -115652,3 +115655,23 @@ | |||
205 | 115652 | msgid "This report is an analysis done by employee. It is a report containing one line per employee representing the cumulative credit balance." | 115655 | msgid "This report is an analysis done by employee. It is a report containing one line per employee representing the cumulative credit balance." |
206 | 115653 | msgstr "Ce rapport est une analyse effectuée par employé. Il s'agit d'un rapport contenant une ligne par employé et représentant le solde créditeur cumulé." | 115656 | msgstr "Ce rapport est une analyse effectuée par employé. Il s'agit d'un rapport contenant une ligne par employé et représentant le solde créditeur cumulé." |
207 | 115654 | 115657 | ||
208 | 115658 | ======= | ||
209 | 115659 | |||
210 | 115660 | #. modules: purchase, tender_flow, sale, stock | ||
211 | 115661 | #: help:purchase.order,product_id:0 | ||
212 | 115662 | #: help:sale.order,product_id:0 | ||
213 | 115663 | #: help:stock.picking,product_id:0 | ||
214 | 115664 | #: help:tender,product_id:0 | ||
215 | 115665 | msgid "Product to find in the lines" | ||
216 | 115666 | msgstr "Produit à trouver dans les lignes" | ||
217 | 115667 | |||
218 | 115668 | #. module: product_attributes | ||
219 | 115669 | #: model:ir.actions.server,name:product_attributes.action_product_pick_tree | ||
220 | 115670 | msgid "Pickings" | ||
221 | 115671 | msgstr "Pickings" | ||
222 | 115672 | |||
223 | 115673 | #. module: product_attributes | ||
224 | 115674 | #: model:ir.actions.server,name:product_attributes.action_product_pack_tree | ||
225 | 115675 | msgid "Packings" | ||
226 | 115676 | msgstr "Colisages" | ||
227 | 115677 | >>>>>>> MERGE-SOURCE | ||
228 | 115655 | 115678 | ||
229 | === modified file 'bin/addons/procurement_request/procurement_request_view.xml' | |||
230 | --- bin/addons/procurement_request/procurement_request_view.xml 2022-05-18 11:32:30 +0000 | |||
231 | +++ bin/addons/procurement_request/procurement_request_view.xml 2022-07-13 15:38:28 +0000 | |||
232 | @@ -173,19 +173,18 @@ | |||
233 | 173 | <field name="priority" eval="250" /> | 173 | <field name="priority" eval="250" /> |
234 | 174 | <field name="arch" type="xml"> | 174 | <field name="arch" type="xml"> |
235 | 175 | <search string="Internal Requests"> | 175 | <search string="Internal Requests"> |
249 | 176 | <group string="Filters" expand="1"> | 176 | <filter name="state_proc" string="Draft" icon="terp-document-new" domain="[('state', 'in', ['draft','draft_p'])]" /> |
250 | 177 | <filter name="state_proc" string="Draft" icon="terp-document-new" domain="[('state', 'in', ['draft','draft_p'])]" /> | 177 | <filter name="state_valid" string="Validated" icon="terp-check" domain="[('state', 'in', ['validated','validated_p'])]" /> |
251 | 178 | <filter name="state_valid" string="Validated" icon="terp-check" domain="[('state', 'in', ['validated','validated_p'])]" /> | 178 | <filter name="sourced" string="Sourced" icon="gtk-paste-v" domain="[('state','in',['sourced','sourced_p'])]" /> |
252 | 179 | <filter name="sourced" string="Sourced" icon="gtk-paste-v" domain="[('state','in',['sourced','sourced_p'])]" /> | 179 | <filter name="state_proc_progress" string="Confirmed" icon="terp-camera_test" domain="[('state', 'in', ('confirmed', 'confirmed_p'))]" /> |
253 | 180 | <filter name="state_proc_progress" string="Confirmed" icon="terp-camera_test" domain="[('state', 'in', ('confirmed', 'confirmed_p'))]" /> | 180 | <filter name="state_done" string="Closed" icon="terp-dialog-close" domain="[('state', '=', 'done')]" /> |
254 | 181 | <filter name="state_done" string="Closed" icon="terp-dialog-close" domain="[('state', '=', 'done')]" /> | 181 | <filter name="cancelled" string="Cancelled" icon="gtk-cancel" domain="[('state', '=', 'cancel')]" /> |
255 | 182 | <filter name="cancelled" string="Cancelled" icon="gtk-cancel" domain="[('state', '=', 'cancel')]" /> | 182 | <separator orientation="vertical" /> |
256 | 183 | <separator orientation="vertical" /> | 183 | <field name="name" /> |
257 | 184 | <field name="name" /> | 184 | <field name="origin" /> |
258 | 185 | <field name="origin" /> | 185 | <field name="requestor" /> |
259 | 186 | <field name="requestor" /> | 186 | <field name="location_requestor_id" /> |
260 | 187 | <field name="location_requestor_id" /> | 187 | <field name="product_id" /> |
248 | 188 | </group> | ||
261 | 189 | <newline /> | 188 | <newline /> |
262 | 190 | <group string="Group By..."> | 189 | <group string="Group By..."> |
263 | 191 | <filter string="State" icon="terp-gtk-select-all" domain="[]" context="{'group_by': 'state'}" /> | 190 | <filter string="State" icon="terp-gtk-select-all" domain="[]" context="{'group_by': 'state'}" /> |
264 | @@ -216,7 +215,7 @@ | |||
265 | 216 | <field name="res_model">sale.order</field> | 215 | <field name="res_model">sale.order</field> |
266 | 217 | <field name="view_type">form</field> | 216 | <field name="view_type">form</field> |
267 | 218 | <field name="view_mode">tree,form</field> | 217 | <field name="view_mode">tree,form</field> |
269 | 219 | <field name="view_search_id" ref="procurement_request_search_view" /> | 218 | <field name="search_view_id" ref="procurement_request_search_view" /> |
270 | 220 | <field name="context">{'procurement_request': True}</field> | 219 | <field name="context">{'procurement_request': True}</field> |
271 | 221 | <field name="domain">[('procurement_request', '=', True)]</field> | 220 | <field name="domain">[('procurement_request', '=', True)]</field> |
272 | 222 | </record> | 221 | </record> |
273 | 223 | 222 | ||
274 | === modified file 'bin/addons/product/product.py' | |||
275 | --- bin/addons/product/product.py 2021-08-06 15:49:01 +0000 | |||
276 | +++ bin/addons/product/product.py 2022-07-13 15:38:28 +0000 | |||
277 | @@ -27,6 +27,7 @@ | |||
278 | 27 | import re | 27 | import re |
279 | 28 | from tools.translate import _ | 28 | from tools.translate import _ |
280 | 29 | from tools import cache | 29 | from tools import cache |
281 | 30 | from tools.safe_eval import safe_eval | ||
282 | 30 | 31 | ||
283 | 31 | def is_pair(x): | 32 | def is_pair(x): |
284 | 32 | return not x%2 | 33 | return not x%2 |
285 | @@ -893,9 +894,29 @@ | |||
286 | 893 | res.update({'value': {'list_price': list_price}}) | 894 | res.update({'value': {'list_price': list_price}}) |
287 | 894 | return res | 895 | return res |
288 | 895 | 896 | ||
289 | 897 | def view_docs_with_product(self, cr, uid, ids, menu_action, context=None): | ||
290 | 898 | ''' | ||
291 | 899 | Get info from the given menu action to return the right view with the right data | ||
292 | 900 | ''' | ||
293 | 901 | |||
294 | 902 | if context is None: | ||
295 | 903 | context = {} | ||
296 | 904 | |||
297 | 905 | res = self.pool.get('ir.actions.act_window').open_view_from_xmlid(cr, uid, menu_action, ['tree', 'form'], new_tab=True, context=context) | ||
298 | 906 | |||
299 | 907 | res_context = res.get('context', False) and safe_eval(res['context']) or {} | ||
300 | 908 | for col in res_context: # Remove the default filters | ||
301 | 909 | if 'search_default_' in col: | ||
302 | 910 | res_context[col] = False | ||
303 | 911 | res_context['search_default_product_id'] = context.get('active_id', False) | ||
304 | 912 | res['context'] = res_context | ||
305 | 913 | |||
306 | 914 | return res | ||
307 | 915 | |||
308 | 896 | 916 | ||
309 | 897 | product_product() | 917 | product_product() |
310 | 898 | 918 | ||
311 | 919 | |||
312 | 899 | class product_packaging(osv.osv): | 920 | class product_packaging(osv.osv): |
313 | 900 | _name = "product.packaging" | 921 | _name = "product.packaging" |
314 | 901 | _description = "Packaging" | 922 | _description = "Packaging" |
315 | 902 | 923 | ||
316 | === modified file 'bin/addons/product_attributes/product_attributes_view.xml' | |||
317 | --- bin/addons/product_attributes/product_attributes_view.xml 2021-12-07 15:12:27 +0000 | |||
318 | +++ bin/addons/product_attributes/product_attributes_view.xml 2022-07-13 15:38:28 +0000 | |||
319 | @@ -542,22 +542,196 @@ | |||
320 | 542 | </field> | 542 | </field> |
321 | 543 | </record> | 543 | </record> |
322 | 544 | 544 | ||
339 | 545 | <act_window | 545 | <!-- List of actions at the bottom of the list, the dashed line-break is located on the web's side --> |
340 | 546 | context="{}" | 546 | <!-- FO --> |
341 | 547 | domain="[('procurement_request', '=', False), ('product_id', '=', active_id)]" | 547 | <record id="action_product_fo_tree" model="ir.actions.server"> |
342 | 548 | id="action_order_line_product_tree" | 548 | <field name="name">Field Orders</field> |
343 | 549 | name="Field orders" | 549 | <field name="model_id" ref="product.model_product_product"/> |
344 | 550 | res_model="sale.order" | 550 | <field name="state">code</field> |
345 | 551 | src_model="product.product" /> | 551 | <field name="code"> |
346 | 552 | 552 | action = self.view_docs_with_product(cr, uid, ids, menu_action='sale.action_order_form', context=context) | |
347 | 553 | <act_window | 553 | </field> |
348 | 554 | context="{}" | 554 | </record> |
349 | 555 | domain="[('product_id', '=', active_id)]" | 555 | |
350 | 556 | id="action_tender_product_tree" | 556 | <record id="open_product_fo_tree" model="ir.values"> |
351 | 557 | name="Tenders" | 557 | <field name="key2">client_action_relate</field> |
352 | 558 | res_model="tender" | 558 | <field name="model">product.product</field> |
353 | 559 | src_model="product.product" /> | 559 | <field name="name">Field Orders</field> |
354 | 560 | 560 | <field name="value" eval="'ir.actions.server,%d'%action_product_fo_tree"/> | |
355 | 561 | <field name="object" eval="True"/> | ||
356 | 562 | <field name="sequence" eval="100001"/> | ||
357 | 563 | </record> | ||
358 | 564 | |||
359 | 565 | <!-- IR --> | ||
360 | 566 | <record id="action_product_ir_tree" model="ir.actions.server"> | ||
361 | 567 | <field name="name">Internal Requests</field> | ||
362 | 568 | <field name="model_id" ref="product.model_product_product"/> | ||
363 | 569 | <field name="state">code</field> | ||
364 | 570 | <field name="code"> | ||
365 | 571 | action = self.view_docs_with_product(cr, uid, ids, menu_action='procurement_request.action_procurement_request', context=context) | ||
366 | 572 | </field> | ||
367 | 573 | </record> | ||
368 | 574 | |||
369 | 575 | <record id="open_product_ir_tree" model="ir.values"> | ||
370 | 576 | <field name="key2">client_action_relate</field> | ||
371 | 577 | <field name="model">product.product</field> | ||
372 | 578 | <field name="name">Internal Requests</field> | ||
373 | 579 | <field name="value" eval="'ir.actions.server,%d'%action_product_ir_tree"/> | ||
374 | 580 | <field name="object" eval="True"/> | ||
375 | 581 | <field name="sequence" eval="100002"/> | ||
376 | 582 | </record> | ||
377 | 583 | |||
378 | 584 | <!-- PO --> | ||
379 | 585 | <record id="action_product_po_tree" model="ir.actions.server"> | ||
380 | 586 | <field name="name">Purchases</field> | ||
381 | 587 | <field name="model_id" ref="product.model_product_product"/> | ||
382 | 588 | <field name="state">code</field> | ||
383 | 589 | <field name="code"> | ||
384 | 590 | action = self.view_docs_with_product(cr, uid, ids, menu_action='purchase.purchase_form_action', context=context) | ||
385 | 591 | </field> | ||
386 | 592 | </record> | ||
387 | 593 | |||
388 | 594 | <record id="open_product_po_tree" model="ir.values"> | ||
389 | 595 | <field name="key2">client_action_relate</field> | ||
390 | 596 | <field name="model">product.product</field> | ||
391 | 597 | <field name="name">Purchases</field> | ||
392 | 598 | <field name="value" eval="'ir.actions.server,%d'%action_product_po_tree"/> | ||
393 | 599 | <field name="object" eval="True"/> | ||
394 | 600 | <field name="sequence" eval="100003"/> | ||
395 | 601 | </record> | ||
396 | 602 | |||
397 | 603 | <!-- RfQ --> | ||
398 | 604 | <record id="action_product_rfq_tree" model="ir.actions.server"> | ||
399 | 605 | <field name="name">RfQs</field> | ||
400 | 606 | <field name="model_id" ref="product.model_product_product"/> | ||
401 | 607 | <field name="state">code</field> | ||
402 | 608 | <field name="code"> | ||
403 | 609 | action = self.view_docs_with_product(cr, uid, ids, menu_action='purchase.purchase_rfq', context=context) | ||
404 | 610 | </field> | ||
405 | 611 | </record> | ||
406 | 612 | |||
407 | 613 | <record id="open_product_rfq_tree" model="ir.values"> | ||
408 | 614 | <field name="key2">client_action_relate</field> | ||
409 | 615 | <field name="model">product.product</field> | ||
410 | 616 | <field name="name">RfQs</field> | ||
411 | 617 | <field name="value" eval="'ir.actions.server,%d'%action_product_rfq_tree"/> | ||
412 | 618 | <field name="object" eval="True"/> | ||
413 | 619 | <field name="sequence" eval="100004"/> | ||
414 | 620 | </record> | ||
415 | 621 | |||
416 | 622 | <!-- Tender --> | ||
417 | 623 | <record id="action_product_tender_tree" model="ir.actions.server"> | ||
418 | 624 | <field name="name">Tenders</field> | ||
419 | 625 | <field name="model_id" ref="product.model_product_product"/> | ||
420 | 626 | <field name="state">code</field> | ||
421 | 627 | <field name="code"> | ||
422 | 628 | action = self.view_docs_with_product(cr, uid, ids, menu_action='tender_flow.tender_action', context=context) | ||
423 | 629 | </field> | ||
424 | 630 | </record> | ||
425 | 631 | |||
426 | 632 | <record id="open_product_tender_tree" model="ir.values"> | ||
427 | 633 | <field name="key2">client_action_relate</field> | ||
428 | 634 | <field name="model">product.product</field> | ||
429 | 635 | <field name="name">Tenders</field> | ||
430 | 636 | <field name="value" eval="'ir.actions.server,%d'%action_product_tender_tree"/> | ||
431 | 637 | <field name="object" eval="True"/> | ||
432 | 638 | <field name="sequence" eval="100005"/> | ||
433 | 639 | </record> | ||
434 | 640 | |||
435 | 641 | <!-- IN --> | ||
436 | 642 | <record id="action_product_in_tree" model="ir.actions.server"> | ||
437 | 643 | <field name="name">Incoming Shipments</field> | ||
438 | 644 | <field name="model_id" ref="product.model_product_product"/> | ||
439 | 645 | <field name="state">code</field> | ||
440 | 646 | <field name="code"> | ||
441 | 647 | action = self.view_docs_with_product(cr, uid, ids, menu_action='stock.action_picking_tree4', context=context) | ||
442 | 648 | </field> | ||
443 | 649 | </record> | ||
444 | 650 | |||
445 | 651 | <record id="open_product_in_tree" model="ir.values"> | ||
446 | 652 | <field name="key2">client_action_relate</field> | ||
447 | 653 | <field name="model">product.product</field> | ||
448 | 654 | <field name="name">Incoming Shipments</field> | ||
449 | 655 | <field name="value" eval="'ir.actions.server,%d'%action_product_in_tree"/> | ||
450 | 656 | <field name="object" eval="True"/> | ||
451 | 657 | <field name="sequence" eval="100006"/> | ||
452 | 658 | </record> | ||
453 | 659 | |||
454 | 660 | <!-- INT --> | ||
455 | 661 | <record id="action_product_int_tree" model="ir.actions.server"> | ||
456 | 662 | <field name="name">Internal Moves</field> | ||
457 | 663 | <field name="model_id" ref="product.model_product_product"/> | ||
458 | 664 | <field name="state">code</field> | ||
459 | 665 | <field name="code"> | ||
460 | 666 | action = self.view_docs_with_product(cr, uid, ids, menu_action='stock.action_picking_tree6', context=context) | ||
461 | 667 | </field> | ||
462 | 668 | </record> | ||
463 | 669 | |||
464 | 670 | <record id="open_product_int_tree" model="ir.values"> | ||
465 | 671 | <field name="key2">client_action_relate</field> | ||
466 | 672 | <field name="model">product.product</field> | ||
467 | 673 | <field name="name">Internal Moves</field> | ||
468 | 674 | <field name="value" eval="'ir.actions.server,%d'%action_product_int_tree"/> | ||
469 | 675 | <field name="object" eval="True"/> | ||
470 | 676 | <field name="sequence" eval="100007"/> | ||
471 | 677 | </record> | ||
472 | 678 | |||
473 | 679 | <!-- OUT --> | ||
474 | 680 | <record id="action_product_out_tree" model="ir.actions.server"> | ||
475 | 681 | <field name="name">Delivery Orders</field> | ||
476 | 682 | <field name="model_id" ref="product.model_product_product"/> | ||
477 | 683 | <field name="state">code</field> | ||
478 | 684 | <field name="code"> | ||
479 | 685 | action = self.view_docs_with_product(cr, uid, ids, menu_action='stock.action_picking_tree', context=context) | ||
480 | 686 | </field> | ||
481 | 687 | </record> | ||
482 | 688 | |||
483 | 689 | <record id="open_product_out_tree" model="ir.values"> | ||
484 | 690 | <field name="key2">client_action_relate</field> | ||
485 | 691 | <field name="model">product.product</field> | ||
486 | 692 | <field name="name">Delivery Orders</field> | ||
487 | 693 | <field name="value" eval="'ir.actions.server,%d'%action_product_out_tree"/> | ||
488 | 694 | <field name="object" eval="True"/> | ||
489 | 695 | <field name="sequence" eval="100008"/> | ||
490 | 696 | </record> | ||
491 | 697 | |||
492 | 698 | <!-- Pick --> | ||
493 | 699 | <record id="action_product_pick_tree" model="ir.actions.server"> | ||
494 | 700 | <field name="name">Pickings</field> | ||
495 | 701 | <field name="model_id" ref="product.model_product_product"/> | ||
496 | 702 | <field name="state">code</field> | ||
497 | 703 | <field name="code"> | ||
498 | 704 | action = self.view_docs_with_product(cr, uid, ids, menu_action='msf_outgoing.action_picking_ticket', context=context) | ||
499 | 705 | </field> | ||
500 | 706 | </record> | ||
501 | 707 | |||
502 | 708 | <record id="open_product_pick_tree" model="ir.values"> | ||
503 | 709 | <field name="key2">client_action_relate</field> | ||
504 | 710 | <field name="model">product.product</field> | ||
505 | 711 | <field name="name">Pickings</field> | ||
506 | 712 | <field name="value" eval="'ir.actions.server,%d'%action_product_pick_tree"/> | ||
507 | 713 | <field name="object" eval="True"/> | ||
508 | 714 | <field name="sequence" eval="100009"/> | ||
509 | 715 | </record> | ||
510 | 716 | |||
511 | 717 | <!-- PPL --> | ||
512 | 718 | <record id="action_product_pack_tree" model="ir.actions.server"> | ||
513 | 719 | <field name="name">Packings</field> | ||
514 | 720 | <field name="model_id" ref="product.model_product_product"/> | ||
515 | 721 | <field name="state">code</field> | ||
516 | 722 | <field name="code"> | ||
517 | 723 | action = self.view_docs_with_product(cr, uid, ids, menu_action='msf_outgoing.action_ppl', context=context) | ||
518 | 724 | </field> | ||
519 | 725 | </record> | ||
520 | 726 | |||
521 | 727 | <record id="open_product_pack_tree" model="ir.values"> | ||
522 | 728 | <field name="key2">client_action_relate</field> | ||
523 | 729 | <field name="model">product.product</field> | ||
524 | 730 | <field name="name">Packings</field> | ||
525 | 731 | <field name="value" eval="'ir.actions.server,%d'%action_product_pack_tree"/> | ||
526 | 732 | <field name="object" eval="True"/> | ||
527 | 733 | <field name="sequence" eval="100010"/> | ||
528 | 734 | </record> | ||
529 | 561 | 735 | ||
530 | 562 | <!-- Add a link to see all inactivated products --> | 736 | <!-- Add a link to see all inactivated products --> |
531 | 563 | <act_window | 737 | <act_window |
532 | 564 | 738 | ||
533 | === modified file 'bin/addons/purchase/purchase_order.py' | |||
534 | --- bin/addons/purchase/purchase_order.py 2022-03-22 09:01:13 +0000 | |||
535 | +++ bin/addons/purchase/purchase_order.py 2022-07-13 15:38:28 +0000 | |||
536 | @@ -54,9 +54,12 @@ | |||
537 | 54 | ''' | 54 | ''' |
538 | 55 | new_dom = [] | 55 | new_dom = [] |
539 | 56 | dest_partner_names = False | 56 | dest_partner_names = False |
540 | 57 | product_id = False | ||
541 | 57 | for x in domain: | 58 | for x in domain: |
542 | 58 | if x[0] == 'dest_partner_names': | 59 | if x[0] == 'dest_partner_names': |
543 | 59 | dest_partner_names = x[2] | 60 | dest_partner_names = x[2] |
544 | 61 | elif x[0] == 'product_id': | ||
545 | 62 | product_id = x[2] | ||
546 | 60 | else: | 63 | else: |
547 | 61 | new_dom.append(x) | 64 | new_dom.append(x) |
548 | 62 | 65 | ||
549 | @@ -72,6 +75,12 @@ | |||
550 | 72 | ret.where_clause.append(' "res_partner"."name" ilike %s ') | 75 | ret.where_clause.append(' "res_partner"."name" ilike %s ') |
551 | 73 | ret.where_clause_params.append('%%%s%%'%dest_partner_names) | 76 | ret.where_clause_params.append('%%%s%%'%dest_partner_names) |
552 | 74 | ret.having_group_by = ' GROUP BY "purchase_order"."id" ' | 77 | ret.having_group_by = ' GROUP BY "purchase_order"."id" ' |
553 | 78 | if product_id and isinstance(product_id, int): | ||
554 | 79 | ret.tables.append('"purchase_order_line"') | ||
555 | 80 | ret.joins.setdefault('"purchase_order"', []) | ||
556 | 81 | ret.joins['"purchase_order"'] += [('"purchase_order_line"', 'id', 'order_id', 'LEFT JOIN')] | ||
557 | 82 | ret.where_clause.append(''' "purchase_order_line"."product_id" = %s ''') | ||
558 | 83 | ret.where_clause_params.append(product_id) | ||
559 | 75 | return ret | 84 | return ret |
560 | 76 | 85 | ||
561 | 77 | def _amount_all(self, cr, uid, ids, field_name, arg, context=None): | 86 | def _amount_all(self, cr, uid, ids, field_name, arg, context=None): |
562 | @@ -708,9 +717,13 @@ | |||
563 | 708 | 717 | ||
564 | 709 | def _get_fake(self, cr, uid, ids, name, arg, context=None): | 718 | def _get_fake(self, cr, uid, ids, name, arg, context=None): |
565 | 710 | """ | 719 | """ |
567 | 711 | Fake method for 'has_confirmed_line' field | 720 | Fake method for 'has_confirmed_line', 'has_confirmed_or_further_line' and 'product_id' fields |
568 | 712 | """ | 721 | """ |
569 | 713 | res = {} | 722 | res = {} |
570 | 723 | if not ids: | ||
571 | 724 | return res | ||
572 | 725 | if isinstance(ids, (int, long)): | ||
573 | 726 | ids = [ids] | ||
574 | 714 | for po_id in ids: | 727 | for po_id in ids: |
575 | 715 | res[po_id] = False | 728 | res[po_id] = False |
576 | 716 | return res | 729 | return res |
577 | @@ -806,7 +819,6 @@ | |||
578 | 806 | 819 | ||
579 | 807 | return ret | 820 | return ret |
580 | 808 | 821 | ||
581 | 809 | |||
582 | 810 | _columns = { | 822 | _columns = { |
583 | 811 | 'order_type': fields.selection(ORDER_TYPES_SELECTION, string='Order Type', required=True), | 823 | 'order_type': fields.selection(ORDER_TYPES_SELECTION, string='Order Type', required=True), |
584 | 812 | 'loan_id': fields.many2one('sale.order', string='Linked loan', readonly=True), | 824 | 'loan_id': fields.many2one('sale.order', string='Linked loan', readonly=True), |
585 | @@ -841,7 +853,7 @@ | |||
586 | 841 | 'unallocation_ok': fields.boolean(string='Unallocated PO'), | 853 | 'unallocation_ok': fields.boolean(string='Unallocated PO'), |
587 | 842 | 'partner_ref': fields.char('Supplier Reference', size=128), | 854 | 'partner_ref': fields.char('Supplier Reference', size=128), |
588 | 843 | 'short_partner_ref': fields.function(_get_short_partner_ref, method=True, string='Supplier Reference', type='char', size=64, store=False), | 855 | 'short_partner_ref': fields.function(_get_short_partner_ref, method=True, string='Supplier Reference', type='char', size=64, store=False), |
590 | 844 | 'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product'), | 856 | 'product_id': fields.function(_get_fake, method=True, type='many2one', relation='product.product', string='Product', help='Product to find in the lines', store=False, readonly=True), |
591 | 845 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), | 857 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), |
592 | 846 | 'active': fields.boolean('Active', readonly=True), | 858 | 'active': fields.boolean('Active', readonly=True), |
593 | 847 | 'po_from_ir': fields.function(_po_from_x, method=True, type='boolean', string='Is PO from IR ?', multi='po_from_x'), | 859 | 'po_from_ir': fields.function(_po_from_x, method=True, type='boolean', string='Is PO from IR ?', multi='po_from_x'), |
594 | 848 | 860 | ||
595 | === modified file 'bin/addons/purchase/purchase_view.xml' | |||
596 | --- bin/addons/purchase/purchase_view.xml 2022-06-14 11:28:55 +0000 | |||
597 | +++ bin/addons/purchase/purchase_view.xml 2022-07-13 15:38:28 +0000 | |||
598 | @@ -1015,12 +1015,6 @@ | |||
599 | 1015 | </field> | 1015 | </field> |
600 | 1016 | </record> | 1016 | </record> |
601 | 1017 | 1017 | ||
602 | 1018 | |||
603 | 1019 | <act_window context="{}" | ||
604 | 1020 | domain="[('rfq_ok', '=', False), ('product_id', '=', active_id)]" | ||
605 | 1021 | id="purchase.action_purchase_line_product_tree2" name="Purchases" | ||
606 | 1022 | res_model="purchase.order" src_model="product.product" groups=""/> | ||
607 | 1023 | |||
608 | 1024 | <record id="purchase_line_form_action2" model="ir.actions.act_window"> | 1018 | <record id="purchase_line_form_action2" model="ir.actions.act_window"> |
609 | 1025 | <field name="name">Purchase Lines Not Invoiced</field> | 1019 | <field name="name">Purchase Lines Not Invoiced</field> |
610 | 1026 | <field name="type">ir.actions.act_window</field> | 1020 | <field name="type">ir.actions.act_window</field> |
611 | 1027 | 1021 | ||
612 | === modified file 'bin/addons/reason_types_moves/reason_type_view.xml' | |||
613 | --- bin/addons/reason_types_moves/reason_type_view.xml 2020-02-06 15:20:20 +0000 | |||
614 | +++ bin/addons/reason_types_moves/reason_type_view.xml 2022-07-13 15:38:28 +0000 | |||
615 | @@ -196,6 +196,7 @@ | |||
616 | 196 | <newline /> | 196 | <newline /> |
617 | 197 | <field name="date" /> | 197 | <field name="date" /> |
618 | 198 | <field name="min_date" /> | 198 | <field name="min_date" /> |
619 | 199 | <field name="product_id" /> | ||
620 | 199 | </xpath> | 200 | </xpath> |
621 | 200 | <xpath expr="/search//field[@name='company_id']" position="replace" /> | 201 | <xpath expr="/search//field[@name='company_id']" position="replace" /> |
622 | 201 | <xpath expr="/search//filter[@name='done']" position="attributes"> | 202 | <xpath expr="/search//filter[@name='done']" position="attributes"> |
623 | 202 | 203 | ||
624 | === modified file 'bin/addons/reason_types_moves/stock_view.xml' | |||
625 | --- bin/addons/reason_types_moves/stock_view.xml 2021-12-20 15:55:25 +0000 | |||
626 | +++ bin/addons/reason_types_moves/stock_view.xml 2022-07-13 15:38:28 +0000 | |||
627 | @@ -157,6 +157,7 @@ | |||
628 | 157 | <field name="date" string="Creation date" /> | 157 | <field name="date" string="Creation date" /> |
629 | 158 | <field name="min_date" string="Expected date" /> | 158 | <field name="min_date" string="Expected date" /> |
630 | 159 | <field name="shipment_ref" /> | 159 | <field name="shipment_ref" /> |
631 | 160 | <field name="product_id" /> | ||
632 | 160 | </group> | 161 | </group> |
633 | 161 | <newline/> | 162 | <newline/> |
634 | 162 | <group expand="0" string="Group By..." colspan="4" col="8"> | 163 | <group expand="0" string="Group By..." colspan="4" col="8"> |
635 | 163 | 164 | ||
636 | === modified file 'bin/addons/sale/sale_order.py' | |||
637 | --- bin/addons/sale/sale_order.py 2022-06-20 12:17:27 +0000 | |||
638 | +++ bin/addons/sale/sale_order.py 2022-07-13 15:38:28 +0000 | |||
639 | @@ -61,6 +61,27 @@ | |||
640 | 61 | _name = "sale.order" | 61 | _name = "sale.order" |
641 | 62 | _description = "Sales Order" | 62 | _description = "Sales Order" |
642 | 63 | 63 | ||
643 | 64 | def _where_calc(self, cr, uid, domain, active_test=True, context=None): | ||
644 | 65 | ''' | ||
645 | 66 | overwrite to allow search on customer and self instance | ||
646 | 67 | ''' | ||
647 | 68 | new_dom = [] | ||
648 | 69 | product_id = False | ||
649 | 70 | for x in domain: | ||
650 | 71 | if x[0] == 'product_id': | ||
651 | 72 | product_id = x[2] | ||
652 | 73 | else: | ||
653 | 74 | new_dom.append(x) | ||
654 | 75 | |||
655 | 76 | ret = super(sale_order, self)._where_calc(cr, uid, new_dom, active_test=active_test, context=context) | ||
656 | 77 | if product_id and isinstance(product_id, int): | ||
657 | 78 | ret.tables.append('"sale_order_line"') | ||
658 | 79 | ret.joins.setdefault('"sale_order"', []) | ||
659 | 80 | ret.joins['"sale_order"'] += [('"sale_order_line"', 'id', 'order_id', 'LEFT JOIN')] | ||
660 | 81 | ret.where_clause.append(''' "sale_order_line"."product_id" = %s ''') | ||
661 | 82 | ret.where_clause_params.append(product_id) | ||
662 | 83 | return ret | ||
663 | 84 | |||
664 | 64 | def copy(self, cr, uid, id, default=None, context=None): | 85 | def copy(self, cr, uid, id, default=None, context=None): |
665 | 65 | """ | 86 | """ |
666 | 66 | Copy the sale.order. When copy the sale.order: | 87 | Copy the sale.order. When copy the sale.order: |
667 | @@ -598,6 +619,19 @@ | |||
668 | 598 | 619 | ||
669 | 599 | return ret | 620 | return ret |
670 | 600 | 621 | ||
671 | 622 | def _get_fake(self, cr, uid, ids, name, args, context=None): | ||
672 | 623 | ''' | ||
673 | 624 | Fake method for 'product_id' field | ||
674 | 625 | ''' | ||
675 | 626 | res = {} | ||
676 | 627 | if not ids: | ||
677 | 628 | return res | ||
678 | 629 | if isinstance(ids, (int, long)): | ||
679 | 630 | ids = [ids] | ||
680 | 631 | for id in ids: | ||
681 | 632 | res[id] = False | ||
682 | 633 | return res | ||
683 | 634 | |||
684 | 601 | _columns = { | 635 | _columns = { |
685 | 602 | 'name': fields.char('Order Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}, select=True, sort_column='id'), | 636 | 'name': fields.char('Order Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}, select=True, sort_column='id'), |
686 | 603 | 'origin': fields.char('Source Document', size=512, help="Reference of the document that generated this sales order request."), | 637 | 'origin': fields.char('Source Document', size=512, help="Reference of the document that generated this sales order request."), |
687 | @@ -694,7 +728,7 @@ | |||
688 | 694 | 'split_type_sale_order': fields.selection(SALE_ORDER_SPLIT_SELECTION, required=True, readonly=True, internal=1), | 728 | 'split_type_sale_order': fields.selection(SALE_ORDER_SPLIT_SELECTION, required=True, readonly=True, internal=1), |
689 | 695 | 'original_so_id_sale_order': fields.many2one('sale.order', 'Original Field Order', readonly=True), | 729 | 'original_so_id_sale_order': fields.many2one('sale.order', 'Original Field Order', readonly=True), |
690 | 696 | 'active': fields.boolean('Active', readonly=True), | 730 | 'active': fields.boolean('Active', readonly=True), |
692 | 697 | 'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product'), | 731 | 'product_id': fields.function(_get_fake, method=True, type='many2one', relation='product.product', string='Product', help='Product to find in the lines', store=False, readonly=True), |
693 | 698 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), | 732 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), |
694 | 699 | 'manually_corrected': fields.function(_get_manually_corrected, method=True, type='boolean', string='Manually corrected'), | 733 | 'manually_corrected': fields.function(_get_manually_corrected, method=True, type='boolean', string='Manually corrected'), |
695 | 700 | 'is_a_counterpart': fields.boolean('Counterpart?', help="This field is only for indicating that the order is a counterpart"), | 734 | 'is_a_counterpart': fields.boolean('Counterpart?', help="This field is only for indicating that the order is a counterpart"), |
696 | 701 | 735 | ||
697 | === modified file 'bin/addons/sale/sale_view.xml' | |||
698 | --- bin/addons/sale/sale_view.xml 2022-05-17 14:21:03 +0000 | |||
699 | +++ bin/addons/sale/sale_view.xml 2022-07-13 15:38:28 +0000 | |||
700 | @@ -504,6 +504,8 @@ | |||
701 | 504 | <filter domain="[('user_id','=',uid)]" help="My Sale Orders" icon="terp-personal"/> | 504 | <filter domain="[('user_id','=',uid)]" help="My Sale Orders" icon="terp-personal"/> |
702 | 505 | </field> | 505 | </field> |
703 | 506 | <newline /> | 506 | <newline /> |
704 | 507 | <field name="product_id" /> | ||
705 | 508 | <newline /> | ||
706 | 507 | <group string="Type" expand="0"> | 509 | <group string="Type" expand="0"> |
707 | 508 | <filter icon="terp-check" string="Regular" domain="[('order_type','=','regular')]"/> | 510 | <filter icon="terp-check" string="Regular" domain="[('order_type','=','regular')]"/> |
708 | 509 | <filter icon="terp-stage" string="Donation before expiry" domain="[('order_type','=','donation_exp')]"/> | 511 | <filter icon="terp-stage" string="Donation before expiry" domain="[('order_type','=','donation_exp')]"/> |
709 | 510 | 512 | ||
710 | === modified file 'bin/addons/stock/stock.py' | |||
711 | --- bin/addons/stock/stock.py 2022-05-02 15:04:12 +0000 | |||
712 | +++ bin/addons/stock/stock.py 2022-07-13 15:38:28 +0000 | |||
713 | @@ -746,6 +746,27 @@ | |||
714 | 746 | _name = "stock.picking" | 746 | _name = "stock.picking" |
715 | 747 | _description = "Picking List" | 747 | _description = "Picking List" |
716 | 748 | 748 | ||
717 | 749 | def _where_calc(self, cr, uid, domain, active_test=True, context=None): | ||
718 | 750 | ''' | ||
719 | 751 | overwrite to allow search on customer and self instance | ||
720 | 752 | ''' | ||
721 | 753 | new_dom = [] | ||
722 | 754 | product_id = False | ||
723 | 755 | for x in domain: | ||
724 | 756 | if x[0] == 'product_id': | ||
725 | 757 | product_id = x[2] | ||
726 | 758 | else: | ||
727 | 759 | new_dom.append(x) | ||
728 | 760 | |||
729 | 761 | ret = super(stock_picking, self)._where_calc(cr, uid, new_dom, active_test=active_test, context=context) | ||
730 | 762 | if product_id and isinstance(product_id, int): | ||
731 | 763 | ret.tables.append('"stock_move"') | ||
732 | 764 | ret.joins.setdefault('"stock_picking"', []) | ||
733 | 765 | ret.joins['"stock_picking"'] += [('"stock_move"', 'id', 'picking_id', 'LEFT JOIN')] | ||
734 | 766 | ret.where_clause.append(''' "stock_move"."product_id" = %s ''') | ||
735 | 767 | ret.where_clause_params.append(product_id) | ||
736 | 768 | return ret | ||
737 | 769 | |||
738 | 749 | def _set_maximum_date(self, cr, uid, ids, name, value, arg, context=None): | 770 | def _set_maximum_date(self, cr, uid, ids, name, value, arg, context=None): |
739 | 750 | """ Calculates planned date if it is greater than 'value'. | 771 | """ Calculates planned date if it is greater than 'value'. |
740 | 751 | @param name: Name of field | 772 | @param name: Name of field |
741 | @@ -893,6 +914,19 @@ | |||
742 | 893 | 914 | ||
743 | 894 | return res | 915 | return res |
744 | 895 | 916 | ||
745 | 917 | def _get_fake(self, cr, uid, ids, name, args, context=None): | ||
746 | 918 | ''' | ||
747 | 919 | Fake method for 'product_id' field | ||
748 | 920 | ''' | ||
749 | 921 | res = {} | ||
750 | 922 | if not ids: | ||
751 | 923 | return res | ||
752 | 924 | if isinstance(ids, (int, long)): | ||
753 | 925 | ids = [ids] | ||
754 | 926 | for id in ids: | ||
755 | 927 | res[id] = False | ||
756 | 928 | return res | ||
757 | 929 | |||
758 | 896 | _columns = { | 930 | _columns = { |
759 | 897 | 'object_name': fields.function(_get_object_name, type='char', method=True, string='Title'), | 931 | 'object_name': fields.function(_get_object_name, type='char', method=True, string='Title'), |
760 | 898 | 'name': fields.char('Reference', size=64, select=True), | 932 | 'name': fields.char('Reference', size=64, select=True), |
761 | @@ -952,6 +986,7 @@ | |||
762 | 952 | 'customers': fields.char('Customers', size=1026), | 986 | 'customers': fields.char('Customers', size=1026), |
763 | 953 | 'customer_ref': fields.char('Customer Ref.', size=1026), | 987 | 'customer_ref': fields.char('Customer Ref.', size=1026), |
764 | 954 | 'sync_dpo_in': fields.boolean('Synced IN for DPO reception', internal=1, help='Used to flag a IN linked to a DPO'), | 988 | 'sync_dpo_in': fields.boolean('Synced IN for DPO reception', internal=1, help='Used to flag a IN linked to a DPO'), |
765 | 989 | 'product_id': fields.function(_get_fake, method=True, type='many2one', relation='product.product', string='Product', help='Product to find in the lines', store=False, readonly=True), | ||
766 | 955 | } | 990 | } |
767 | 956 | 991 | ||
768 | 957 | _defaults = { | 992 | _defaults = { |
769 | 958 | 993 | ||
770 | === modified file 'bin/addons/stock/stock_view.xml' | |||
771 | --- bin/addons/stock/stock_view.xml 2021-11-17 15:46:45 +0000 | |||
772 | +++ bin/addons/stock/stock_view.xml 2022-07-13 15:38:28 +0000 | |||
773 | @@ -1003,6 +1003,7 @@ | |||
774 | 1003 | <field name="origin"/> | 1003 | <field name="origin"/> |
775 | 1004 | <field name="stock_journal_id" groups="base.group_extended" widget="selection"/> | 1004 | <field name="stock_journal_id" groups="base.group_extended" widget="selection"/> |
776 | 1005 | <field name="company_id" widget="selection"/> | 1005 | <field name="company_id" widget="selection"/> |
777 | 1006 | <field name="product_id"/> | ||
778 | 1006 | </group> | 1007 | </group> |
779 | 1007 | <newline/> | 1008 | <newline/> |
780 | 1008 | <group expand="0" string="Group By..." colspan="4" col="8"> | 1009 | <group expand="0" string="Group By..." colspan="4" col="8"> |
781 | 1009 | 1010 | ||
782 | === modified file 'bin/addons/tender_flow/tender_flow.py' | |||
783 | --- bin/addons/tender_flow/tender_flow.py 2022-03-21 12:41:58 +0000 | |||
784 | +++ bin/addons/tender_flow/tender_flow.py 2022-07-13 15:38:28 +0000 | |||
785 | @@ -41,6 +41,27 @@ | |||
786 | 41 | _description = 'Tender' | 41 | _description = 'Tender' |
787 | 42 | _trace = True | 42 | _trace = True |
788 | 43 | 43 | ||
789 | 44 | def _where_calc(self, cr, uid, domain, active_test=True, context=None): | ||
790 | 45 | ''' | ||
791 | 46 | overwrite to allow search on customer and self instance | ||
792 | 47 | ''' | ||
793 | 48 | new_dom = [] | ||
794 | 49 | product_id = False | ||
795 | 50 | for x in domain: | ||
796 | 51 | if x[0] == 'product_id': | ||
797 | 52 | product_id = x[2] | ||
798 | 53 | else: | ||
799 | 54 | new_dom.append(x) | ||
800 | 55 | |||
801 | 56 | ret = super(tender, self)._where_calc(cr, uid, new_dom, active_test=active_test, context=context) | ||
802 | 57 | if product_id and isinstance(product_id, int): | ||
803 | 58 | ret.tables.append('"tender_line"') | ||
804 | 59 | ret.joins.setdefault('"tender"', []) | ||
805 | 60 | ret.joins['"tender"'] += [('"tender_line"', 'id', 'tender_id', 'LEFT JOIN')] | ||
806 | 61 | ret.where_clause.append(''' "tender_line"."product_id" = %s ''') | ||
807 | 62 | ret.where_clause_params.append(product_id) | ||
808 | 63 | return ret | ||
809 | 64 | |||
810 | 44 | def copy(self, cr, uid, id, default=None, context=None, done_list=[], local=False): | 65 | def copy(self, cr, uid, id, default=None, context=None, done_list=[], local=False): |
811 | 45 | if not default: | 66 | if not default: |
812 | 46 | default = {} | 67 | default = {} |
813 | @@ -116,6 +137,19 @@ | |||
814 | 116 | res[tender.id] = diff_number | 137 | res[tender.id] = diff_number |
815 | 117 | return res | 138 | return res |
816 | 118 | 139 | ||
817 | 140 | def _get_fake(self, cr, uid, ids, name, args, context=None): | ||
818 | 141 | ''' | ||
819 | 142 | Fake method for 'product_id' field | ||
820 | 143 | ''' | ||
821 | 144 | res = {} | ||
822 | 145 | if not ids: | ||
823 | 146 | return res | ||
824 | 147 | if isinstance(ids, (int, long)): | ||
825 | 148 | ids = [ids] | ||
826 | 149 | for id in ids: | ||
827 | 150 | res[id] = False | ||
828 | 151 | return res | ||
829 | 152 | |||
830 | 119 | _columns = { | 153 | _columns = { |
831 | 120 | 'name': fields.char('Tender Reference', size=64, required=True, select=True, readonly=True, sort_column='id'), | 154 | 'name': fields.char('Tender Reference', size=64, required=True, select=True, readonly=True, sort_column='id'), |
832 | 121 | 'sale_order_id': fields.many2one('sale.order', string="Sale Order", readonly=True), | 155 | 'sale_order_id': fields.many2one('sale.order', string="Sale Order", readonly=True), |
833 | @@ -136,7 +170,7 @@ | |||
834 | 136 | 'notes': fields.text('Notes'), | 170 | 'notes': fields.text('Notes'), |
835 | 137 | 'internal_state': fields.selection([('draft', 'Draft'), ('updated', 'Rfq Updated'), ], string="Internal State", readonly=True), | 171 | 'internal_state': fields.selection([('draft', 'Draft'), ('updated', 'Rfq Updated'), ], string="Internal State", readonly=True), |
836 | 138 | 'rfq_name_list': fields.function(_vals_get, method=True, string='RfQs Ref', type='char', readonly=True, store=False, multi='get_vals',), | 172 | 'rfq_name_list': fields.function(_vals_get, method=True, string='RfQs Ref', type='char', readonly=True, store=False, multi='get_vals',), |
838 | 139 | 'product_id': fields.related('tender_line_ids', 'product_id', type='many2one', relation='product.product', string='Product'), | 173 | 'product_id': fields.function(_get_fake, method=True, type='many2one', relation='product.product', string='Product', help='Product to find in the lines', store=False, readonly=True), |
839 | 140 | 'delivery_address': fields.many2one('res.partner.address', string='Delivery address', required=True), | 174 | 'delivery_address': fields.many2one('res.partner.address', string='Delivery address', required=True), |
840 | 141 | 'tender_from_fo': fields.function(_is_tender_from_fo, method=True, type='boolean', string='Is tender from FO ?',), | 175 | 'tender_from_fo': fields.function(_is_tender_from_fo, method=True, type='boolean', string='Is tender from FO ?',), |
841 | 142 | 'diff_nb_rfq_supplier': fields.function(_diff_nb_rfq_supplier, method=True, type="boolean", string="Compare the number of rfqs and the number of suppliers", store=False), | 176 | 'diff_nb_rfq_supplier': fields.function(_diff_nb_rfq_supplier, method=True, type="boolean", string="Compare the number of rfqs and the number of suppliers", store=False), |
842 | 143 | 177 | ||
843 | === modified file 'bin/addons/tender_flow/tender_flow_view.xml' | |||
844 | --- bin/addons/tender_flow/tender_flow_view.xml 2020-05-06 12:28:03 +0000 | |||
845 | +++ bin/addons/tender_flow/tender_flow_view.xml 2022-07-13 15:38:28 +0000 | |||
846 | @@ -136,7 +136,7 @@ | |||
847 | 136 | domain="[('state', '=', 'cancel')]" /> | 136 | domain="[('state', '=', 'cancel')]" /> |
848 | 137 | <field name="name" /> | 137 | <field name="name" /> |
849 | 138 | <field name="supplier_ids" string="Supplier" widget="many2one" /> | 138 | <field name="supplier_ids" string="Supplier" widget="many2one" /> |
851 | 139 | <field name="product_id" string="Product" widget="many2one" /> | 139 | <field name="product_id" /> |
852 | 140 | <field name="sale_order_id" string="Sale Order" /> | 140 | <field name="sale_order_id" string="Sale Order" /> |
853 | 141 | <field name="creator" /> | 141 | <field name="creator" /> |
854 | 142 | <field name="creation_date" /> | 142 | <field name="creation_date" /> |
855 | 143 | 143 | ||
856 | === modified file 'bin/import_xml.rng' | |||
857 | --- bin/import_xml.rng 2021-10-12 15:17:17 +0000 | |||
858 | +++ bin/import_xml.rng 2022-07-13 15:38:28 +0000 | |||
859 | @@ -214,6 +214,7 @@ | |||
860 | 214 | <rng:optional> <rng:attribute name="empty_ids"/> </rng:optional> | 214 | <rng:optional> <rng:attribute name="empty_ids"/> </rng:optional> |
861 | 215 | <rng:optional> <rng:attribute name="auto_refresh"/> </rng:optional> | 215 | <rng:optional> <rng:attribute name="auto_refresh"/> </rng:optional> |
862 | 216 | <rng:optional> <rng:attribute name="search_view_id"/> </rng:optional> | 216 | <rng:optional> <rng:attribute name="search_view_id"/> </rng:optional> |
863 | 217 | <rng:optional> <rng:attribute name="sequence"/> </rng:optional> | ||
864 | 217 | <rng:empty /> | 218 | <rng:empty /> |
865 | 218 | </rng:element> | 219 | </rng:element> |
866 | 219 | </rng:define> | 220 | </rng:define> |
867 | 220 | 221 | ||
868 | === modified file 'bin/tools/convert.py' | |||
869 | --- bin/tools/convert.py 2021-10-12 15:17:17 +0000 | |||
870 | +++ bin/tools/convert.py 2022-07-13 15:38:28 +0000 | |||
871 | @@ -537,7 +537,7 @@ | |||
872 | 537 | if rec.get('view_ids'): | 537 | if rec.get('view_ids'): |
873 | 538 | for x in rec.get('view_ids').split(','): | 538 | for x in rec.get('view_ids').split(','): |
874 | 539 | linked_views.append(self.id_get(cr,x)) | 539 | linked_views.append(self.id_get(cr,x)) |
876 | 540 | self.pool.get('ir.model.data').ir_set(cr, self.uid, 'action', keyword, xml_id, [src_model], value, replace=replace, isobject=True, xml_id=xml_id, view_ids=linked_views) | 540 | self.pool.get('ir.model.data').ir_set(cr, self.uid, 'action', keyword, xml_id, [src_model], value, replace=replace, isobject=True, xml_id=xml_id, view_ids=linked_views, sequence=rec.get('sequence', 100)) |
877 | 541 | # TODO add remove ir.model.data | 541 | # TODO add remove ir.model.data |
878 | 542 | 542 | ||
879 | 543 | def _tag_ir_set(self, cr, rec, data_node=None): | 543 | def _tag_ir_set(self, cr, rec, data_node=None): |