Skip to content
Snippets Groups Projects
Commit ecacfe0c authored by jvm-odoo's avatar jvm-odoo
Browse files

[FIX] lunch: fix batch mail order


Reproduce this issue:

    - Go in the lunch module
    - Create several orders for the same vendor
    - Go in "previous orders"
    - Select them and click on "actions > Lunch: Order meals"

    A traceback appears, no mail is sent and the status change to
    "ordered".

Cause:

    The `order` method in the lunch module returns an action but without
    enough information to send the mail correctly.

This commit add the missing information.

OPW-2118041

closes odoo/odoo#39959

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 7d69f014
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,9 @@ class LunchOrderLine(models.Model):
default_use_template=bool(template),
default_template_id=template.id,
default_lang=order['supplier'].lang or self.env.user.lang,
default_partner_ids=order['supplier'].ids,
default_res_id=self.ids[0],
default_model=self._name,
order=order,
lines=lines,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment