Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][mig] stock_picking_analytic #628

Closed
wants to merge 17 commits into from

Conversation

Wodran14
Copy link

No description provided.

rousseldenis and others added 16 commits February 14, 2024 16:07
- Switch field from analytic_account_id to analytic_distribution.
- Assign a dummy search arg to move_ids_without_package field (stock.picking) to bypass
  the warning from https://github.com/odoo/odoo/blob/0f84366/odoo/fields.py#L808-L812.
- Add an invisible analytic distribution field without group assignment in the picking
  form, due to newly added check in odoo/odoo@0501bbd.
Currently translated at 100.0% (7 of 7 strings)

Translation: account-analytic-16.0/account-analytic-16.0-stock_picking_analytic
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-stock_picking_analytic/es/
Currently translated at 42.8% (3 of 7 strings)

Translation: account-analytic-16.0/account-analytic-16.0-stock_picking_analytic
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-stock_picking_analytic/pt_BR/
Currently translated at 100.0% (7 of 7 strings)

Translation: account-analytic-16.0/account-analytic-16.0-stock_picking_analytic
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-stock_picking_analytic/pt_BR/
<xpath expr="//field[@name='name']" position="after">
<field
name="analytic_distribution"
readonly="state in ('done', 'cancel')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be removed:

Suggested change
readonly="state in ('done', 'cancel')"

Comment on lines 29 to 37
<xpath
expr="//notebook/page[@name='detailed_operations']
/field[@name='move_line_ids_without_package']"
position="attributes"
>
<attribute name="context" operation="update">
{"default_analytic_distribution": analytic_distribution}
</attribute>
</xpath>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part gives error when installing the module. Should it be removed?

Suggested change
<xpath
expr="//notebook/page[@name='detailed_operations']
/field[@name='move_line_ids_without_package']"
position="attributes"
>
<attribute name="context" operation="update">
{"default_analytic_distribution": analytic_distribution}
</attribute>
</xpath>

@Wodran14 Wodran14 force-pushed the 17.0-mig-stock_picking_analytic branch from cece7c0 to 23cd87e Compare March 18, 2024 08:09
@dreispt dreispt changed the title 17.0 mig stock picking analytic [17.0][mig] stock_picking_analytic Mar 18, 2024
@dreispt
Copy link
Member

dreispt commented Mar 18, 2024

/ocabot migrate stock_picking_analytic

@OCA-git-bot
Copy link
Contributor

Hi @dreispt. Your command failed:

Invalid command: migrate.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@dreispt
Copy link
Member

dreispt commented Mar 18, 2024

/ocabot migration stock_picking_analytic

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Mar 18, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 18, 2024
17 tasks
@peluko00
Copy link
Contributor

Any update @Wodran14 ?

@dcorio
Copy link

dcorio commented Jun 17, 2024

It's just a warning, but I get:

warnings.warn(f'Since Odoo 17, property {self}.states is no longer supported.')

Does it have something to do with this?

analytic_distribution = fields.Json(
        inverse="_inverse_analytic_distribution",
        states={
            "done": [("readonly", True)],
            "cancel": [("readonly", True)],
        },
    )

@peluko00
Copy link
Contributor

peluko00 commented Aug 6, 2024

Hi @astirpe @dcorio, can you revise this in this another pr.
Thank you!

@dreispt
Copy link
Member

dreispt commented Aug 22, 2024

Superseded by #628

@dreispt dreispt closed this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants