Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0015447
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 08. Project and service managementmajorhave not tried2010-12-15 18:322011-05-24 10:57
ReporterxabiermerinoView Statuspublic 
Assigned Toadrianromero 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision08a7da53ce77
ProjectionnoneETAnoneTarget Version3.0RC4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0RC3SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0015447: Error in 'Create Sales Orders from Expenses'

DescriptionWhen you try to create an order from expenses this error appears:

"ERROR: null value in column "paymentrule" violates not-null constraint".

It is necessary create a new BP, because the olds BP have a payment rule value.

Steps To Reproduce- As Openbravo Admin go to Master Data Management || Business Partner
- Create a new Business Partner and go to Customer
    - Price List: Generale Sales
    - Select a payment method.
    - Select a Payment Term.
- Create a Location
- Go to Project & Service Management || Transactions || Multiphase Project
- Create a new record:
    - BP: the BP created
- Go to Project & Service Management || Transactions || Expense Sheet
- Create a new record:
    Report Date: 15-02-2010
- Go to lines:
    - Check reinvoicing
    - Product: electricity
    - Project: select the project created
    - Business Partner: It will appear the BP associated to the project (the BO created)
- Go back to the header and process
- Go to Project & Service Management || Transactions || Create Sales Orders from Expenses || Create Sales Orders from Expenses
- Date Ordered: 15-02-2010
- Process

- Realize that the error appears
TagsclosingMay2011
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks backport 0015606 closedadrianromero Error in 'Create Sales Orders from Expenses' 

-  Notes
(0033235)
adrianromero (manager)
2010-12-16 12:55

It has to be checked in the java process that generate orders from expenses to assign a default value for payment rule when there are the following conditions

This is the assignment of the default condition (needs to be reviewed and tested)
            if ((data1[0].paymentrule.equals("") || data1[0].paymentrule == null) && newFlow) {
                data1[0].paymentrule = "P";
            }

In this file: https://code.openbravo.com/erp/devel/pi/file/0721c4d48648/src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java#l279 [^]
(0033524)
dmitry_mezentsev (developer)
2011-01-04 17:59

Adrian,

Just as a proposal to consider while fixing this issue.

If we are talking about 3.0 (and this is the case according to the reported product version) we can assume that APRM is always in. That means there is no need to do any checks or conditions in the 3.0 code of whether New or Old Financial Flow is used.

In general little by little where possible I would start doing some clean-ups of removing old financial flow things. For example, for this particular case maybe the fix can be (but for sure requires review, just as an idea) to allow "paymentrule" column to be null cause it is not used any more.

At the same time we need to be careful in a sense that in 3.0 we should allow for migration purposes co-existence of both flows. That means if someone is migrating from 2.50 to 3.0 they won´t be able to do new transactions in the old financial flow (only APRM one) but old completed transactions should be accessible for the reference (through old financial flow windows, reports) cause we are not going to migrate completed transactions (only open once).
(0033591)
hgbot (developer)
2011-01-11 18:33

Repository: erp/devel/pi
Changeset: 08a7da53ce77043062a61c2d8fc82245b1727fd2
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Jan 11 18:28:52 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/08a7da53ce77043062a61c2d8fc82245b1727fd2 [^]

Fixes issue 0015447: Error in Create Sales Orders from Expenses
It has been added a payment rule default value when using the new payment flow.

---
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
---
(0033592)
adrianromero (manager)
2011-01-11 18:33

* Testing the issue

Just follow the steps to reproduce and notice that now the order can be created. There has been only modified the case when the payment rule is null and there is active the new payables flow. In this case a default payment rule is assigned in the order generated.

* Other areas affected

Only the process of creating Orders from expenses has been modified. No other areas affected.

- Issue History
Date Modified Username Field Change
2010-12-15 18:32 xabiermerino New Issue
2010-12-15 18:32 xabiermerino Assigned To => adrianromero
2010-12-15 18:32 xabiermerino Modules => Core
2010-12-15 18:51 xabiermerino Issue Monitored: networkb
2010-12-16 12:55 adrianromero Note Added: 0033235
2011-01-04 17:59 dmitry_mezentsev Note Added: 0033524
2011-01-11 12:48 adrianromero Status new => scheduled
2011-01-11 12:48 adrianromero fix_in_branch => pi
2011-01-11 12:48 adrianromero Issue cloned 0015606
2011-01-11 12:48 adrianromero Relationship added blocks 0015606
2011-01-11 18:33 hgbot Checkin
2011-01-11 18:33 hgbot Note Added: 0033591
2011-01-11 18:33 hgbot Status scheduled => resolved
2011-01-11 18:33 hgbot Resolution open => fixed
2011-01-11 18:33 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/08a7da53ce77043062a61c2d8fc82245b1727fd2 [^]
2011-01-11 18:33 adrianromero Note Added: 0033592
2011-05-24 10:03 dalsasua Tag Attached: closingMay2011
2011-05-24 10:57 dalsasua Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker