• Sign in
  • Try it free
    • Apps
      Websites
      Build great user experience
      • Website Builder
      • eCommerce
      • Blogs
      • Forums
      • Events
      • Live Chat
      • eLearning
      Sales
      Boost your success rate
      • Sales
      • CRM
      • Invoicing
      • Point of Sale
        • Shops
        • Restaurants
        • Hardware
      • Subscriptions
      • Sign
      • Rental
      • Amazon Connector

      Accountingapp icon
      Accounting
      More

      Accountingapp icon
      Accounting
      More

      Accountingapp icon
      Accounting
      More

      Accountingapp icon
      Accounting
      More
      Operations
      It's all about efficiency
      • Accounting
        • Accounting
        • AI
      • Project
      • Human Resources
        • Referral
        • Recruitment
        • Employees
        • Expenses
        • Appraisal
        • Fleet
        • Leaves
      • Inventory
      • Purchase
      • Manufacturing
        • MRP
        • PLM
        • Maintenance
        • Quality
        • IoT Box
      • Helpdesk
      • Field Service
      Productivity Tools
      Great Tools = Happy People
      • Communication
        • Discuss
        • Mailing Lists
        • Notes
      • Timesheet
      • Marketing
        • Social
        • Email
        • Automation
        • SMS
      • Survey
      • Approvals
      • Appointments
      • Documents New
        • Documents
        • Spreadsheet New
      • Planning
      Third party apps Odoo Studio Odoo Cloud Platform
    • Tour
    • Pricing
    • Learn
    • Community

    Help

    Odoo is the world's easiest all-in-one management software.
    It includes hundreds of business apps:

    • CRM
    • e-Commerce
    • Accounting
    • Inventory
    • PoS
    • Project management
    • MRP
    Take the tour
    • All Forums
    • Topics
    • People
    • Tags
    • Badges
    • About
      Go to:
    • Question
      All Topics People Tags Badges About
    0

    Create Link to Document (pdf) on Website

    Avatar
    Mark Wells
    12 January 2015
    Thanks for your subscription!
    website_builderwebsite

    Tried a couple things that didn't work. 

    I have PDF files I want to link to on a Website-Builder page.  #1) where do I put the documents. #2) how do I specify the link to that document (ie., /document/this-is-the-pdf.pdf)?

    Comment Share
    1 Comment
    Avatar
    Discard
    Avatar
    Manuel Pérez
    - 13 January 2015

    I'd like to do the same, maybe you can share what you did and we can help each other out?

    5 Answers
    8
    Avatar
    IT Libertas LLC
    15 January 2015
    Best Answer

    Hey, Mark!

    We also coped with the same problem. The only way found:

    1) Install module Document Management System (document).

    2) Create directory (knowledge menu unit) or use existing one. Attach to this category required file (button "Attachments" above the form)

    3) Since it was downloaded, it would generate an url. To access it: mouse right click on downloaded file - save url 

    4) Add the url to the website. Pressing it will download the file (publically available).

     

     

    Hey, Manuel! Regretfully, there is no enough karma to comment or answer another time. That's why this answer would be extended.

    So. Programatically, it is pretty much the same. The module 'document' allows to attach files to any object, including product.product (or product.template). So you have to find it:

    attachment_ids = self.env['ir.attachment'].search([('res_model','=','product.product'),('res_id','=',product.id)]). 

    Where product.id - is id of needed product. E.g. you can store attachment_ids in product.product class as one2many field. After that you can get an url of any attachment. For example, for binary files:

     for attach in attachment_ids:
                url = 'https://yourcompany.com'+'/web/binary/saveas?model=ir.attachment&field=datas&filename_field=name&id='+str(attach.id)

    This url may be easily added to the website product site, using foreach in product.attachment_ids

     

     

    Comment Share
    Avatar
    Discard
    0
    Avatar
    Alberto Vazquez
    12 March 2020
    Best Answer

    I use a subdomain on another server that uses PHP and simply change with a link from Odoo using <a href="https://</a>

    Comment Share
    Avatar
    Discard
    0
    Avatar
    dakar
    1 September 2017
    Best Answer

    Please, can you give us a link of the module "Document Management System"

     I can't find it in Odoo v9.0c...


    UPDATE:

    The module name is:  "Attachments List and Document Indexation"
    It's installed in Odoo by other module (maybe stock or mrp?)

    UPDATE2:

    The module "Documents/Attachments on Website Shop" (20€) allows to add attachments and to download these to the customers:
    https://www.odoo.com/apps/modules/9.0/website_product_shop_attachment/

    Comment Share
    Avatar
    Discard
    0
    Avatar
    Manuel Pérez
    15 January 2015
    Best Answer

    Hi IT Libertas,

    Did you find a way to do this programatically? If you had an odoo instance with 500 products, one attachment per product, does it mean you would manually create the link for the 500 of them?

    Thanks in advance.

     

    THANKS IT Libertas!!

    Comment Share
    Avatar
    Discard
    Community
    • eLearning
    • Documentation
    • Forum
    • Mailing Lists
    Open Source
    • Download
    • Github
    • Runbot
    • Translations
    Services
    • Odoo.sh Hosting
    • Support
    • Upgrade
    • Education
    • Find an Accountant
    • Find a Partner
    • Become a Partner
    About Odoo
    • Our company
    • Contact us
    • Careers
    • Events
    • Blog
    • Customers
    • Partners
    • Legal
    • Privacy
    • Security
    الْعَرَبيّة 简体中文 繁體中文 Nederlands English Français Deutsch Bahasa Indonesia Italiano 日本語 한국어 (KR) Português (BR) русский язык Slovenský jazyk Español ภาษาไทย Türkçe українська Tiếng Việt

    Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

    Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

    Website made with

    Webinar French on YouTube

    1. Use the live chat to ask your questions.
    2. The operator answers within a few minutes.

    Watch now