Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031039Openbravo ERP08. Project and service managementpublic2015-10-05 11:102015-11-23 21:16
ngarcia 
vmromanos 
urgentmajoralways
closedfixed 
5
 
 
dmiguelez
Core
No
0031039: Cannot create sales order from project phase if the customer default invoice terms is Contract Billing
Cannot create sales order from project phase if the customer default invoice terms is Contract Billing
As system admin role:
   Install the Service Contract Management module
As group admin role:
   Set the Invoice Terms = Contract Billing to a BP - Customer
   Create a Multiphase Project for that BP
   Add a Sales Representative to it
   Add a phase to it
   Change Project Status to Order
   Select the phase and launch the Create Sales Order from Project Phase process
   Check the following error message is shown:
      value too long for type character(1)
   
No tags attached.
Issue History
2015-10-05 11:10ngarciaNew Issue
2015-10-05 11:10ngarciaAssigned To => Triage Finance
2015-10-05 11:10ngarciaModules => Core
2015-10-05 11:10ngarciaResolution time => 1446764400
2015-10-05 11:10ngarciaTriggers an Emergency Pack => No
2015-10-05 11:10ngarciaIssue Monitored: networkb
2015-10-14 16:21vmromanosAssigned ToTriage Finance => vmromanos
2015-10-14 16:21vmromanosStatusnew => acknowledged
2015-10-14 16:43vmromanosStatusacknowledged => scheduled
2015-10-14 16:43vmromanosNote Added: 0081020
2015-10-14 16:51vmromanosNote Added: 0081021
2015-10-20 13:32psanjuanNote Added: 0081134
2015-10-21 10:16hgbotCheckin
2015-10-21 10:16hgbotNote Added: 0081166
2015-10-21 10:16hgbotStatusscheduled => resolved
2015-10-21 10:16hgbotResolutionopen => fixed
2015-10-21 10:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/910a0f8b417c918c096ce081d22cbe571d2fa2d0 [^]
2015-10-21 10:16dmiguelezReview Assigned To => dmiguelez
2015-10-21 10:16dmiguelezNote Added: 0081167
2015-10-21 10:16dmiguelezStatusresolved => closed
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082137

Notes
(0081020)
vmromanos   
2015-10-14 16:43   
Note that Contracts and Projects are both mutually exclusive; that means that if you install Contract modules is because you don't want to use Projects (contact ICI for more details).

If you try to use both at the same time you might find conflicts or other problems. It is highly recommended to avoid this practice, which is not supported by the system.


In this concrete bug, since the fix is riskless for Core, we are fixing it. But this is an exception, and as a general rule we won't be fixing other issues related to supporting both contracts and projects at the same time.
(0081021)
vmromanos   
2015-10-14 16:51   
Test plan:

As system admin role:
   Install the Service Contract Management module
As group admin role:
   Set the Invoice Terms = Contract Billing to a BP - Customer
   Create a Multiphase Project for that BP
   Add a Sales Representative to it
   Add a phase to it
   Change Project Status to Order
   Select the phase and launch the Create Sales Order from Project Phase process.
   Verify no error is thrown and the sales order is successfully created
(0081134)
psanjuan   
2015-10-20 13:32   
Issue verified.

Test Plan above also verified. A sales order is properly created now with the information referred in the multi phase project.
(0081166)
hgbot   
2015-10-21 10:16   
Repository: erp/devel/pi
Changeset: 910a0f8b417c918c096ce081d22cbe571d2fa2d0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Oct 14 16:47:18 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/910a0f8b417c918c096ce081d22cbe571d2fa2d0 [^]

Fixed bug 31039: Cannot create sales order from project phase if the customer default invoice terms is Contract Billing

The v_InvoiceRule variable was defined as CHAR. In case the C_BPartner.InvoiceRule length is higher than 1 (as when defining Contract Billing), the process throws an exception.
The solution is to declare the variable as C_BPartner.InvoiceRule%TYPE, which automatically takes the definition from the C_BPartner table.

---
M src-db/database/model/functions/C_GENERATESOFROMPROJECTPHASE.xml
---
(0081167)
dmiguelez   
2015-10-21 10:16   
Code Review + Testing Ok
(0082137)
hudsonbot   
2015-11-23 21:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test