Skip to Content
  • How do I copy a websitebuilder block in a theme
    Hi friends in odoo
    
    I would like to duplicate and edit a website builder block in odoo V17.
    
    I was of the impression, that I saw that this is possible in a website builder 
    tutorial, but I can not
    find that tutorial again, and neither a way to do it in the website builder.
    
    
    Thanks a lot for your help
    and all the best
    
    Robert
    
    

    by robert - 05:06 - 4 Mar 2024
  • ERROR: could not serialize access due to concurrent update (case using Job Queue)
    Dear community,

    We have a case that needs to process a lot of transactions (500k arrive on the last day of month). And so we rely on our best friend OCA's Job Queue and have things run in parallel.

    Most process are OK, but the one creates stock picking, jobs can't run in parallel because there is a concurrent issue on the "stock_quant" table, which looks like many separated job is updating the same record.

    bad query:  update stock_quant set reserved_quantity = 10.00 ... where id in (100)
    ERROR: could not serialize access due to concurrent update
    bad query:  update stock_quant set reserved_quantity = 10.00 ... where id in (100)
    ERROR: could not serialize access due to concurrent update
    .....

    Concurrent updates are very common issues we always face. How do you get around with this problem?

    Thank you,
    Kitti U.









    by Kitti Upariphutthiphong - 02:16 - 4 Mar 2024
  • Product qty constraints for services
    Fellow contributors,
    
    I'm looking for a module - prior to jumping onto a train of making one - that would allow setting min/max/multiplier for products that are services.
    In v14, it could've been accomplished by sale_by_packaging module, yet as it was refactored in v16 this unintended feature is no longer available for services.
    
    My justification for possibly making a new module only for qty constraints is as follows: services like support or consulting can also be sold in packs of 5 hours.
    Yet that has nothing to do with inventory or stock.
    
    Yet it feels like such thing has already been implemented somewhere - I just can't find the place.
    
    Is there a known module that does that?
    Are there any objections making the module?
    
    Kind regards,
    Alexey

    by Alexey Pelykh - 08:10 - 4 Mar 2024
  • Making a redirect from "/" to "/shop" is bad idea for indexing Odoo website?

    Hello,


    I am trying to build an e-Commerce with odoo14 and I have noticed that home route is an empty page. Basically everything I need in the home is already in the "/shop" page. Main template that I need are


    - product grid

    - e-Commerce categories

    - featured products (introduced with 3rd party module)

    - new arrivals (introduced with 3rd party module)


    It would be a pain to bring all these into a new route (home route) and it would be so much reasonable to just make a redirect from "/" to "/shop".


    My issue is that my knowledge of "indexing" is basically non-existent, so I'm not aware of the consequences, it's hard for me to formulate a specific question about this topic so I'm just going to ask, in general: the "redirect approach" would be a BAD approach considering the way Odoo is designed ?


    In case it is not the right approach would you be so kind to suggest me a better possible solution to bring all template and controllers that I need from "/shop" to "/" ?


    I ask this mainly because have been told that generally keeping your home on "/" will improve the indexing, but I am not sure if that also applies to the Odoo structure.


    Will really appreciate your feedbacks

    Thank you

    --


    Francesco Ballerini






    Privo di virus.www.avast.com

    by Francesco Ballerini - 02:31 - 3 Mar 2024
  • Show product "sold" quantity on purchase order lines
    Hi,

    I have been asked to be able to show, on a purchase order, the quantity of product that has been sold on a period (e.g. last 90 days or last 180 days) on every purchase order line.

    I am struggling to find any module, do you know something similar?

    Thanks
    --
    Francesco Ballerini

    Privo di virus.www.avast.com

    by Francesco Ballerini - 08:33 - 2 Mar 2024
  • Purchasing "packaging-like" products
    Hello,
    
    I am dealing with a situation where the customer purchases many products that are like this: "Flora Margarine 8x1kg" It is not packaging, because it is not possible to buy just 1kg. This is quite confusing for the customer and I am trying to make it easier for them to manage. One of the problems is that they perceive that the UoM here should be kg (because they just see it there in the name). This can be handled by product_secondary_unit and stock_secondary_unit to get the amount in kgs.
    
    What I think could help is this: when ordering 1 unit of that product somehow turn in into 8 units of virtual "Flora Margarine 1kg" I am trying to wrap my head around this with no success. I have considered these modules but none seem to be doing what I would like to:
    
    * product_supplierinfo_qty_multiplier
    * purchase_only_by_packaging
    * product_pack
    
    Any ideas on how to approach this? Thank you very much.
    
    Best regards
    
    	Radovan Skolnik
    
    
    

    by Radovan Skolnik - 08:36 - 1 Mar 2024
  • [PSA] mail template editor group, mass mailing user group
    Hi all,
    
    today I got aware that Odoo by default (and by design) assigns the mail 
    template editor group to all backend users. Sounds harmless, but being a 
    member of this group allows you to run code, and when you can run code you can 
    do all kinds of nefarious things in the database.
    
    Given I'm busy with Odoo for a very long time, I'm a little ashamed that this 
    is news for me, but as a few colleagues I asked were also not aware of this, 
    it seems a good idea to me to spread awareness.
    
    On https://github.com/OCA/social/pull/1319 you find a module that helps you 
    removing this potentially dangerous group from your users.
    
    A very similar issue is mass_mailing with the mass mailing user group, the 
    above PR also contains a module to address that.
    
    My (and my customers') expectation is: Nobody can run code unless being added 
    to some high privilege group like mass mailing user explicitly, and those 
    modules help implementing this.
    
    Best regards,
    Holger
    
    
    -- 
    Your partner for the hard Odoo problems
    https://hunki-enterprises.com

    by Holger Brunn - 04:41 - 29 Feb 2024
  • Empty SQL argument and ANY operator
    Hello everyone,

    I'm trying to debug Odoo 14.0 to understand why some emails received on one of our public channel are not forwarded to all members of the list.

    The SQL query is made to retrieve all partners members of a channel that will be notified with a copy of the received email
    I tracked down the issue to the fact that an empty list (except_partner) is converted to '{}' (empty array literal) when used as an argument in the SQL query and the result of the query with this condition is always empty.

    I'm pretty sure that it is something tricky around the SQL language but as I'm not an expert on this, I don't know how to fix it.
    My current dirty fix is to add except_partner.append(0) to have a valid query but I would prefer to have the real SQL fix.

    image.png

    Any idea ?

    --
    Yann PAPOUIN, Ingénieur R&D | DEC

    by Yann Papouin - 12:52 - 21 Feb 2024
  • Status of different branches and reasoning to choose
    Hi,
    
    oca hosts a lot of repositories whith branches for the different 
    versions of odoo (..14,16,17). What's missing for me is a big picture of 
    the overall state of the different versions... Is community still most 
    complete/stable on 14, 16 oder 17 (or maybe even 12)?
    
    What version would you suggest to start with?
    
    What's also missing for me is a good big picture on the difference in 
    code/features beetween odoo enterprise, odoo open-source and oca on the 
    different versions.
    
    thx for any feedback,
    Peter
    

    by Peter Niederlag - 01:16 - 18 Feb 2024
  • Concurrency write check
    Hi,
    I haven't found a way to check if the concurrency check here works: https://github.com/odoo/odoo/blob/14.0/odoo/models.py#L3251
    Shouldn't it warn/block if someone tries to write on a field that has been modified in the meanwhile?
    Sergio Corato

    by Sergio Corato - 06:26 - 14 Feb 2024
  • Group all related stock picking
    Hello,
    I am looking for a way to search and group all related stock picking.
    In the following snapshot I am resupplying in 1 step between 2 warehouses: a delivery from WH2 to transit and then another reception from transit to WH1.

    How may search/group these two pickings (or move or move.lines)?
    I thought that the module stock_request would help me by setting the procurement group but it is not propagated to further legs (after first picking).
    Is there an existing app that can help? How may I do this?
    Thank you.



    by Yves Goldberg - 04:25 - 12 Feb 2024
  • Count sale orders in sale analysis
    Dear all
    I'm trying to inherit sale report analysis in order to be able to count sale orders (not sale order lines)
    It should be easy but I don't find the way...
    Thank in advance for your help

    --------------------------------
    Cyril VINH-TUNG
    INVITU
    Computer & Network Engineering
    BP 32 - 98713 Papeete - French Polynesia
    Tél: +689 40 46 11 99
    contact@invitu.com
    www.invitu.com

    by Cyril VINH-TUNG - 10:56 - 9 Feb 2024
  • Invoice Factur-X, l10n_fr_account_invoice_facturx
    Hello all,

    I've got questions about the factur-x generation xml file attached to the pdf. I'm working on the Odoo 12 version.

    When i print my PDF report or use the "Send to Chorus" button, at the begining of the process a factur-x xml flux in well generated and is valid against the xsd schema. But at the the end of the process the _post_pdf method base IrActionsReport class (server\odoo\addons\account_facturx\models\ir_actions_report.py) is called. 

    ==== CODE =======
    @api.multi
        def _post_pdf(self, save_in_attachment, pdf_content=None, res_ids=None):
            # OVERRIDE
            if self.model == 'account.invoice' and res_ids and len(res_ids) == 1:
                invoice = self.env['account.invoice'].browse(res_ids)
                if invoice.type in ('out_invoice', 'out_refund') and invoice.state != 'draft':
                    xml_content = invoice._export_as_facturx_xml()

                    # Add attachment.
                    reader_buffer = io.BytesIO(pdf_content)
                    reader = PdfFileReader(reader_buffer)
                    writer = PdfFileWriter()
                    writer.cloneReaderDocumentRoot(reader)
                    writer.addAttachment('factur-x.xml', xml_content)
                    buffer = io.BytesIO()
                    writer.write(buffer)
                    pdf_content = buffer.getvalue()

                    reader_buffer.close()
                    buffer.close()
            return super(IrActionsReport, self)._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=res_ids)
    =================

    As you can see, if the invoice is not in the 'draft' sale, the xml flux is re-generated according to another method invoice._export_as_facturx_xml() and attached to the PDF as factur-x.xml. And this factur-x xml content is not valid against the xsd schema. (see next)

    ==== COMMAND =======

    "C:\DATA\Odoo 12.0\python\python.exe" "C:\DATA\Odoo 12.0\python\Scripts\facturx-xmlcheck" factur-x.xml

    ==== RESULT COMMAND =======

    024-02-09 11:13:16,872 [INFO] Flavor is factur-x (autodetected)
    2024-02-09 11:13:16,873 [INFO] Level is en16931 (autodetected)
    2024-02-09 11:13:16,885 [ERROR] The XML file is invalid against the XML Schema Definition
    2024-02-09 11:13:16,885 [ERROR] XSD Error: Element '{urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}SpecifiedLineTradeAgreement': Missing child element(s). Expected is ( {urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}NetPriceProductTradePrice )., line 40
    2024-02-09 11:13:16,886 [ERROR] The Factur-x XML file is not valid against the official XML Schema Definition. Here is the error, which may give you an idea on the cause of the problem: Element '{urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}SpecifiedLineTradeAgreement': Missing child element(s). Expected is ( {urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}NetPriceProductTradePrice )., line 40.

    =================

    My final question is that when i "Send to Chorus", the invoice is rejected by the Chorus platform. I don't know why. I just can suppose that it comes from the fact that the xml flux is not valid.

    Thanks to all to your help, hints. 

    Cedric


    by Cedric DEBARD - 11:36 - 9 Feb 2024
  • Consuming stock internally while using the its costs in project
    Hello,
    
    I am dealing with a customer who provides catering services. The price is 
    dependent only on how many portions they serve regardless of the costs of 
    labour and/or ingredients used.
    
    I am planning to use projects (analytic accounts) to keep track of 
    profitability related to Sale Orders that will be invoiced based od delivered 
    quantities (of portions). Now I am scratching my head as on how to consume 
    storable stock (ingredients) in a way that its value would be added as a cost 
    to the project. Internal transfers? Purchase Order within the organization?
    
    The cost of staff should be possible to be dealt with with timesheets. Is that 
    so?
    
    Any advice is highly welcome. Thank you
    
    Best regards
    
    	Radovan Skolnik
    
    
    

    by Radovan Skolnik - 08:40 - 7 Feb 2024
  • Updating translations

    Hi,


    Can somebody give insight in how translations are moved from https://translation.odoo-community.org to the actual project?


    In my case I translated helpdesk_mgmt to Dutch for 16.0. There is one commit added to helpdesk repo from when I just started the translations (basically just containing the untranslated nl_NL.po file). Translation is complete now, but nothing happens anymore.


    In the past we could just add a po file and put translations in there. I understand this is maybe not so easy for non developers contributing translations, but is this still possible to do as well, or will stuff just be overwritten from the translation website?


    Kind regards, Ronald



    by "Ronald Portier" <rportier@therp.nl> - 01:36 - 7 Feb 2024
  • AW: Mounting location of part upon production

    AW: Mounting location of part upon production


    Hey,


    I would give a unique number to every product in stock and put this number in a bar code on the product for witch you need this mounting location.

    Your worker scans the final product ( the chair ) from the work order and he takes the first leg, scans it and put it first position given by the work order. So he can take the legs out the box without any worry and you knows exact with leg is in with position. And it is simple for the worker, taking him little time ( just scan each leg ) and it is not hard to code. Only maybe the work order that have to automaticaly give the positions and write the leg number on the work order ( here I have no experians -) ).


    With kind regards,


    Van Hirtum Johan



    -----Oorspronkelijk bericht-----
    Afzender: Daniel Reis <notifications@odoo-community.org>
    Verstuurd: Maandag 5 Februari 2024 16:02
    Aan: Contributors <contributors@odoo-community.org>
    Onderwerp: Re: Mounting location of part upon production

    Hi Tom,

    Option 2 will be problematic as it introduces artificial restrictions on component usage.
    Option 3 looks similar to Lot/Serial usage. What if you (ab)used Lot numbers for this?


    On 05/02/2024 11:57, Tom Blauwendraat wrote:
    Hello,
    
    I'm dealing with a situation where upon production, the mounting 
    location of the parts needs to be registered.
    
    Imagine a chair with 4 identical legs, but it needs to be registered 
    which leg is placed where: front right, front left, rear right or rear left.
    
    Is there something for this case in Odoo? What I could come up with is:
    
    - Requiring work orders for "leg mounting", and specifying the mount 
    location on the work order
    
    - Having separate products eg "Left rear leg" and producing these from 
    "Leg" (seems a bit of a hassle)
    
    - Adding a required field on stock move line in case certain products 
    are produced, where the mount location is filled in; also enforce 1.0 as 
    a quantity
    
    - ...
    
    -Tom
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    --
    DANIEL REIS
    MANAGING PARTNER

    M: +351 919 991 307
    E: dreis@OpenSourceIntegrators.com
    A: Avenida da República 3000, Estoril Office B, 3º Escr.34, 2649-517 Cascais

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by johan - 12:07 - 6 Feb 2024
  • Have you organised your 2024 OCA membership yet?
    Dear OCA-ers and Odooers,

    Read the latest OCA news item about the 2024 OCA membership and purchase process.

    If you haven’t purchased the 2024 OCA membership yet, help yourself through the website.

    I’m looking forward to seeing more OCA members in the Netherlands folder directory soon.

    Would like to collaborate and increase the Odoo popularity in the Netherlands together with other OCA members in 2024. Please feel free to contact me in the meantime.



    Best regards,


    Michel Stroom


    by Michel Stroom - 09:21 - 5 Feb 2024
  • Please approve PR [17.0][MIG] stock_mts_mto_rule: Migration to 17.0

    Hello,

     

    Please approve my Pull Request

    https://github.com/OCA/stock-logistics-warehouse/pull/1932

    It will take you just 2 minutes!

     

    BR,

    Aleksander Milinkevich

     


    by "Aleksander Milinkevich" <aleksander@versada.eu> - 02:06 - 5 Feb 2024
  • Mounting location of part upon production
    Hello,
    
    I'm dealing with a situation where upon production, the mounting 
    location of the parts needs to be registered.
    
    Imagine a chair with 4 identical legs, but it needs to be registered 
    which leg is placed where: front right, front left, rear right or rear left.
    
    Is there something for this case in Odoo? What I could come up with is:
    
    - Requiring work orders for "leg mounting", and specifying the mount 
    location on the work order
    
    - Having separate products eg "Left rear leg" and producing these from 
    "Leg" (seems a bit of a hassle)
    
    - Adding a required field on stock move line in case certain products 
    are produced, where the mount location is filled in; also enforce 1.0 as 
    a quantity
    
    - ...
    
    -Tom
    
    

    by Tom Blauwendraat - 12:57 - 5 Feb 2024
  • Travis sunset
    Hi everyone,

    As previously announced we have cancelled the OCA Travis subscription.

    This means Travis CI tests will stop working in OCA repos mid February.

    Older branches that still use Travis can be converted to GitHub actions by applying the OCA repo template [1]. Odoo >= 11 is supported.

    Best regards,

    -Stéphane

    by Stéphane Bidoul - 11:21 - 3 Feb 2024