Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1329 Переглядів

Hi,

I successfully changed the file src/odoo/addons/project/static/src/js/project_task_kanban_examples.js in the staging branch to adjust the project task kanban examples per our needs. But merging seems not possible, change is not detected, so no merge. In the production stage I can't change the file in the odoo.sh editor.

Below an extract of what was changed.


How can I change the production stage?

Thank you all 🙏




Аватар
Відмінити
Автор Найкраща відповідь

I found a workaround. With odoo studio I created an automated action with the following python code:

# Get the IDs of the existing stages you want to allocate

# Replace the IDs in this list with the actual IDs of your existing stages

existing_stage_ids = [113, 2, 123]  # Replace with actual stage IDs


# Check if these stages exist

existing_stages = env['project.task.type'].search([('id', 'in', existing_stage_ids)])


# Get the IDs of the stages that actually exist

valid_stage_ids = existing_stages.mapped('id')


if valid_stage_ids:

    # Update the project to link these stages

    record.write({

        'type_ids': [(6, 0, valid_stage_ids)]

    })

else:

    # Handle the case where none of the stages exist

    # You might want to log this or take other actions

    pass

Model: project
trigger: on creation

Аватар
Відмінити
Найкраща відповідь

thank

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
бер. 22
2897
Project Kanban Columns Вирішено
1
груд. 19
5025
3
груд. 17
6673
0
вер. 17
3654
2
трав. 22
2722