Prevent Duplicate Contacts in Any Version of ODOO

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 21

  • @dylanwaltzing4612
    @dylanwaltzing4612 3 месяца назад +1

    useful 👍

  • @Ventsi-Genchev
    @Ventsi-Genchev 3 месяца назад +1

    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-yourself
      @odoo-it-yourself  3 месяца назад +1

      I've never worked with creating the warning in different languages. That's a great idea for a video! Let me look into that.

  • @toriqulislamkhanbyron3156
    @toriqulislamkhanbyron3156 3 месяца назад +1

    GOAT!!!

  • @mah-hag6361
    @mah-hag6361 3 месяца назад +1

    🎉The best

  • @donJfash
    @donJfash 3 месяца назад +1

    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-yourself
      @odoo-it-yourself  3 месяца назад

      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-yourself
      @odoo-it-yourself  3 месяца назад

      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
    @PeteNet 22 дня назад +1

    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
      @odoo-it-yourself  21 день назад

      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
      @PeteNet 21 день назад

      @@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.

  • @NathanBettley
    @NathanBettley Месяц назад +1

    is there a way to set this warning to the customers who are buying a product and with that creating new account?

    • @odoo-it-yourself
      @odoo-it-yourself  Месяц назад

      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.

  • @labtreeltd1473
    @labtreeltd1473 Месяц назад +1

    How could you add a button on the warning screen that says 'Ignore warning' and save the record?

    • @odoo-it-yourself
      @odoo-it-yourself  Месяц назад +1

      Good question! For that, you would want to pop up a wizard. ruclips.net/video/hrQZ-O_tKRs/видео.html

    • @PeteNet
      @PeteNet 22 дня назад +1

      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)

  • @admt-i8n
    @admt-i8n 2 месяца назад +1

    How much the line of code will cost in odoo online

    • @odoo-it-yourself
      @odoo-it-yourself  2 месяца назад

      You don't have to buy that coverage, if you don't want to.