Skip to content
Snippets Groups Projects
Commit 71109992 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] repair: Default value for required selection field


Steps to reproduce the bug:

- On Safari, go to Module Repair
- Create a Repair Order
- Add a new line L
- A default type Add was set
- Set a product P on L

Bug:

The default value was reset

opw:2319954

closes odoo/odoo#57332

X-original-commit: 3aa92c1805f9d47dad4655b3ba49d08c319ef1df
Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent 512a13f9
No related branches found
No related tags found
No related merge requests found
......@@ -607,7 +607,7 @@ class RepairLine(models.Model):
related='repair_id.currency_id')
type = fields.Selection([
('add', 'Add'),
('remove', 'Remove')], 'Type', required=True)
('remove', 'Remove')], 'Type', default='add', required=True)
product_id = fields.Many2one(
'product.product', 'Product', required=True, check_company=True,
domain="[('type', 'in', ['product', 'consu']), '|', ('company_id', '=', company_id), ('company_id', '=', False)]")
......
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