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

[8.0] mrp_production_real_cost #65

Merged
merged 13 commits into from
Dec 28, 2015

Conversation

pedrobaeza
Copy link
Member

Real costs in manufacturing orders

This module allows to manage the control of Manufacturing Orders actual costs,
by creating analytic lines as defined in the MO (from mrp_project).

It also updates product standard price when a manufacturing orders is finished
according this formula:

(Product stock * Product standard price + Production real cost) /
(Product stock + Final product quantity)

Installation

This module depends on the module product_variant_cost_price, that is
available in:

https://github.com/OCA/product-variant

Usage

Operating with a manufacture order, analytic entries adding costs will be
created when:

  • Some raw material is consumed.
  • A work order is finished or paused.

Also, thanks to project_timesheet modules, users time is also translated to
costs in the linked analytic account.

@pedrobaeza pedrobaeza force-pushed the 8.0-mrp_production_real_cost branch 4 times, most recently from 44f0746 to 96060b5 Compare December 10, 2015 17:29
@rafaelbn
Copy link
Member

  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3137091-65-0d0df7/openerp/api.py", line 254, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3137091-65-0d0df7/openerp/api.py", line 496, in new_api
    result = method(self._model, cr, uid, *args, **old_kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3137091-65-0d0df7/openerp/models.py", line 4232, in _create
    tuple([u[2] for u in updates if len(u) > 2])
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3137091-65-0d0df7/openerp/sql_db.py", line 158, in wrapper
    return f(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3137091-65-0d0df7/openerp/sql_db.py", line 234, in execute
    res = self._obj.execute(query, params)
ValueError: "null value in column "account_id" violates not-null constraint
DETAIL:  Failing row contains (7, 1, 1, null, 1, 1, -2400.00, 3, 2015-12-14, 2015-12-14 11:43:51.708158, 2015-12-14 11:43:51.708158, MO00001--A1232, null, 30, 1, 6, null, 11, null, null, null, null, null, 1, null, null).
" while evaluating
u'action_done()'

14-12-2015 12-43-35

@oihane
Copy link
Contributor

oihane commented Dec 14, 2015

I tried to test in runbot, but it is not working, so technically it seems to be correct
👍

@rafaelbn
Copy link
Member

I tested in runbot this morning. @pedrobaeza error reported in #65 (comment) happens:

  • When you want to close a Work order
  • When you want to produce a Manufacturer order (mode: consume and produce)

@JMODaERP
Copy link

I tested in runbot 👍
2015-12-14 18_13_58-odoo community association - runbot repo

@rafaelbn
Copy link
Member

Ready to be tested in runbot! Rebuilded and working! 😄

@rafaelbn
Copy link
Member

Tested in a base database:

Still error commented #65 (comment)

@pedrobaeza
Copy link
Member Author

The error is because the demo production order is already started, but no project is filled. I have added the corresponding demo data to avoid this problem.

@JMODaERP
Copy link

O.K. Tested 👍

@rafaelbn
Copy link
Member

Tested in runbot 👍

@rafaelbn
Copy link
Member

I this this module is ready to be merged.

@oihane
Copy link
Contributor

oihane commented Dec 23, 2015

👍

@JavierIniesta
Copy link

Tested in runbot 👍

pedrobaeza added a commit that referenced this pull request Dec 28, 2015
@pedrobaeza pedrobaeza merged commit 4bbf95c into OCA:8.0 Dec 28, 2015
@pedrobaeza pedrobaeza deleted the 8.0-mrp_production_real_cost branch December 28, 2015 09:39
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.

None yet

10 participants