sale_note_flow: flow is lost when invoicing on delivery

Bug #1193883 reported by Alexandre Fayolle - camptocamp
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sales - Reports
Alexandre Fayolle - camptocamp

Bug Description

when invoicing on delivery, the flow of information for SO to invoice is lost.

Here's a snippet I introduced in a custom module to work around this:

class stock_picking(orm.Model):
    _inherit = 'stock.picking'

    def _prepare_invoice(self, cr, uid, picking, partner, inv_type, journal_id, context=None):
        values = super(stock_picking, self)._prepare_invoice(cr, uid, picking,
                                                             partner, inv_type,
                                                             journal_id, context)
        if picking.sale_id:
            order = picking.sale_id
            values.update({'note1': order.note1,
                           'note2': order.note2,
        return values

    def _prepare_invoice_line(self, cr, uid, group, picking, move_line, invoice_id,
        invoice_vals, context=None):
        values = super(stock_picking, self)._prepare_invoice_line(cr, uid, group, picking, move_line, invoice_id,
                                                                  invoice_vals, context)
        if move_line.sale_line_id:
            order_line = move_line.sale_line_id
            values.update({'formatted_note': order_line.formatted_note,
        return values

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

I'll do a proper MP as soon as time allows.

Changed in sale-reports:
assignee: nobody → Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers