OCA / project-agile

30 stars 69 forks source link

Can't Save New Compay #31

Closed filwu8 closed 2 years ago

filwu8 commented 2 years ago

Can't Save New Compay

Odoo 14

when i add new compay,it's error :

The operation cannot be completed: - Create/update: a mandatory field is not set.

filwu8 commented 2 years ago

01). Use Resampling.LANCZOS instead.

erpv2 | self.image.thumbnail((asked_width, asked_height), Image.LANCZOS)

erpv2 |

erpdbv2 | 2022-06-15 04:19:57.493 UTC [36] ERROR: null value in column "code" of relation "project_task" violates not-null constraint

erpdbv2 | 2022-06-15 04:19:57.493 UTC [36] DETAIL: Failing row contains (228, t, 培训, null, 0, 10, null, normal, 2022-06-15 04:19:56.87777, 2022-06-15 04:19:56.87777, null, null, null, null, 42, null, 2, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null).

erpdbv2 | 2022-06-15 04:19:57.493 UTC [36] STATEMENT: INSERT INTO "project_task" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "code", "company_id", "kanban_state", "name", "priority", "project_id", "sequence", "stage_id", "user_id") VALUES (nextval('project_task_id_seq'), 2, (now() at time zone 'UTC'), 2, (now() at time zone 'UTC'), true, NULL, 11, 'normal', '培训', '0', 42, 10, NULL, 2) RETURNING id

erpv2 | 2022-06-15 04:19:57,514 1 ERROR ErpV2 odoo.sql_db: bad query: INSERT INTO "project_task" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "code", "company_id", "kanban_state", "name", "priority", "project_id", "sequence", "stage_id", "user_id") VALUES (nextval('project_task_id_seq'), 2, (now() at time zone 'UTC'), 2, (now() at time zone 'UTC'), true, NULL, 11, 'normal', '培训', '0', 42, 10, NULL, 2) RETURNING id

erpv2 | ERROR: null value in column "code" of relation "project_task" violates not-null constraint

erpv2 | DETAIL: Failing row contains (228, t, 培训, null, 0, 10, null, normal, 2022-06-15 04:19:56.87777, 2022-06-15 04:19:56.87777, null, null, null, null, 42, null, 2, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null).

erpv2 |

erpv2 | 2022-06-15 04:19:57,518 1 WARNING ErpV2 odoo.http: 操作无法完成:

filwu8 commented 2 years ago

how to fix?

filwu8 commented 2 years ago

when i magager user it's happend:

TypeError: formatter is not a function at Class._renderBodyCell (https://192.168.1.100/web/static/src/js/views/list/list_renderer.js:556:30) at https://192.168.1.100/web/static/src/js/views/list/list_renderer.js:946:25 at Array.map () at Class._renderRow (https://192.168.1.100/web/static/src/js/views/list/list_renderer.js:945:35) at Class._renderRow (https://192.168.1.100/web/static/src/js/views/list/list_editable_renderer.js:1173:32) at Class._renderRow (https://192.168.1.100/web/static/src/js/core/class.js:123:38) at Array.map () at Class._renderRows (https://192.168.1.100/web/static/src/js/views/list/list_renderer.js:966:32) at Class._renderRows (https://192.168.1.100/web/static/src/js/views/list/list_editable_renderer.js:1194:26) at Class._renderRows (https://192.168.1.100/web/static/src/js/core/class.js:123:38)

filwu8 commented 2 years ago

Spent half a day researching,I know how to fix

project_task_code\models\project_task.py

fix 7-13 :

class ProjectTask(models.Model): _inherit = "project.task" code = fields.Char( string="Task Number", )