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] account_cutoff_base: Migration to 17.0 #1

Open
wants to merge 124 commits into
base: 17.0
Choose a base branch
from

Conversation

lethuthao2403
Copy link
Owner

No description provided.

Alexis de Lattre and others added 30 commits November 27, 2023 13:59
Use assert
Remove .keys()
No space before colon
PEP8/Flake8 : getting closer to compliancy
…de domains)

On account.account, type must be <> 'view' and <> 'closed'
…a single warning left !

Add translation template files.
The signature of existing methods is preserved.
Extract a new module account_invoice_start_end_dates from account_cutoff_prepaid
Use triple double quotes for docstring
Replace <openerp> by <odoo> in XML
Remove <data> tags in XML
Remove POT files
Currently translated at 100,0% (73 of 73 strings)

Translation: account-closing-11.0/account-closing-11.0-account_cutoff_base
Translate-URL: https://translation.odoo-community.org/projects/account-closing-11-0/account-closing-11-0-account_cutoff_base/de/
jbaudoux and others added 5 commits November 27, 2023 13:59
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-closing-16.0/account-closing-16.0-account_cutoff_base
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_cutoff_base/
Co-authored-by: Alexis de Lattre <alexis@via.ecp.fr>
@lethuthao2403 lethuthao2403 force-pushed the 17.0-mig-account_cutoff_base branch 4 times, most recently from 6234123 to 9a31f79 Compare November 28, 2023 03:50
@@ -0,0 +1,21 @@
# Copyright 2023 Akretion France (http://www.akretion.com/)

Choose a reason for hiding this comment

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

@thaolt99 This mig script is no longer needed

@@ -0,0 +1,2 @@
The migration of this module from 16.0 to 17.0 was financially supported
by Camptocamp

Choose a reason for hiding this comment

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

Suggested change
by Camptocamp
by Camptocamp.


- [Trobz](https://trobz.com):
- Dzung Tran \<<dungtd@trobz.com>\>
- Thao Le <thaolt@trobz.com>

Choose a reason for hiding this comment

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

Suggested change
- Thao Le <thaolt@trobz.com>
- Thao Le \<<thaolt@trobz.com>\>

Then regenerating the readme file

Copy link
Owner Author

Choose a reason for hiding this comment

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

@dzungtran89 the PR has been updated! Thank you.

Copy link

@dzungtran89 dzungtran89 left a comment

Choose a reason for hiding this comment

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

lgtm overall, minor changes needed

@dzungtran89
Copy link

dzungtran89 commented Nov 29, 2023

@thaolt99 the readme file is not updated yet

@lethuthao2403
Copy link
Owner Author

@dzungtran89 the PR has been updated! Thank you.

Copy link

@dzungtran89 dzungtran89 left a comment

Choose a reason for hiding this comment

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

thx, lgtm

Choose a reason for hiding this comment

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

def name_get(self): you should now override _compute_display_name instead, adding the possible new fields in the depends of the method
Check https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0 for more information

Choose a reason for hiding this comment

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

replace invisible by column_invisible on tree view:

<field
                    name="parent_id"
                    invisible="not context.get('account_cutoff_line_main_view', False)"
                />

<field name="currency_id" invisible="1" />
<field name="company_currency_id" invisible="1" />

<tree>
<field
name="parent_id"
invisible="not context.get('account_cutoff_tax_line_main_view', False)"

Choose a reason for hiding this comment

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

Suggested change
invisible="not context.get('account_cutoff_tax_line_main_view', False)"
column_invisible="not context.get('account_cutoff_tax_line_main_view', False)"

/>
<field name="base" />
<field name="amount" />
<field name="currency_id" invisible="1" />

Choose a reason for hiding this comment

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

Suggested change
<field name="currency_id" invisible="1" />
<field name="currency_id" column_invisible="1" />

<field name="amount" />
<field name="currency_id" invisible="1" />
<field name="cutoff_amount" />
<field name="company_currency_id" invisible="1" />

Choose a reason for hiding this comment

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

Suggested change
<field name="company_currency_id" invisible="1" />
<field name="company_currency_id" column_invisible="1" />

<field name="currency_id" invisible="1" />
<field name="cutoff_amount" />
<field name="company_currency_id" invisible="1" />
<field name="sequence" invisible="1" />

Choose a reason for hiding this comment

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

Suggested change
<field name="sequence" invisible="1" />
<field name="sequence" column_invisible="1" />

options="{'no_create': True}"
optional="show"
/>
<field name="company_id" invisible="1" />

Choose a reason for hiding this comment

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

Suggested change
<field name="company_id" invisible="1" />
<field name="company_id" column_invisible="1" />

<field
name="cutoff_type"
readonly="state == 'done'"
invisible="context.get('default_cutoff_type')"

Choose a reason for hiding this comment

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

Suggested change
invisible="context.get('default_cutoff_type')"
column_invisible="context.get('default_cutoff_type')"

<field name="cutoff_date" decoration-bf="1" />
<field name="move_ref" optional="hide" />
<field name="total_cutoff_amount" />
<field name="company_currency_id" invisible="1" />

Choose a reason for hiding this comment

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

Suggested change
<field name="company_currency_id" invisible="1" />
<field name="company_currency_id" column_invisible="1" />

@lethuthao2403
Copy link
Owner Author

@nguyenminhchien the PR has been updated! Thanks.

name = type2label.get(rec.cutoff_type, "")
if rec.cutoff_date:
name = f"({name}, {format_date(self.env, rec.cutoff_date)})"
rec.display_name = rec.name or f"#{rec.id}"

Choose a reason for hiding this comment

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

Suggested change
rec.display_name = rec.name or f"#{rec.id}"
rec.display_name = name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.