Community mailing list archives
Re: Capability of triggering action from an onchange, or similar functionalityby
The only thing I can do is communicate to the client that what they want cannot easily be done and to find some other way or hack to produce the required functionality.
On Sun, Nov 15, 2015 at 5:12 AM, Gustavo Marino <email@example.com> wrote:
Hello:It is related with the fact that during the creation of a record, data live only in the user interface (the browser front end). So, no real id is assigned to the record till it is written into the database. Thus, no action could be called because no id is available! (and this is the reason to show buttons in grey).A workaround was implemented when you are at the main object level (for example, the sales order). Before calling the button action, the record is first created in database.The workaround is not implemented if you are in a sub-record of the main object, and thus all buttons are grey till you save the record.The solution is not simple. In the front end, the same workaround used in the main object should be available for sub-records. That means, show active buttons, but before calling the button's action, create the object hierarchy in the database. This is not so simple because on creation in database you can not correlate sub-records with actual ids of the newly created objects (in the simpler case the follow the same order, but is possible to change the order or create additional objects in a create method override).The problem is not easy unless you are ready to face a major re-engineering of the UI code and associated web controller methods, and most probably the wire methods.Are you completely sure you can not get an equivalent result with one2many computed fields? This case is supported!Regards2015-11-15 1:27 GMT-03:00 OpenERP Master <firstname.lastname@example.org>:Hello,This is not the same. I have reviewed this functionality. It is a warning parameter that is built into the on_change method and is only capable of returning a message.On Sat, Nov 14, 2015 at 8:42 PM, Caudal Eric <email@example.com> wrote:
It is similar to the warning about out of stock in SOL.
You could get your inspiration thereLooking for onchange event trigger action, but some other way possible I would considerI already have this as a button on the sale order line, but you cannot click the button until you save the sale order, which is no good. The customer needs to be able to select from related products immediately after adding the sale.order.lineIs it possible for a scenario where business user adds a new line to a sale order, and entering the sku or changing the quantity triggers a popup window, (action) that displays them related products to add to the sale order.Hello,I am using version 8.0--
Eric Caudal (from my mobile)