The best channel for tricks in odoo. I always look forward to the next video because I know I will learn something useful. Thank you for your time. I have a question about this video: How can the warning message be translated? Our team uses two languages. Also if you can make a video on how to translate the employees name please. We issue invoices in two languages and it is not convenient to have the employee's name in Cyrillic on an English invoice.
@odoo-it-yourself4 ай бұрын
I've never worked with creating the warning in different languages. That's a great idea for a video! Let me look into that.
@mah-hag63614 ай бұрын
🎉The best
@odoo-it-yourself4 ай бұрын
Thank you!
@kyleyoung346320 күн бұрын
Great video! Would there be a way to slightly modify this to just pop up a warning but not stop you from saving? Something like the customer reference field on a sales order typically shouldn’t have duplicates, but there are scenarios that they do and it’s acceptable.
@odoo-it-yourself20 күн бұрын
So I'm looking into doing a video on a wizard you could get past. I've never done it before, but I think there's a way you could do it.
@toriqulislamkhanbyron31564 ай бұрын
GOAT!!!
@odoo-it-yourself4 ай бұрын
Hahaha...glad it's helpful!
@dylanwaltzing46124 ай бұрын
useful 👍
@odoo-it-yourself4 ай бұрын
Thank you!
@donJfash4 ай бұрын
Thanks for your videos! I have a few questions, firstly, on odoo17, i am not able to restrict sale of out of stock item, how can i solve this issue?, secondly, i use a user login for multiple retail locations and sell on POS module with different employees, is it possible to create employee/sales person log in for Sales module?
@odoo-it-yourself4 ай бұрын
Glad to help. You can restrict sales on e-commerce, but on the rest, I’d setup a check with an automation. For the separate user, I haven’t found a way to track a universal variable like the currently logged in user. Let me think on that.
@odoo-it-yourself4 ай бұрын
The two solutions I can think of off the top of my head would be to either require the field as they input a sale or you could potentially do something with the ip address.
@PeteNetАй бұрын
I am trying to adapt this script to verify if certain fields are filled in on invoices, and then display a warning or even pre-fill certain fields. The odd thing is, when saving an invoice, account.move seems to do multiple operations (sale.order does the same thing). Logging env.context shows that one of the operations holds the old data, and this makes checking on invoices or sale orders not work as elegantly as shown here on the contacts model. i.e. when a field is empty, in my case fiscal_position_id, I display a warning, but then when the user correctly fills out the field, the warning still comes up, because the first background operation has the old data which was empty.. Do you have any tips how I might capture the actual filled in data, and bypass the old data ? I'm also trying to understand what exactly is happening with the multiple operations when saving an invoice.. I have no other automated actions in place...
@odoo-it-yourselfАй бұрын
Hmmm...that's strange that you would have that kind of barrier. Are you specifically wanting a warning or are you just trying to stop people from moving forward if certain information isn't filled out? You can conditionally require fields and that will stop a user from moving forward till those fields are filled out.
@PeteNetАй бұрын
@@odoo-it-yourself I should perhaps do some further testing on a fresh database, but in both cases (just a warning or preventing going further) the same thing happens, even when I type a value in a field that is being checked in python, upon save there is always this 'old data' in the payload which is the previous-unfilled field, and this always triggers the condition.. it's a bit frustrating. It works perfectly on products and contacts for example, but on sales orders or invoices not. If I ever find a workaround, I'll post it here.
@labtreeltd14732 ай бұрын
How could you add a button on the warning screen that says 'Ignore warning' and save the record?
@odoo-it-yourself2 ай бұрын
Good question! For that, you would want to pop up a wizard. kzbin.info/www/bejne/nqO0i2CFlNl-iNU
@PeteNetАй бұрын
you can also do something like this (the _sendone function may be different depending on which odoo version you are using) : sent_messages = set() for msg in messages: if msg and msg not in sent_messages: record.env['bus.bus']._sendone( (record._cr.dbname, 'res.partner', record.env.user.partner_id.id), 'simple_notification', { 'title': 'Message Title', 'message': msg, 'sticky': True, } ) sent_messages.add(msg)
@NathanBettley2 ай бұрын
is there a way to set this warning to the customers who are buying a product and with that creating new account?
@odoo-it-yourself2 ай бұрын
Hmmm...a warning to say they already have an account? Do you have open signup setup? If so, it shouldn't allow them to create another account.
@admt-i8n3 ай бұрын
How much the line of code will cost in odoo online
@odoo-it-yourself3 ай бұрын
You don't have to buy that coverage, if you don't want to.