-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
[WIP][18.0] [mig] quality_control_oca: Migrated the module #1374
base: 18.0
Are you sure you want to change the base?
[WIP][18.0] [mig] quality_control_oca: Migrated the module #1374
Conversation
…d new concepts. * Triggers for product category * ACLs * Tolerances in questions * one2many copyable * Fix some views * Error on same tolerance * Colors on inspection lines * Unify inspection header data assignment in set_test method * key name in set_test * Change icon set
…les * Trigger line instead of test and user
* Expand AUTHORS * Fix permissions
* security modified * some demo info added * Added "partner_selectable" field, so that inspections can by made by partner * Little view fixing, field was oe_edit_only instead of label * Add partners to trigger lines * Tests added * Trigger lines with duplicated test cleaned quality_control: Propose to OCA quality_control: required changes quality_control: Fixing coveralls quality_control_stock: * added demo data * replaced unlink method by ondelete="cascade" * required changes
Making it a regular field, you can put any manual quantity in inspections
…pections only by quality control managers
* not take into account inactivated tests trigger lines * show action_cancel button in inspections even if it is autogenerated
`TestQualityControl` is failing on `QcTestTemplateCatergory._get_complete_name` when `name` is set as `False`.
…to quality_control module to avoid runbot warning
…riants + permissions (OCA#325)
…r group by default.
Currently translated at 98.1% (154 of 157 strings) Translation: manufacture-12.0/manufacture-12.0-quality_control Translate-URL: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-quality_control/pt/
Fixed Quality Control Trigger 'trigger' selector in Product Template and Product Category.
Currently translated at 77.1% (121 of 157 strings) Translation: manufacture-12.0/manufacture-12.0-quality_control Translate-URL: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-quality_control/hr/
Currently translated at 100.0% (163 of 163 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/it/
Currently translated at 100.0% (163 of 163 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/es/
Currently translated at 100.0% (163 of 163 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/it/
Currently translated at 100.0% (163 of 163 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/it/
Currently translated at 100.0% (163 of 163 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/
Currently translated at 100.0% (162 of 162 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/it/
Currently translated at 100.0% (162 of 162 strings) Translation: manufacture-16.0/manufacture-16.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca/it/
…ee view of the fields correctly
Currently translated at 100.0% (162 of 162 strings) Translation: manufacture-17.0/manufacture-17.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_oca/sv/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: manufacture-17.0/manufacture-17.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_oca/
Currently translated at 74.3% (119 of 160 strings) Translation: manufacture-17.0/manufacture-17.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_oca/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: manufacture-17.0/manufacture-17.0-quality_control_oca Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_oca/
Please follow oca migration commits convention and squash all commits |
# Copyright 2017 Simone Rubino - Agile Business Group | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, api, exceptions, fields, models |
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.
You can remove the translation import (_)
for inspection in self: | ||
if inspection.auto_generated: | ||
raise exceptions.UserError( | ||
_("You cannot remove an auto-generated inspection.") |
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.
And replace all of the calls to translate a string (_) with self.env._
) | ||
if inspection.state != "draft": | ||
raise exceptions.UserError( | ||
_("You cannot remove an inspection that is not in draft state.") |
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.
Same here
def action_todo(self): | ||
for inspection in self: | ||
if not inspection.test: | ||
raise exceptions.UserError(_("You must first set the test to perform.")) |
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.
Same here
for line in inspection.inspection_lines: | ||
if line.question_type == "qualitative" and not line.qualitative_value: | ||
raise exceptions.UserError( | ||
_( |
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.
Same here
and not tc.ql_values.filtered("ok") | ||
): | ||
raise exceptions.ValidationError( | ||
_( |
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.
Same here
for tc in self: | ||
if tc.type == "quantitative" and tc.min_value > tc.max_value: | ||
raise exceptions.ValidationError( | ||
_( |
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.
Same here
def _check_parent_id(self): | ||
if self._has_cycle(): | ||
raise exceptions.UserError( | ||
_("Error! You can not create recursive categories.") |
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.
Same here
# Copyright 2017 Simone Rubino - Agile Business Group | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, api, exceptions, fields, models |
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.
Same here
# Copyright 2017 Simone Rubino - Agile Business Group | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, api, exceptions, fields, models |
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.
Same here
No description provided.