Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Upload image from website to backend (contact us form) [Closed]

By
DM
on 7/9/15, 6:15 AM 813 views

The Question has been closed for reason: contains offensive or malicious remarks

by
DM
on 10/23/2015 09:47:25

Hello Odoo Community,

I modified contact us form by adding upload image and website field.

If i upload image in the back end everything is fine. But if i want to upload image on website (contact us form) and send the form all the custom field details goes through like website, but image don’t. Any suggestion why?

Any suggestion and help would be appreciated


Code example xml view image:

 <field name="image" widget="image" class="oe_left oe_avatar"/>  

Python:

image=fields.Binary('Image') 


Contact us form:

<div t-attf-class="form-group #{error and 'image' in error and 'has-error' or ''}">

<label class="col-md-3 col-sm-4 control-label" for="image">Image Upload</label>

<div class="col-md-7 col-sm-8">

<input type="file" class="form-control" name="image" t-attf-value="#{image or ''}"/>

</div>

</div>

Screenshots:

http://s24.postimg.org/oem4kg6z9/contactus.jpg

http://s28.postimg.org/7h9ico0vh/leadformview.jpg

Kind Regards,

Darius


3

Emipro Technologies Pvt. Ltd.

--Emipro Technologies Pvt. Ltd.--
Tiny ERP Pvt Ltd
http://www.odoo.com
5975
| 6 7 8
Rajkot, India
--Emipro Technologies Pvt. Ltd.--

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. A ray of relief & satisfaction to  our customers heart by our successful deployment in their organization, purely represents our success in Odoo platform. Hence, we take pride for being an Odoo partner with a vision of expanding our strategic alliances with our customers to offer them high value-added, trustworthy & cost effective solutions.

 

Since establishment, our business has span across 11 countries of the world. Our customers are companies of all sizes ranging from start-ups to large enterprises, who realize that they need a professional business solutions to generate revenue streams, establish proper communication channels or streamline business operations. Standing with strong determination of customer satisfaction, observing each minute detail of their business processes, providing proper guidance and moving forth to develop product accordingly adds our value and reliability among our customers. 

 

We are blessed with efficient, passionate & eclectic young developers who have come across almost all kinds of business profiles, working with full dedication, applying creativity & new features in existing modules and completing customer's projects successfully on predefined target. Our in-depth knowledge while giving business solutions in Odoo allows us to offer following services to our customers :

 

  • Consulting
  • Installation, Configuration & Customization
  • Training & Support
  • Maintenance
  • Upgradation
  • Documentation
  • Crafting community modules
  • Drafting videos on demand
  • Smart Apps development

We will be :) to welcome you @ www.emiprotechnologies.com to solve any kind of your business needs around Odoo. However we are just an inch away from you by email info@emiprotechnologies.com or a tweet to @EmiproTech

Emipro Technologies Pvt. Ltd.
On 7/9/15, 8:04 AM

Hello Darius,

Your problems seems very simple, 

Did you included "enctype" attribute in your form ? Just like as below, ( See the enctype attribute only )

<form class="form-horizontal mt32" id="form_job_apply" action="/jobs/thankyou" method="post" enctype="multipart/form-data">

Tips : When you want to submit any binary data from web form, you must need to select "multipart/form-data" value for enctype attribute in your form. 

I am confident that your problem will be solved.



Is was already, but same issue.

DM
on 7/9/15, 8:11 AM

I found where those images going :) ir.attachments, i will make something out of it now :), thanks for help anyway :)

DM
on 7/9/15, 9:08 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/9/15, 6:15 AM
Seen: 813 times
Last updated: 10/23/15, 9:47 AM