[FIX] sale_timesheet: description field of timesheet line fits to parent
Steps to reproduce: - Install Sales, Project, Timesheets. - Go to a task inside Project, and to the Timesheets tab. - Create or modify a timesheet line, and write a very long description. Issue: The description field of the timesheet line is not fitting to the parent instead is fitting for the content inside description making the table bigger than it should. Solution: We have a custom widget for timesheet_ids field when we have sale_timesheet and the widget is missing the `o_field_one2many` class. So we add the proper class to the component with `TimesheetsOne2ManyField` opw-3145298 closes odoo/odoo#112631 X-original-commit: e73d7c4c3cddabdbb5d175681cbfe3789d846239 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { Many2OneField } from "@web/views/fields/many2one/many2one_field";
|
||||
import { X2ManyField } from "@web/views/fields/x2many/x2many_field";
|
||||
|
||||
export class SoLineField extends Many2OneField {
|
||||
setup() {
|
||||
@@ -17,5 +18,8 @@ export class SoLineField extends Many2OneField {
|
||||
}
|
||||
}
|
||||
|
||||
registry.category("fields").add('so_line_one2many', registry.category('fields').get("one2many")); // TODO: Remove me when the gantt view is converted in OWL
|
||||
export class TimesheetsOne2ManyField extends X2ManyField {}
|
||||
TimesheetsOne2ManyField.additionalClasses = ['o_field_one2many'];
|
||||
registry.category("fields").add('so_line_one2many', TimesheetsOne2ManyField); // TODO: Remove me when the gantt view is converted in OWL
|
||||
|
||||
registry.category("fields").add("so_line_field", SoLineField);
|
||||
|
||||
Reference in New Issue
Block a user