-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] base_exception : Migration to 17.0 #2761
Conversation
…lled by constraint methods 'detect_exception' can be called on an empty recordset.
- Show menu only to Exception Rule Managers - Use sequence and active widgets on tree view - Updated form to use sheet
… the _popup_exceptions mehtod
[IMP] Computed exception descriptions field, to display better help messages [IMP] Exceptions shouldn't be copied
By default exceptions can be ignored by the click of a button. Users begin human they will just click that button what ever the internal rules. So this PR adds the option to set specific exceptions as blocking. When exceptions are detected if one of them is blocking, the user will not be able to ignore them.
use odoo-test-helper split test so one test do one thing
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-16.0/server-tools-16.0-base_exception Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_exception/
Module migrated to version 17.0 cc https://github.com/APSL 148520 @miquelalzanillas @lbarry-apsl @Javierbcn @samoros1 please review Issue #2752 |
efa2710
to
f3a1ee4
Compare
The "pre-commit fixes" commit is missing. Check migration guide: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0 /ocabot merge base_exception |
/ocabot migration base_exception |
I squash the all migration's commits in one |
But "pre-commit fixes" is not a "migration commit". It's something apart. I told you about squashing in other PR because you have up to 3 "[MIG] xxxx: Migration to 17.0" commits. |
8a545ed
to
2c5e51b
Compare
I understand Pedro, sorry for the mistake. It's okay now? |
No worries, Antoni, it's a process to fully get into OCA that gets some time. Coming again to this PR, it seems the order and the content is not the proper one. Maybe it's better to redo the migration, saving your final files before doing it, so you don't have also to redo the migration itself. |
5452215
to
bc734e6
Compare
I go back to first commit when initialize the project and now i commited all i one. Much better? |
@@ -0,0 +1,15 @@ | |||
- Raphaël Valyi \<\<<[email protected]>\>\> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbidoul seems that this conversion to MD is not correct, putting extra <
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this entire thing just hanging on correcting this, and if so can I fix it?
The "pre-commit fixes" commit is still missing, but let's not be nitpicking. /ocabot migration base_exception |
) | ||
f"<li>{html.escape(e.name)}: <i>{html.escape(e.description or '')}</i> <b>" | ||
+ _( | ||
"{'(Blocking exception)' if e.is_blocking else ''}</b></li>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return res | ||
|
||
def write(self, vals): | ||
res = super().write(vals) | ||
self._get_cached_rules_for_domain.clear_cache(self) | ||
self._get_cached_rules_for_domain.cache.clear(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i face this warning:
File "/home/chien/code/odoo/odoo/17.0/odoo/models.py", line 4960, in _load_records_write
self.write(values)
File "/home/chien/code/oca/server-tools/17.0/base_exception/models/exception_rule.py", line 132, in write
self._get_cached_rules_for_domain.cache.clear(self)
File "/home/chien/code/odoo/odoo/17.0/odoo/tools/cache.py", line 113, in clear
warnings.warn('Deprecated method ormcache.clear(model, *args), use registry.clear_cache() instead')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm facing this warning too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, using this for create, write and unlink should be the correct way now:
self.env.registry.clear_cache()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nguyenminhchien, may you check this #2809 ?
@@ -69,7 +71,7 @@ | |||
<page | |||
name="help" | |||
string="Help" | |||
attrs="{'invisible': [('exception_type','!=','by_py_code')]}" | |||
invisible="exception_type != 'by_py_code'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I face this warning:
DeprecationWarning: XML declarations in HTML module descriptions are deprecated since Odoo 17, base_exception can just have a UTF8 description with not need for a declaration.
.
It's better if we remove the first line: <?xml version="1.0" encoding="utf-8"?>
You could also fetch this commit: OCA/maintainer-tools@8f89ec4 to let pre-commit does its things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm facing this warning too
@peluko00 are you still working on it? |
<footer> | ||
<button | ||
name="action_confirm" | ||
string="_Close" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe "_Close" is a typo.
Merged in #2809 |
No description provided.