Merge lp:~unifield-team/unifield-server/us-402-1056-842-1159 into lp:unifield-server
- us-402-1056-842-1159
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 3882 |
Proposed branch: | lp:~unifield-team/unifield-server/us-402-1056-842-1159 |
Merge into: | lp:unifield-server |
Diff against target: |
187 lines (+34/-17) 9 files modified
bin/addons/procurement_request/procurement_request_view.xml (+7/-0) bin/addons/purchase_override/purchase_view.xml (+1/-1) bin/addons/specific_rules/stock.py (+1/-1) bin/addons/specific_rules/stock_view.xml (+4/-4) bin/addons/stock/stock.py (+1/-1) bin/addons/stock_forecast/wizard/stock_forecast.py (+15/-5) bin/addons/stock_override/stock_view.xml (+2/-2) bin/addons/tender_flow/report/purchase_report_view.xml (+2/-2) bin/addons/tender_flow/tender_flow_view.xml (+1/-1) |
To merge this branch: | bzr merge lp:~unifield-team/unifield-server/us-402-1056-842-1159 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email:
|
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/procurement_request/procurement_request_view.xml' | |||
2 | --- bin/addons/procurement_request/procurement_request_view.xml 2016-05-31 08:51:54 +0000 | |||
3 | +++ bin/addons/procurement_request/procurement_request_view.xml 2016-07-21 08:20:41 +0000 | |||
4 | @@ -38,6 +38,13 @@ | |||
5 | 38 | <field name="priority" eval="250" /> | 38 | <field name="priority" eval="250" /> |
6 | 39 | <field name="arch" type="xml"> | 39 | <field name="arch" type="xml"> |
7 | 40 | <form string="Internal Request"> | 40 | <form string="Internal Request"> |
8 | 41 | <group colspan="6" attrs="{'invisible': [('state', '!=', 'validated')]}"> | ||
9 | 42 | <html> | ||
10 | 43 | <p style="text-align:center; color: red; font-weight: bold; font-size: 1.2em;"> | ||
11 | 44 | WARNING: This document has already been validated, are you sure you wish to modify after validation? | ||
12 | 45 | </p> | ||
13 | 46 | </html> | ||
14 | 47 | </group> | ||
15 | 41 | <group col="6" colspan="4" name="header"> | 48 | <group col="6" colspan="4" name="header"> |
16 | 42 | <field name="name" /> | 49 | <field name="name" /> |
17 | 43 | <field name="date_order" attrs="{'readonly': [('state', 'not in', ['draft', 'validated'])]}" /> | 50 | <field name="date_order" attrs="{'readonly': [('state', 'not in', ['draft', 'validated'])]}" /> |
18 | 44 | 51 | ||
19 | === modified file 'bin/addons/purchase_override/purchase_view.xml' | |||
20 | --- bin/addons/purchase_override/purchase_view.xml 2016-04-18 13:09:03 +0000 | |||
21 | +++ bin/addons/purchase_override/purchase_view.xml 2016-07-21 08:20:41 +0000 | |||
22 | @@ -186,7 +186,7 @@ | |||
23 | 186 | <field name="dest_partner_names" /> | 186 | <field name="dest_partner_names" /> |
24 | 187 | <field name="shipped_rate" widget="progressbar" /> | 187 | <field name="shipped_rate" widget="progressbar" /> |
25 | 188 | <field name="invoiced_rate" widget="progressbar" /> | 188 | <field name="invoiced_rate" widget="progressbar" /> |
27 | 189 | <field name="amount_total" sum="Total amount" /> | 189 | <field name="amount_total" /> |
28 | 190 | <field name="pricelist_id" string="Currency" /> | 190 | <field name="pricelist_id" string="Currency" /> |
29 | 191 | <field name="state" /> | 191 | <field name="state" /> |
30 | 192 | </tree> | 192 | </tree> |
31 | 193 | 193 | ||
32 | === modified file 'bin/addons/specific_rules/stock.py' | |||
33 | --- bin/addons/specific_rules/stock.py 2016-04-25 10:27:20 +0000 | |||
34 | +++ bin/addons/specific_rules/stock.py 2016-07-21 08:20:41 +0000 | |||
35 | @@ -518,7 +518,7 @@ | |||
36 | 518 | 'date': fields.date(string='Creation date', required=True, readonly=True, states={'draft': [('readonly', False)]}), | 518 | 'date': fields.date(string='Creation date', required=True, readonly=True, states={'draft': [('readonly', False)]}), |
37 | 519 | 'reevaluation_line_ids': fields.one2many('stock.cost.reevaluation.line', 'reevaluation_id', string='Lines', | 519 | 'reevaluation_line_ids': fields.one2many('stock.cost.reevaluation.line', 'reevaluation_id', string='Lines', |
38 | 520 | readonly=True, states={'draft': [('readonly', False)]}), | 520 | readonly=True, states={'draft': [('readonly', False)]}), |
40 | 521 | 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancel')], | 521 | 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Validated'), ('done', 'Done'), ('cancel', 'Cancel')], |
41 | 522 | string='State', readonly=True, required=True), | 522 | string='State', readonly=True, required=True), |
42 | 523 | 'sublist_id': fields.many2one('product.list', string='List/Sublist', ondelete='set null'), | 523 | 'sublist_id': fields.many2one('product.list', string='List/Sublist', ondelete='set null'), |
43 | 524 | 'nomen_manda_0': fields.many2one('product.nomenclature', 'Main Type', ondelete='set null'), | 524 | 'nomen_manda_0': fields.many2one('product.nomenclature', 'Main Type', ondelete='set null'), |
44 | 525 | 525 | ||
45 | === modified file 'bin/addons/specific_rules/stock_view.xml' | |||
46 | --- bin/addons/specific_rules/stock_view.xml 2016-02-05 09:13:42 +0000 | |||
47 | +++ bin/addons/specific_rules/stock_view.xml 2016-07-21 08:20:41 +0000 | |||
48 | @@ -70,8 +70,8 @@ | |||
49 | 70 | <group colspan="4" col="6"> | 70 | <group colspan="4" col="6"> |
50 | 71 | <field name="state" /> | 71 | <field name="state" /> |
51 | 72 | <button name="action_cancel_inventary" states="draft,confirm" string="Cancel Inventory" type="object" icon="gtk-cancel" /> | 72 | <button name="action_cancel_inventary" states="draft,confirm" string="Cancel Inventory" type="object" icon="gtk-cancel" /> |
54 | 73 | <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply" /> | 73 | <button name="action_confirm" states="draft" string="Validate Inventory" type="object" icon="gtk-apply" /> |
55 | 74 | <button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to" /> | 74 | <button name="action_done" states="confirm" string="Confirm Inventory" type="object" icon="gtk-jump-to" /> |
56 | 75 | <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert" /> | 75 | <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert" /> |
57 | 76 | </group> | 76 | </group> |
58 | 77 | </form> | 77 | </form> |
59 | @@ -169,8 +169,8 @@ | |||
60 | 169 | <group colspan="4" col="6"> | 169 | <group colspan="4" col="6"> |
61 | 170 | <field name="state" /> | 170 | <field name="state" /> |
62 | 171 | <button name="action_cancel" type="object" string="Cancel" icon="gtk-cancel" states="draft,confirm" /> | 171 | <button name="action_cancel" type="object" string="Cancel" icon="gtk-cancel" states="draft,confirm" /> |
65 | 172 | <button name="action_confirm" type="object" string="Confirm" icon="gtk-apply" states="draft" /> | 172 | <button name="action_confirm" type="object" string="Validate" icon="gtk-apply" states="draft" /> |
66 | 173 | <button name="action_done" type="object" string="Validate" icon="gtk-jump-to" states="confirm" /> | 173 | <button name="action_done" type="object" string="Confirm" icon="gtk-jump-to" states="confirm" /> |
67 | 174 | <button name="action_cancel_draft" type="object" string="Set to Draft" icon="gtk-convert" states="cancel" /> | 174 | <button name="action_cancel_draft" type="object" string="Set to Draft" icon="gtk-convert" states="cancel" /> |
68 | 175 | </group> | 175 | </group> |
69 | 176 | </form> | 176 | </form> |
70 | 177 | 177 | ||
71 | === modified file 'bin/addons/stock/stock.py' | |||
72 | --- bin/addons/stock/stock.py 2016-05-24 08:44:23 +0000 | |||
73 | +++ bin/addons/stock/stock.py 2016-07-21 08:20:41 +0000 | |||
74 | @@ -2789,7 +2789,7 @@ | |||
75 | 2789 | 'date_done': fields.datetime('Date done'), | 2789 | 'date_done': fields.datetime('Date done'), |
76 | 2790 | 'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}), | 2790 | 'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}), |
77 | 2791 | 'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'), | 2791 | 'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'), |
79 | 2792 | 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('confirm','Confirmed'),('cancel','Cancelled')), 'State', readonly=True, select=True), | 2792 | 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('confirm','Validated'),('cancel','Cancelled')), 'State', readonly=True, select=True), |
80 | 2793 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}), | 2793 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}), |
81 | 2794 | 2794 | ||
82 | 2795 | } | 2795 | } |
83 | 2796 | 2796 | ||
84 | === modified file 'bin/addons/stock_forecast/wizard/stock_forecast.py' | |||
85 | --- bin/addons/stock_forecast/wizard/stock_forecast.py 2016-03-08 15:48:47 +0000 | |||
86 | +++ bin/addons/stock_forecast/wizard/stock_forecast.py 2016-07-21 08:20:41 +0000 | |||
87 | @@ -88,7 +88,7 @@ | |||
88 | 88 | 'first': lambda *a: 'z', | 88 | 'first': lambda *a: 'z', |
89 | 89 | } | 89 | } |
90 | 90 | 90 | ||
92 | 91 | _order = 'date asc, first asc' | 91 | _order = 'date asc, first asc, id asc' |
93 | 92 | 92 | ||
94 | 93 | stock_forecast_line() | 93 | stock_forecast_line() |
95 | 94 | 94 | ||
96 | @@ -376,7 +376,8 @@ | |||
97 | 376 | move_obj = self.pool.get('stock.move') | 376 | move_obj = self.pool.get('stock.move') |
98 | 377 | product_obj = self.pool.get('product.product') | 377 | product_obj = self.pool.get('product.product') |
99 | 378 | uom_obj = self.pool.get('product.uom') | 378 | uom_obj = self.pool.get('product.uom') |
101 | 379 | 379 | data_obj = self.pool.get('ir.model.data') | |
102 | 380 | |||
103 | 380 | # clear existing lines | 381 | # clear existing lines |
104 | 381 | line_ids = line_obj.search(cr, uid, [('wizard_id', 'in', ids)], context=context) | 382 | line_ids = line_obj.search(cr, uid, [('wizard_id', 'in', ids)], context=context) |
105 | 382 | line_obj.unlink(cr, uid, line_ids, context=context) | 383 | line_obj.unlink(cr, uid, line_ids, context=context) |
106 | @@ -408,10 +409,19 @@ | |||
107 | 408 | # qty of all products | 409 | # qty of all products |
108 | 409 | c = context.copy() | 410 | c = context.copy() |
109 | 410 | # if you remove the coma after done, it will no longer work properly | 411 | # if you remove the coma after done, it will no longer work properly |
110 | 412 | cross_docking_id = data_obj.get_object_reference(cr, uid, 'msf_cross_docking', 'stock_location_cross_docking')[1] | ||
111 | 413 | location_ids = [cross_docking_id] | ||
112 | 414 | if wizard.warehouse_id: | ||
113 | 415 | location_ids.append(wizard.warehouse_id.lot_stock_id.id) | ||
114 | 416 | else: | ||
115 | 417 | wids = self.pool.get('stock.warehouse').search(cr, uid, [], context=context) | ||
116 | 418 | for w in self.pool.get('stock.warehouse').browse(cr, uid, wids, context=context): | ||
117 | 419 | location_ids.append(w.lot_stock_id.id) | ||
118 | 420 | |||
119 | 411 | c.update({'states': ('done',), | 421 | c.update({'states': ('done',), |
120 | 412 | 'what': ('in', 'out'), | 422 | 'what': ('in', 'out'), |
121 | 413 | 'to_date': time.strftime('%Y-%m-%d %H:%M:%S'), | 423 | 'to_date': time.strftime('%Y-%m-%d %H:%M:%S'), |
123 | 414 | 'warehouse': warehouse_id, | 424 | 'location': location_ids, |
124 | 415 | 'uom': product_uom_id}) | 425 | 'uom': product_uom_id}) |
125 | 416 | qty = product_obj.get_product_available(cr, uid, product_list, context=c) | 426 | qty = product_obj.get_product_available(cr, uid, product_list, context=c) |
126 | 417 | overall_qty = sum(qty.values()) | 427 | overall_qty = sum(qty.values()) |
127 | @@ -425,7 +435,7 @@ | |||
128 | 425 | # SALE ORDERS - negative | 435 | # SALE ORDERS - negative |
129 | 426 | # list all sale order lines corresponding to selected product | 436 | # list all sale order lines corresponding to selected product |
130 | 427 | #so_list = so_obj.search(cr, uid, [()], context=context) | 437 | #so_list = so_obj.search(cr, uid, [()], context=context) |
132 | 428 | sol_list = sol_obj.search(cr, uid, [('state', 'in', ('procurement', 'progress', 'draft')), | 438 | sol_list = sol_obj.search(cr, uid, [('state', 'in', ('procurement', 'progress', 'draft', 'sourced')), |
133 | 429 | ('product_id', '=', product.id)], order='date_planned', context=context) | 439 | ('product_id', '=', product.id)], order='date_planned', context=context) |
134 | 430 | 440 | ||
135 | 431 | for sol in sol_obj.browse(cr, uid, sol_list, context=context): | 441 | for sol in sol_obj.browse(cr, uid, sol_list, context=context): |
136 | @@ -440,7 +450,7 @@ | |||
137 | 440 | 'stock_situation': False, | 450 | 'stock_situation': False, |
138 | 441 | 'wizard_id': wizard.id,} | 451 | 'wizard_id': wizard.id,} |
139 | 442 | if sol.procurement_request: | 452 | if sol.procurement_request: |
141 | 443 | values.update(doc='ISR') | 453 | values.update(doc='IR') |
142 | 444 | 454 | ||
143 | 445 | line_to_create.append(values) | 455 | line_to_create.append(values) |
144 | 446 | 456 | ||
145 | 447 | 457 | ||
146 | === modified file 'bin/addons/stock_override/stock_view.xml' | |||
147 | --- bin/addons/stock_override/stock_view.xml 2016-05-24 08:44:23 +0000 | |||
148 | +++ bin/addons/stock_override/stock_view.xml 2016-07-21 08:20:41 +0000 | |||
149 | @@ -1154,8 +1154,8 @@ | |||
150 | 1154 | </group> | 1154 | </group> |
151 | 1155 | <group col="3" colspan="2"> | 1155 | <group col="3" colspan="2"> |
152 | 1156 | <button name="action_cancel_inventary" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/> | 1156 | <button name="action_cancel_inventary" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/> |
155 | 1157 | <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/> | 1157 | <button name="action_confirm" states="draft" string="Validate Inventory" type="object" icon="gtk-apply"/> |
156 | 1158 | <button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/> | 1158 | <button name="action_done" states="confirm" string="Confirm Inventory" type="object" icon="gtk-jump-to"/> |
157 | 1159 | <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> | 1159 | <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> |
158 | 1160 | </group> | 1160 | </group> |
159 | 1161 | </form> | 1161 | </form> |
160 | 1162 | 1162 | ||
161 | === modified file 'bin/addons/tender_flow/report/purchase_report_view.xml' | |||
162 | --- bin/addons/tender_flow/report/purchase_report_view.xml 2013-09-03 08:10:46 +0000 | |||
163 | +++ bin/addons/tender_flow/report/purchase_report_view.xml 2016-07-21 08:20:41 +0000 | |||
164 | @@ -26,8 +26,8 @@ | |||
165 | 26 | <field name="nbr" sum="# of Lines"/> | 26 | <field name="nbr" sum="# of Lines"/> |
166 | 27 | <field name="quantity" /> | 27 | <field name="quantity" /> |
167 | 28 | <field name="product_uom" /> | 28 | <field name="product_uom" /> |
170 | 29 | <field name="price_average" sum="Average Price" invisible="1" /> | 29 | <field name="price_average" invisible="1" /> |
171 | 30 | <field name="price_total" sum="Subtotal" string="Subtotal"/> | 30 | <field name="price_total" string="Subtotal"/> |
172 | 31 | <field name="currency_id" /> | 31 | <field name="currency_id" /> |
173 | 32 | <!-- <field name="price_standard" sum="Products Value" invisible="0"/> | 32 | <!-- <field name="price_standard" sum="Products Value" invisible="0"/> |
174 | 33 | <field name="negociation" widget="progressbar"/> --> | 33 | <field name="negociation" widget="progressbar"/> --> |
175 | 34 | 34 | ||
176 | === modified file 'bin/addons/tender_flow/tender_flow_view.xml' | |||
177 | --- bin/addons/tender_flow/tender_flow_view.xml 2016-03-04 10:44:48 +0000 | |||
178 | +++ bin/addons/tender_flow/tender_flow_view.xml 2016-07-21 08:20:41 +0000 | |||
179 | @@ -400,7 +400,7 @@ | |||
180 | 400 | <field name="partner_id" /> | 400 | <field name="partner_id" /> |
181 | 401 | <field name="delivery_requested_date" /> | 401 | <field name="delivery_requested_date" /> |
182 | 402 | <field name="origin" /> | 402 | <field name="origin" /> |
184 | 403 | <field name="amount_total" sum="Total amount" /> | 403 | <field name="amount_total" /> |
185 | 404 | <field name="state" /> | 404 | <field name="state" /> |
186 | 405 | </tree> | 405 | </tree> |
187 | 406 | </field> | 406 | </field> |