Project_mrp doesn't operate well on task/project.

Bug #499645 reported by Bruno JOLIVEAU - www.savoirfairelinux.com
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Wishlist
gpa(OpenERP)

Bug Description

Hello,

In v5.0.7 and latest revisions, the project-mrp/mrp jit doesn't work fine since a validate sale order.
The "account analytic" field mapped to "id project" isn't correctly create in the task. It sends in the task description instead of project name.

Then the task is alone without project linked.

Thanks

Changed in openobject-addons:
status: New → Confirmed
summary: - mrp-jit doesn't work anymore on task/project
+ Regression: mrp-jit doesn't work anymore on task/project
Changed in openobject-addons:
importance: Undecided → High
milestone: none → 5.0.7
Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote : Re: [Bug 499645] Re: Regression: mrp-jit doesn't work anymore on task/project

2010/1/11 Raphaël Valyi - http://www.akretion.com <email address hidden>

> ** Summary changed:
>
> - mrp-jit doesn't work anymore on task/project
> + Regression: mrp-jit doesn't work anymore on task/project
>
> ** Changed in: openobject-addons
> Importance: Undecided => High
>
> ** Changed in: openobject-addons
> Milestone: None => 5.0.7
>
> --
> Regression: mrp-jit doesn't work anymore on task/project
> https://bugs.launchpad.net/bugs/499645
> You received this bug notification because you are subscribed to
> OpenObject Addons.
>
> Status in OpenObject Addons Modules: Confirmed
>
> Bug description:
> Hello,
>
> In v5.0.7 and latest revisions, the project-mrp/mrp jit doesn't work fine
> since a validate sale order.
> The "account analytic" field mapped to "id project" isn't correctly create
> in the task. It sends in the task description instead of project name.
>
> Then the task is alone without project linked.
>
it's not a regresion. On 5.0.6 the task is created alone without project
linked. It's necesary creating a project manually to it. It would be a
wishlist or blueprint.

Proposal: If various services lines are included on sales order, project_id
should be initialized by default with a new project. Project name would be
sales order reference.
Fields concerning to customer on project should be filled with sales order
customer values.
All tasks created concerning to the sales order should be assigned to this
project.

There is a blueprint about it I opened few months ago.
https://blueprints.launchpad.net/openobject-addons/+spec/creating-a-project-from-sales-order

There is another related blueprint for improving possibility of making
project quotation directly from projects to sales:

https://blueprints.launchpad.net/openobject-addons/+spec/creating-an-order-from-a-project

>
> Thanks
>
>
>

--
Ana Juaristi Olalde
Consultor Freelance OpenERP
www.anajuaristi.com
www.openerpsite.com
www.avanzosc.com
677 93 42 59 - 943 85 06 25

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: Regression: mrp-jit doesn't work anymore on task/project

All right, thank you Ana for pointing this was not a regression.

Actually, I think the create task from MRP should be coded in a way that is extensible by extra modules. It's currently not possible, once more because objects are created in the dark without passing back all the related ids to a potential overrider. So I don't think Tiny can alter the current behavior without impacting the guys using 5.0.6 in prod at all, so that's why I targeted it for 5.2.

But I agree with you all, that's very important to have a decent task creation from the MRP process, this is hardly generic currently, I hope we can do something about it for 5.2.

Changed in openobject-addons:
importance: High → Wishlist
milestone: 5.0.7 → v5.2
summary: - Regression: mrp-jit doesn't work anymore on task/project
+ mrp-jit doesn't work well on task/project
Changed in openobject-addons:
status: Confirmed → In Progress
assignee: nobody → gpa(Open ERP) (gpa-openerp)
Revision history for this message
gpa(OpenERP) (gpa-openerp) wrote : Re: mrp-jit doesn't work well on task/project

Hello subscribers,

I completely agree with the inconvenient behaviour of project_mrp , specifically for Service products.

Procurement cannot get reference of sale order line each time if BOM with service product is used.

I prefer to go for Sale order.

Herewith is an attached patch which will find the suitable SO for the procurement and do the proceedings henceforth.

Actually, we assume that procurement name will be derived from Sale Order and user will not change to stay away from complexity.

