-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
[16.0][IMP] quality_control_oca, quality_control_stock_oca #1278
base: 16.0
Are you sure you want to change the base?
Conversation
e1f110e
to
e7ff281
Compare
required=True, | ||
readonly=True, | ||
copy=False, | ||
default=fields.Datetime.now, | ||
states={"draft": [("readonly", False)]}, | ||
) | ||
date_done = fields.Datetime(readonly=True) |
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.
Just to make the name presentation somewhat consistent among date fields.
date_done = fields.Datetime(readonly=True) | |
date_done = fields.Datetime(readonly=True, "Completion Date") | |
create_date = fields.Datetime("Create Date") |
<field name="create_date" optional="show" /> | ||
<field name="date" optional="show" /> | ||
<field name="date_done" optional="show" /> |
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'd prefer to have these fields after product_id
, to be slightly less invasive.
@@ -171,6 +176,9 @@ | |||
domain="[('success', '=', False)]" | |||
/> | |||
<newline /> | |||
<separator /> | |||
<filter name="plan_date" string="Plan Date" date="date" /> | |||
<filter name="date_done" string="Date Done" date="date_done" /> |
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.
<filter name="date_done" string="Date Done" date="date_done" /> | |
<filter name="date_done" string="Completion Date" date="date_done" /> |
context="{'group_by': 'date'}" | ||
/> | ||
<filter | ||
string="Date Done" |
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.
string="Date Done" | |
string="Completion Date" |
def write(self, vals): | ||
if "state" in vals: | ||
if vals["state"] in ["success", "failed"]: | ||
vals["date_done"] = datetime.now() | ||
elif vals["state"] == "draft": | ||
vals["date_done"] = False | ||
return super().write(vals) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
b290d21
to
7eecf03
Compare
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.
Code review. LGTM.
Should we add a post init hook script to populate the new date_done field based on write_date or something?
d235144
to
cc49325
Compare
cc49325
to
374baf4
Compare
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 think we can squash commits into one at this point, combining descriptions as well.
quality_control_oca/i18n/ja.po
Outdated
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.
Please don't include the .po file in the PR.
) | ||
|
||
@mute_logger("odoo.models.unlink") | ||
def test_inspection_create_for_template_with_before_timing(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.
Let's remove the new test cases added here and onwards as they are redundant. Capturing triggers is already covered by existing tests.
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.
Please make this section comprehensive and concise, instead of being so detailed on one of the configuration point.
# To avoid CacheMiss error from tests of other modules | ||
if "picking_type_id" not in self._cache: | ||
return |
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.
Not sure this is the right approach. Would be nice if someone could advise.
d909498
to
62bbcbe
Compare
9a5f302
to
b5ad9ad
Compare
b5ad9ad
to
471e306
Compare
@@ -0,0 +1,12 @@ | |||
Configure a QC trigger in the product, product template, or product category to create inspections efficiently: |
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.
Configure a QC trigger in the product, product template, or product category to create inspections efficiently: | |
Configure a QC trigger in the product, product template, or product category to define the conditions for creating inspections: |
|
||
This streamlined configuration ensures that QC inspections are created and managed effectively based on your specified triggers and conditions. |
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.
Let's remove this part as I believe that the intention is obvious.
This streamlined configuration ensures that QC inspections are created and managed effectively based on your specified triggers and conditions. |
471e306
to
6078aa6
Compare
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.
Code review. 👍
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.
Functional review.
This PR has the |
1 similar comment
This PR has the |
@OCA-manufacture-maintainer |
6078aa6
to
3e18fab
Compare
This commit adds date_done field, update views and filters and the timing field in the QC trigger line to enable following scenarios: - When timing is 'Before', an inspection is generated for each related move when a picking with the trigger is confirmed. - When timing is 'Plan Ahead', a 'Plan' inspection is generated for each related move when a picking with the trigger is confirmed. A plan inspection is just a plan, and cannot be updated except for the date. A plan inspection gets converted into an executable inspection once the picking is done.
3e18fab
to
8d6f95e
Compare
Before this commit, the QC inspection was only triggered when the picking was already done. So, users could check the QC inspection only after the done state.
With this commit, the QC inspection can be triggered with three options ("Before", "Plan Ahead", and "After"). This allows the QC inspection to be triggered both when the picking is in progress and when it is done, enabling users to check the quality at any stage.
This PR does following:
qc.inspection
move when a picking with the trigger is confirmed.
each related move when a picking with the trigger is confirmed. A
plan inspection is just a plan, and cannot be updated except for the
date. A plan inspection gets converted into an executable inspection
once the picking is done.
@qrtl QT4613