~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to analytic_distribution_supply/sale.py

  • Committer: jf
  • Date: 2014-09-05 08:53:44 UTC
  • mfrom: (2206.3.39 unifield-wm)
  • Revision ID: jfb@tempo-consulting.fr-20140905085344-n3iz6igxpmo0yfht
Tags: pilot3.1b7
Pilot 3.1b7

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
                        'sale_order_line_ids': [(4, line.id)],
172
172
                        'cost_center_lines': [(0, 0, {
173
173
                            'destination_id': destination_id[0],
174
 
                            'analytic_id': intermission_cc[1] ,
175
 
                            'percentage':'100',
 
174
                            'analytic_id': intermission_cc[1],
 
175
                            'percentage': '100',
176
176
                            'currency_id': so.currency_id.id,
177
177
                        })],
178
178
                    }, context=context)
179
 
 
 
179
                    # UFTP-277: Check funding pool lines if missing
 
180
                    ana_obj.create_funding_pool_lines(cr, uid, [distrib_id], context=context)
180
181
                    sol_obj.write(cr, uid, [line.id], {'analytic_distribution_id': distrib_id}, context=context)
181
182
                    line = sol_obj.browse(cr, uid, line.id, context=context)
182
183
 
218
219
                        distrib_line_obj.copy(cr, uid, x.id, {'distribution_id': id_ad, 'destination_id': bro_dest_ok.id}, context=context)
219
220
                        # Write new distribution and link it to the line
220
221
                        sol_obj.write(cr, uid, [line.id], {'analytic_distribution_id': id_ad}, context=context)
221
 
 
 
222
                    # UFTP-277: Check funding pool lines if missing
 
223
                    ana_obj.create_funding_pool_lines(cr, uid, [id_ad], context=context)
222
224
        return True
223
225
 
224
226
sale_order()