Would you please try and check with the attached path?

Thank you for your time and responses.

Hope this helps.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Ana,

Would you please check this?

Thanks.

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

Sorry Jay... I don't understand what the patch is suposed to do, so I don't know defining a test case to try.

Please tell me exactly the problem is solving and I will be pleased of testing it.

Thank you very much:

Ana

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Actually,

The tasks have to be created for service products. Those tasks were not containing analytic account names.

Project and accounts are linked with each task and same project as SaleOrder.

Thanks.

Revision history for this message
Richard (John) Nopkins@Servosoft (richard-nopkins) wrote :

The patch suits.
it seems clealer.
thanks jay-openerp and gpa-openerp

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

Hi everybody:

Sorry because I was very late on testing, but I couldn't make it before.

I'm testing in last today's downloaded stable 5.0 bazaar version. I'm sorry but I have to say it is not working at all for me.

Without applying patch and even applying the patch, project_mrp is not working properly now.
On 5.0.6, for each sales order line was created a clean task. On task name was included sales order reference, so you always new the sales order who created task. Since project was not assigned you had to create manually and assign all tasks created for a sales order to same project. I think this is a regression since we are loosing information.

Now... you have no sales order reference on task so you don't know the sales order who created the task. Much more complicated to organize.

1.- Each sales order line creates one task and the task is associated to his own project. So if an order has got 6 different lines, 6 different projects would be created. This is not correct.
2.- If an order has got 2 lines with same product, only in this case both lines are linked to same project.
3.- If 2 different orders have got same product on their lines, both lines are linked to same project. That is totally incorrect, so you are creating projects for products in lines, not for each sales order. Different orders could be from different customers!!
4.- Even with patch applied, project are not linked to an analytic account. Account is not created.
5.- Project name is sales order line product name. This is not correct.

So before, you were able to define manually the project, create the analytic account and assign each task correcty. Now there is a complicated manual operative first to detect wich task is associated to what order... after, relinking all tasks to their projects. Additionally you have to change manually all projects names because they are not correct and you have to create analytic account manually, so... I think this is a critical regression.

Thank you very much:

Ana

Revision history for this message
gpa(OpenERP) (gpa-openerp) wrote :

Hello Ana,

Thank you for you pointing out.
We confirm this problem.

I suggest the following patch.
Would you please apply and notify us?

Thanks.

Changed in openobject-addons:
status: In Progress → Confirmed
Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

Hi gpa

Much better now. All order lines are created under same project and project is created with sales order reference name even if analytic account is not created, not linked to project by now.

Two little adjustments about procurement and task name.

For all kind of procurements except services procurement is created like this:
Procurement reason: SO0003
Origin : SO0003
Product: [PC1] Basic PC

But for services products included on sales order lines is created like this:
Procument reason: Onsite Intervention
Origin: SO0009
Product: Onsite Intervention

Procurement reason is not taken sales order reference but product name.

So task name is created like this:
Onsite Intervention:Onsite Intervention

We are still loosing sales reference on task name as we had before.

Thank you very much.

Ana

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Ana,

We value your precious feedback.

It has been improved by the following patch.

Would you please check this patch?

Thank you.

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

Hi Jay:

The last patch was not creating analytic account related to project yet.

Task name included sales order reference, but at the end like this: Onsite Intervention:SO014

So I changed to be created like this: SO014:Onsite Intervention . IMHO it's much more clear and this is the way we used to see it before.

Additionally I included the necesary sentence to create the analytic account. Improved a little bit adding the sales order partner name to project and analytic account.

I send the new complete file mrp.py, since I don't know by now what is the original file and different included patches, so I send the mrp.py version that is working for me.

Thank you very much for your attention.

Ana

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

Jay... Additionally, I think you could set this blueprint as DONE. This patch is not only solving a bug, but improving very usefull functionality.

https://blueprints.launchpad.net/openobject-addons/+spec/creating-a-project-from-sales-order

Additionally I compared mrp.py version on trunk and I think it should be also updated with this patch.

Thanks a lot!!!

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thank you for the response Ana.

