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

[FIX] mrp: set default rounding if there is no recordset #32112

Conversation

Projects
None yet
5 participants
@pka-odoo
Copy link
Contributor

commented Mar 26, 2019

  • In master for grid view we have added + icon to create order,at time of mrp.workorder creation from grid, default_get is not called for uom.uom, so we don't have default value of rounding.
  • therefore, set rounding value to '0.01' when there is no rounding.

Related to Issue: 1957994

Description of the issue/feature this PR addresses:
traceback when I create a work order from Gantt view

Current behavior before PR:
traceback when I create a work order from Gantt view

Desired behavior after PR is merged:
traceback resolved when I create a work order from Gantt view

Pad:
https://pad.odoo.com/p/r.2f546e232fb318a8b9aeec3fc9950b1c

Issue:
https://www.odoo.com/web#id=1957994&action=327&model=project.task&view_type=form&menu_id=4720

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the seen 🙂 label Mar 26, 2019

@C3POdoo C3POdoo added the RD label Mar 26, 2019

@robodoo robodoo added the CI 🤖 label Mar 26, 2019

@pka-odoo pka-odoo force-pushed the odoo-dev:master-mrp-traceback-on-create-order-pka branch from 7b537db to edcaa0a Mar 26, 2019

@robodoo robodoo removed the CI 🤖 label Mar 26, 2019

[FIX] mrp: compute 'is_produced' only when production
- when there is no production for the workorder, then it will return rounding as none and in result it will throw traceback.
- so, set rounding only when there is production.

Related to Issue: 1957994

@pka-odoo pka-odoo force-pushed the odoo-dev:master-mrp-traceback-on-create-order-pka branch from edcaa0a to 660dbbd Mar 26, 2019

@robodoo robodoo added the CI 🤖 label Mar 26, 2019

@@ -125,6 +125,8 @@ def name_get(self):
@api.one
@api.depends('production_id.product_qty', 'qty_produced')
def _compute_is_produced(self):
if not self.production_id:
return

This comment has been minimized.

Copy link
@arbaes

arbaes Apr 2, 2019

Contributor

As @sle-odoo said, a workorder should always have a production_id. A solution would be to use a default_production_id

@sle-odoo sle-odoo closed this Apr 4, 2019

@robodoo robodoo added closed 💔 and removed CI 🤖 labels Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.