I want to modify workflow sales.order using Workflow editor.
I created activities and transitions between them.
After click on button user must transmit to another activity(workflow state) but nothing change.
Next activity in action block has such python action:
write('state': 'maket_completed')
I tried to use server action with set same state sales.order
sales.order state field not changed.
I read for it docs and "Working with Odoo" and can not undestend where is my mistake.
Can you help me?
Re-create document and all works fine.
Related
The "Generate Issue Template URL" functionality is clunky, and I'm try to work around it. I have a webpage outside of YouTrack with a list of links containing different templates for ticket writers. Any time a template changes we have to click the "generate issue template" then go update that link on our other web page. It would be nice to simply link to a template, by ID, that when saved will create a new issue or instead link directly to the clone command. The intent is that we won't have to update our template links going forward, and ticket writers will always get the latest version of the template they need.
Ideally it would be best if the entire call to YT could be in the href attribute of a link, but using AJAX is an option as well.
YT Version: 2021.3.22256
I've tried this, and a couple of variations, with no luck:
Template 1
In YouTrack there's no link you can pass a command into to get get it executed.
What you can do is to compose a workflow script to autofill issue fields as required. The only remaining bit is some kind of trigger to get script started. For that you can still use "Generate Issue Template URL" functionality with a single fields or any other marker to let the script recognize the right change to react to.
My application has a function to save a document, which opens a save dialog to let the user choose where to save the document.
Since that function handles not only state but also a part of the UI/UX through the use of a dialog, is it considered a bad practice to move that piece of code in a saveDocument Vuex action, so that it would be reusable from multiple places in my code?
I don't think it's a bad pratice. Actions can receive parameters and they usually do.
Anyway, you can store the variable which says where to save the document in your state (setting a default value if you want) and change the value (with an action and a mutation) in your UI/UX component. Then in your action, you can get this information from the state via getter.
I hope this helps!
I have the case that I push some parameters to the nuxt router (https://router.vuejs.org/guide/essentials/navigation.html) whenever somebody visits a page without any parameters.
Example:
somebody visits: /program it will end up in /program/first-event?year=2018&month=6
(First the view filters the program for current events (therefore the parameters for this year and this month) and then from the filtered events it will set the first event as active post (also by pushing it to the router).
This is all wanted and good. BUT now I detected the following problem:
Somebody is visiting /aboutus and then navigates to /program, the router will automatically change to /program/url-of-event-post?year=2018&month=6.
Assuming the user wants to go back to /aboutus he clicks on the browser back button. This will bring him back to: /program which automatically adds the post and the parameters again (effectively moving one step forward again).
Means the user is caught in clicking endlessly on the back button.
My approach would be to try to register if a user clicks on the back button and if so, I would not add the parameters. But I don't know how to do this.
I thought the router would provide some 'from' property, but so far I did not find anything.
I would be very happy to hear some thoughts on this. Thank you heaps in advance.
You need use router.replace.
https://router.vuejs.org/guide/essentials/navigation.html#router-replace-location-oncomplete-onabort
Is there any way to display an error message after actionProductUpdate hook is executed in a module?
Looking at the Prestashop code, the hook is triggered in AdminProductController, but the return value is not being processed. Also adding any message in passed Product object seems to be out of my requirement.
The purpose is to provide user with an error message in case of wrong input, database update error etc after clicking on Save button in back-office product edit page.
in belvg blog user Prestarocket post the the very helpful comment:
"Why not using hookActionProductSave ?
With this hook, you can add errors to the controller ($this->context->controller->errors[])"
Regards
http://msdn.microsoft.com/en-us/library/windows/apps/hh761476.aspx
Those instructions are great, but where do I put the below code (grabbed from article above)? In my default.js file, above the app.addEventListener("activated", function (args) { line of code? Below that line? Elsewhere? Thanks Microsoft, but tell me where to put the code!
var notifications = Windows.UI.Notifications;
var recurrence = notifications.PeriodicUpdateRecurrence.hour;
var url = new Windows.Foundation.Uri("http://mytileprovider.com/tile.xml");
notifications.TileUpdateManager.createTileUpdaterForApplication().startPeriodicUpdate(url, recurrence);
Ideally this would just be a manifest setting with a dropdown of "Frequency" and an input box for the url to grab it from. That would be oh so helpful and convenient.
The answer is... it depends. :)
Where do you want to set up the tile and the polling? Is it an "always on" feature that is core to your application? If so, then put in inside the activated event for your default page (usually inside default.js). Or maybe you are adding tiles based on content that the user interacts with (i.e., selecting a stock to pin to the Start page). In that case, you would put that code inside the page that handles the user action that.
The simple answer is... inside the activated event. The real answer, as you can see, can be more involved.