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

Unable to finalize sale order if versions are in use #611

Closed
beuss opened this issue Oct 17, 2017 · 2 comments
Closed

Unable to finalize sale order if versions are in use #611

beuss opened this issue Oct 17, 2017 · 2 comments

Comments

@beuss
Copy link
Contributor

beuss commented Oct 17, 2017

If sales quotations versioning is in use, you cannot finalize a quotation. This is due to the PDF generation feature which is triggered when versions are used (SaleOrderServiceImpl::finalizeSaleOrder). PDF name is based on document sequence value (com.axelor.apps.sale.service.SaleOrderServiceImpl.getFileName(SaleOrder)) which defaults to *id (com.axelor.apps.sale.db.repo.SaleOrderManagementRepository.computeSeq(SaleOrder)), causing * character in filename, which raises an exception.
SaleOrderServiceImpl should sanitize filename before returning it (and MetaFile shouldn't accept anything as filename)

@beuss
Copy link
Contributor Author

beuss commented Oct 17, 2017

This issue is Windows-specific, as * is a valid character in filename under linux

beuss pushed a commit to beuss/axelor-business-suite that referenced this issue Oct 18, 2017
Drafts were numbered according to their ID which can be quite strange and
disappointing from an user perspective. Moreover using * character was
causing issues
(eg. axelor#611,
https://forum.axelor.com/t/illegal-char-at-index-13-comm-client-22-20170916-pdf/472/10).

Suggested fix uses a global sequence for numbering all drafts (meaning,
everywhere the "*"+getId() was used).
By the way, we fixed the way VentilateState and ExpenseServiceImpl were
checking if a number should be affected to the document (using its state
instead of a contains("*")).
beuss pushed a commit to beuss/axelor-business-suite that referenced this issue Oct 18, 2017
Drafts were numbered according to their ID which can be quite strange and
disappointing from an user perspective. Moreover using * character was
causing issues
(eg. axelor#611,
https://forum.axelor.com/t/illegal-char-at-index-13-comm-client-22-20170916-pdf/472/10).

Suggested fix uses a global sequence for numbering all drafts (meaning,
everywhere the "*"+getId() was used).
By the way, we fixed the way VentilateState and ExpenseServiceImpl were
checking if a number should be affected to the document (using its state
instead of a contains("*")).
@beuss
Copy link
Contributor Author

beuss commented Mar 11, 2018

Fixed by Axelor

@beuss beuss closed this as completed Mar 11, 2018
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

No branches or pull requests

1 participant