Skip to content

[9.0] sale/purchase: Create dummy product #1599

@pedrobaeza

Description

@pedrobaeza

@StefanRijnhart in the commit 85f767c, you add a method for setting a dummy product in all sale lines without product (method link: 85f767c#diff-daefd2062eec09f4b6a6f29c1233b276R38).

What is the reason behind this? Why they can remain empty?

This is very harmful for several reasons:

  • You don't explicitly set no company, so in a multi-company environment, this breaks sales orders in several companies that are not from the admin company. This can be fixed any way setting the extra value 'company_id': False.
  • If lines have different uom, you will get errors on some computed fields and reports.

cc @Tecnativa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions