In Odoo, by default, it's not possible to assign a quantity less than 1.0 to a product when creating an invoice or any other document. This is because the quantity is usually used to represent the number of units of a product, and it's not possible to have a fraction of a unit.
However, depending on the specific use case, there are a few ways to work around this limitation:
Use decimal precision: Instead of using the quantity field, you can use the decimal_precision field to allow for decimal values. For example, you can use 0.5 to represent half a unit of a product.
Use a custom field: Create a custom field that allows decimal values and use it instead of the quantity field.
Use a custom module: You can also use an external module that allows for decimal quantities, but you need to check its compatibility with your version of Odoo and its reliability.
Use a work-around: Instead of using the quantity field, you can use the weight field and create a custom calculation that allows you to calculate the quantity based on the weight.
It's worth noting that, allowing decimal quantities can have an impact on the stock management, accounting, and other areas of your system, so you should consider the implications and test it thoroughly before implementing it in a production environment.