I would like to point out 3 points here:
1. "The last patch was not creating analytic account related to project yet." :
   -- How fair is it to create a new analytic account for project?
   -- I think, Project should have the link of analytic account if and only if the Sale Order has Analytic account linked.

2. "Onsite Intervention:SO014"
   -- I had changed the code to appear task name as Onsite Intervention:SO014 for the sake of consistency.
   -- If you have created a Sale Order with one service product and another non-service product, project_mrp will create 2 tasks.
   -- Now, the non-service related task would have task name as productname:SO ref:MO ref and just to retain the consistency ,I preferred to as prodname:SO ref. So user can easily differentiate that these are the tasks created from Same SO.

3. Blueprint
  -- In case of blueprints, I need to study and check whether really all the details are fixed/implemented or not.
  -- Blueprints cannot be closed by non-owners. Its possible only in bugs . Only the owner can operate the Blueprint.
  -- You can set assignee.

Your views please.
Thank you.

summary: - mrp-jit doesn't work well on task/project
+ Project_mrp doesn't operate well on task/project.
Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote : Re: [Bug 499645] Re: mrp-jit doesn't work well on task/project

2010/2/25 Jay (Open ERP) <email address hidden>

> Thank you for the response Ana.
>
> I would like to point out 3 points here:
> 1. "The last patch was not creating analytic account related to project
> yet." :
> -- How fair is it to create a new analytic account for project?
> -- I think, Project should have the link of analytic account if and only
> if the Sale Order has Analytic account linked.
>
Ahh.. ok. So if I link the analytic account to sales order the account will
be linked to project. I didn't test this case. i will do and tell you.

>
> 2. "Onsite Intervention:SO014"
> -- I had changed the code to appear task name as Onsite
> Intervention:SO014 for the sake of consistency.
> -- If you have created a Sale Order with one service product and another
> non-service product, project_mrp will create 2 tasks.
> -- Now, the non-service related task would have task name as
> productname:SO ref:MO ref and just to retain the consistency ,I preferred
> to as prodname:SO ref. So user can easily differentiate that these are the
> tasks created from Same SO.
>

I was just trying to make it consistent:

See code here like I set. Both (then and else) are creating task name same
way.
            if procurement.product_id.type == 'service':
                name_task = (procurement.origin, procurement.name or '')
            else:
                name_task = (procurement.product_id.name or
procurement.origin, procurement.name or '')

On your patch first line was like this:
               name_task = ('procurement.name or ', procurement.origin)
So Sales reference would be after name for services products and before name
for other kind of products.
:)
I think both are correct but I like much more having reference before
product name. You can see all created task for an order in a simple view on
list.

> 3. Blueprint
> -- In case of blueprints, I need to study and check whether really all the
> details are fixed/implemented or not.
> -- Blueprints cannot be closed by non-owners. Its possible only in bugs .
> Only the owner can operate the Blueprint.
> -- You can set assignee.
>

OK... so I can close myself.
Pleasure working this colaborative way. Thank you!!!

> Your views please.
> Thank you.
>
>
> ** Summary changed:
>
> - mrp-jit doesn't work well on task/project
> + Project_mrp doesn't operate well on task/project.
>
> --
> Project_mrp doesn't operate well on task/project.
> https://bugs.launchpad.net/bugs/499645
> You received this bug notification because you are subscribed to
> OpenObject Addons.
>
> Status in OpenObject Addons Modules: In Progress
>
> Bug description:
> Hello,
>
> In v5.0.7 and latest revisions, the project-mrp/mrp jit doesn't work fine
> since a validate sale order.
> The "account analytic" field mapped to "id project" isn't correctly create
> in the task. It sends in the task description instead of project name.
>
> Then the task is alone without project linked.
>
> Thanks
>
>
>

--
Ana Juaristi Olalde
Consultor Freelance OpenERP
www.anajuaristi.com
www.openerpsite.com
www.avanzosc.com
677 93 42 59 - 943 85 06 25

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

You won the arguments Ana,

We preferred the way to create a task name as SO/MO ref: Product name.
It has been fixed by revision 2615 <email address hidden>.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

It will be merged into trunk very soon.

Changed in openobject-addons:
milestone: 5.2 → 5.0.8
status: In Progress → Fix Released
Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

THANKS :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.