Skip to content
Browse files

added possibillity to enable auto pdf creation globally

  • Loading branch information...
1 parent db4bfb2 commit 7f07969e39a6cc11a94b55e07fa0845c1792dcda @anti43 committed Jan 28, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/mpv5/db/objects/Item.java
View
4 src/mpv5/db/objects/Item.java
@@ -701,14 +701,14 @@ public void createRevenue() {
public boolean save(boolean silent) {
boolean saved = super.save(silent);
if (saved) {
- if (mpv5.db.objects.User.getCurrentUser().getProperty("org.openyabs.property", "autocreatepdf")) {
+ if (mpv5.db.objects.User.getCurrentUser().getProperty("org.openyabs.property", "autocreatepdf")|| GlobalSettings.getBooleanProperty("org.openyabs.exportproperty.autocreatepdf")) {
if (TemplateHandler.isLoaded(this)) {
new Job(Export.createFile(this.getFormatHandler().toUserString(), TemplateHandler.loadTemplate(this), this), Export.wait(User.getSaveDir(this))).execute();
} else {
YabsViewProxy.instance().addMessage(Messages.NO_TEMPLATE_LOADED + " (" + mpv5.db.objects.User.getCurrentUser() + ")", Color.YELLOW);
}
}
- if (mpv5.db.objects.User.getCurrentUser().getProperty("org.openyabs.property", "autocreateodt")) {
+ if (mpv5.db.objects.User.getCurrentUser().getProperty("org.openyabs.property", "autocreateodt")|| GlobalSettings.getBooleanProperty("org.openyabs.exportproperty.autocreateodt")) {
if (TemplateHandler.isLoaded(this)) {
new Job(Export.sourceFile(this.getFormatHandler().toUserString(), TemplateHandler.loadTemplate(this), this), Export.wait(User.getSaveDir(this))).execute();
} else {

0 comments on commit 7f07969

Please sign in to comment.
Something went wrong with that request. Please try again.