22Product images
33==============
44
5- The integration with **Google Custom Search API ** is a feature that allows finding images
6- automatically for your product, based on their barcode.
5+ The product images are very useful in Odoo, for example, to quickly find a product or check if you
6+ scanned the right one, but it can be a bit painful to set up especially if you have a lot of
7+ products. **Google Custom Search ** allows finding images automatically for your product, based on
8+ their barcode, keeping your focus on what matters in your business.
79
810.. _product_images/configuration :
911
@@ -12,32 +14,28 @@ Configuration
1214
1315This functionnality requires configuration both on Google and on Odoo.
1416
15- Google includes 100 free requests per day (about 100 images if all of them are found). To enable
16- up to 10K requests per day, you need to configure your Google account to do so.
17-
18- .. seealso ::
19- - `Create, modify, or close your Cloud Billing account
20- <https://cloud.google.com/billing/docs/how-to/manage-billing-account> `_
17+ With a free Google account, you can get up to 100 free images per day. If you need more images,
18+ you'll have to upgrade to a billing account.
2119
2220.. _product_images/google-api-dashboard :
2321
2422Google API dashboard
2523--------------------
2624
27- #. Go to `Google Cloud Platform <https://console.developers.google.com/ >`__ API & Services page
25+ #. Go to `Google Cloud Platform API & Services <https://console.developers.google.com/ >`__ page
2826 to generate Google Custom Search API credentials. Log in with your Google account.
2927
30- #. Select or create an API project to store the credentials if not yet done
31- before. Give it an explicit name (e.g. Odoo Images).
28+ #. Select or create an API project to store the credentials if not yet done before. Give it an
29+ explicit name (e.g. Odoo Images).
3230
33- #. In the credentials section, click on Create Crendentials and select ** API Keys ** .
31+ #. In the credentials section, click on ` Create Crendentials ` and select ` API Keys ` .
3432
3533 .. image :: product_images/google-images-credentials00.png
3634 :align: center
3735
3836#. Save it, you'll need it for the next step in Odoo !
3937
40- #. Use the search bar to find for * Google Custom Search API * and select it.
38+ #. Use the search bar to find for ` Google Custom Search API ` and select it.
4139
4240 .. image :: product_images/google-images-credentials01.png
4341 :align: center
@@ -53,7 +51,7 @@ Google Programmable Search dashboard
5351------------------------------------
5452
5553#. Go to `Google Programmable Search Engine <https://programmablesearchengine.google.com/ >`__ and
56- click on Get Started. Log in with your Google account.
54+ click on ` Get Started ` . Log in with your Google account.
5755
5856 .. image :: product_images/google-images-credentials03.png
5957 :align: center
@@ -66,14 +64,14 @@ Google Programmable Search dashboard
6664 site to search on. You can put any website (e.g. www.google.com) for this step, we will
6765 remove it later.
6866
69- #. Validate the form by clicking on Create. Then, go to the edition mode of the search engine
70- that you created (either by clicking on Control Panel button on the confirmation page or by
67+ #. Validate the form by clicking on ` Create ` . Then, go to the edition mode of the search engine
68+ that you created (either by clicking on ` Control Panel ` on the confirmation page or by
7169 clicking on the name of your Search Engine on the Home page).
7270
7371#. In the basics tab, make sure to enable Image search, SafeSearch and Search the entire web.
7472
7573 .. note ::
76- Once Search the entire web enabled, you can safely delete the site that you previously
74+ Once ` Search the entire web ` enabled, you can safely delete the site that you previously
7775 entered at the previous step.
7876
7977#. Save your **Search Engine Id **.
9088#. Go to :menuselection: `Settings --> General Settings --> Integrations `,
9189 activate **Google Images ** and save.
9290
93- #. Go back to :menuselection: `Settings --> General Settings ` and enter your **API Key ** and
94- **Search Engine ID ** in Google Images option .
91+ #. Go back to :menuselection: `Settings --> General Settings `, enter your **API Key ** and
92+ **Search Engine ID ** in Google Images settings and save again .
9593
9694#. The setup is now ready.
9795
@@ -116,8 +114,8 @@ Variants list view. Here is a step-by-step guide from the Inventory app.
116114 If you select a product that has one or more variants from the Products view, each variant
117115 matching the previous criteria will be processed.
118116
119- #. In the action menu, select the option * Get Pictures from Google Images * and validate by clicking
120- on * Get picture * .
117+ #. In the action menu, select ` Get Pictures from Google Images ` and validate by clicking on
118+ ` Get picture ` .
121119
122120#. You should see your images appearing in the next few minutes.
123121
@@ -128,80 +126,8 @@ Variants list view. Here is a step-by-step guide from the Inventory app.
128126
129127 The background job process about 100 images in a minute. If you reach the quota authorized
130128 by Google (either with a free or a paid plan), the background job will put itself on hold
131- for 24 hours and continue right where he stopped the day before. Any other background task
132- with a more important weight (e.g. payment post-processing job) will be executed in priority
133- and might extend the processing time.
134-
135- .. _product_images/faq :
136-
137- Troubleshooting
138- ===============
139-
140- Here are the most frequently asked questions about this feature. Feel free to add more questions
141- (with their answers, of course !) by editing this page on Github.
142- See :ref: `contributing/github-interface ` for additional help.
143-
144- .. _product_images/less-quality-or-not-found :
145-
146- Images have less quality than I expected, or are not found
147- ----------------------------------------------------------
148-
149- * Check if the barcode is correct (Avoid whitespaces, hypen, dots...).
150-
151- * Do manually a research on Google Images and compare the results. If you find better results than
152- in Odoo, also check your `Google Programmable Search Engine
153- <https://programmablesearchengine.google.com/> `__.
154-
155- .. note ::
156- The first picture found that corresponds with our criteria is saved. No matter how many times
157- you execute the action, you should get each time the same picture, unless results have changed
158- on Google's side. There are the criteria used when making a request to Google:
159-
160- * Safe mode is activated
161- * Image size is large
162- * Image type is photo
163- * Search type is image
164-
165- Currently, you can't change those variables. They can impact the result for less popular
166- products but should greatly improve results on a large scale.
167-
168- .. _product_images/errors :
169-
170- Possible errors
171- ---------------
172-
173- Most of the errors that you might encounter are very explicit and should be easy to resolve.
174- However, here are a few tips on what you can do in those cases.
175-
176- .. _google-cs-api : https://console.cloud.google.com/marketplace/product/google/customsearch.googleapis.com
177-
178- +----------------------------+--------------------------------------------------------------------+
179- | UserError | Solution |
180- +============================+====================================================================+
181- | Another task is already | It means that for some reason, the job is scheduled but has been |
182- | scheduled to pick the | delayed. In that case, your selection is saved and images will be |
183- | images on Google on *Date *.| fetched on *Date *. If you want to cancel the task, you have to go |
184- | | into debug mode. Then, go to :menuselection: `Settings --> |
185- | | Technical --> Scheduled Actions Triggers` and delete it. Keep in |
186- | | mind that, by deleting the trigger, you will cancel the task but |
187- | | not erase the selection. If you launch the task again with more |
188- | | than 10 Products or Product Variants selected, the old selection |
189- | | will also be processed at the same time. |
190- +----------------------------+--------------------------------------------------------------------+
191- | You didn't configure | You may have forgotten to save after entering the parameters in |
192- | properly your **API Key ** | the Settings. |
193- | or **Search Engine ID **. | |
194- +----------------------------+--------------------------------------------------------------------+
195- | There isn't any product | Check your selection of Products. If any Products or their variants|
196- | without a picture and | already have a picture, they won't be processed. Also, check if you|
197- | with a barcode. | well entered a barcode. |
198- +----------------------------+--------------------------------------------------------------------+
199- | Custom Search API is not | Check that you have enabled the Custom Search API in your Google |
200- | enabled in your Google | project either by visiting the link displayed in the error in Odoo |
201- | project. | or by checking the `Google Cloud Platform <google-cs-api_>`_ Custom|
202- | | Search API page. |
203- +----------------------------+--------------------------------------------------------------------+
204- | Your **API Key ** or | Check if you properly configured the **API Key ** and/or the |
205- | your **Search Engine ID ** | **Search Engine ID ** in Odoo. A common mistake is to invert these |
206- | is incorrect. | variables. |
207- +----------------------------+--------------------------------------------------------------------+
129+ for 24 hours and continue right where he stopped the day before.
130+
131+ .. seealso ::
132+ - `Create, modify, or close your Google Cloud Billing account
133+ <https://cloud.google.com/billing/docs/how-to/manage-billing-account> `_
0 commit comments