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

[WIP][18.0] [mig] quality_control_oca: Migrated the module #1374

Open
wants to merge 106 commits into
base: 18.0
Choose a base branch
from

Conversation

Trivedi-Vacha-SerpentCS

No description provided.

oihane and others added 30 commits October 23, 2024 14:57
…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
* 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
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/
mymage and others added 25 commits October 23, 2024 14:57
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/
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/
@Trivedi-Vacha-SerpentCS Trivedi-Vacha-SerpentCS changed the title [18.0] [mig] quality_control_oca: Migrated the module [WIP][18.0] [mig] quality_control_oca: Migrated the module Oct 23, 2024
@peluko00
Copy link
Contributor

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
Copy link
Contributor

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.")
Copy link
Contributor

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.")
Copy link
Contributor

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."))
Copy link
Contributor

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(
_(
Copy link
Contributor

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(
_(
Copy link
Contributor

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(
_(
Copy link
Contributor

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.")
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

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.