|
| 1 | +============== |
| 2 | +Product images |
| 3 | +============== |
| 4 | + |
| 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. |
| 9 | + |
| 10 | +.. _product_images/configuration: |
| 11 | + |
| 12 | +Configuration |
| 13 | +============= |
| 14 | + |
| 15 | +This functionnality requires configuration both on Google and on Odoo. |
| 16 | + |
| 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. |
| 19 | + |
| 20 | +.. _product_images/google-api-dashboard: |
| 21 | + |
| 22 | +Google API dashboard |
| 23 | +-------------------- |
| 24 | + |
| 25 | +#. Go to `Google Cloud Platform API & Services <https://console.developers.google.com/>`__ page |
| 26 | + to generate Google Custom Search API credentials. Log in with your Google account. |
| 27 | + |
| 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). |
| 30 | + |
| 31 | +#. In the credentials section, click on `Create Crendentials` and select `API Keys`. |
| 32 | + |
| 33 | + .. image:: product_images/google-images-credentials00.png |
| 34 | + :align: center |
| 35 | + |
| 36 | +#. Save it, you'll need it for the next step in Odoo ! |
| 37 | + |
| 38 | +#. Use the search bar to find for `Google Custom Search API` and select it. |
| 39 | + |
| 40 | + .. image:: product_images/google-images-credentials01.png |
| 41 | + :align: center |
| 42 | + |
| 43 | +#. Enable the API. |
| 44 | + |
| 45 | + .. image:: product_images/google-images-credentials02.png |
| 46 | + :align: center |
| 47 | + |
| 48 | +.. _product_images/google-pse-dashboard: |
| 49 | + |
| 50 | +Google Programmable Search dashboard |
| 51 | +------------------------------------ |
| 52 | + |
| 53 | +#. Go to `Google Programmable Search Engine <https://programmablesearchengine.google.com/>`__ and |
| 54 | + click on `Get Started`. Log in with your Google account. |
| 55 | + |
| 56 | + .. image:: product_images/google-images-credentials03.png |
| 57 | + :align: center |
| 58 | + |
| 59 | +#. Fill the language and the name of the search engine. Give it an explicit name |
| 60 | + (e.g. Odoo Images). |
| 61 | + |
| 62 | + .. note:: |
| 63 | + Google doesn't allow to create a search engine without having entered at least one specific |
| 64 | + site to search on. You can put any website (e.g. www.google.com) for this step, we will |
| 65 | + remove it later. |
| 66 | + |
| 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 |
| 69 | + clicking on the name of your Search Engine on the Home page). |
| 70 | + |
| 71 | +#. In the basics tab, make sure to enable Image search, SafeSearch and Search the entire web. |
| 72 | + |
| 73 | + .. note:: |
| 74 | + Once `Search the entire web` enabled, you can safely delete the site that you previously |
| 75 | + entered at the previous step. |
| 76 | + |
| 77 | +#. Save your **Search Engine Id**. |
| 78 | + |
| 79 | + .. tip:: |
| 80 | + You can easily save your Search Engine ID by clicking on the Copy to clipboard button next to |
| 81 | + it. |
| 82 | + |
| 83 | +.. _product_images/setup-in-odoo: |
| 84 | + |
| 85 | +Odoo |
| 86 | +---- |
| 87 | + |
| 88 | +#. Go to :menuselection:`Settings --> General Settings --> Integrations`, |
| 89 | + activate **Google Images** and save. |
| 90 | + |
| 91 | +#. Go back to :menuselection:`Settings --> General Settings`, enter your **API Key** and |
| 92 | + **Search Engine ID** in Google Images settings and save again. |
| 93 | + |
| 94 | +#. The setup is now ready. |
| 95 | + |
| 96 | +.. _product_images/get-product-images: |
| 97 | + |
| 98 | +Automatically get your product images in Odoo |
| 99 | +============================================= |
| 100 | + |
| 101 | +The action to automatically get your product images in Odoo appears in any Products or Product |
| 102 | +Variants list view. Here is a step-by-step guide from the Inventory app. |
| 103 | + |
| 104 | +#. Go to :menuselection:`Inventory --> Products --> Products` or :menuselection:`Inventory --> |
| 105 | + Products --> Product Variants`. |
| 106 | + |
| 107 | +#. On the list view, select the products that needs an image. |
| 108 | + |
| 109 | + .. important:: |
| 110 | + Only the 10K first products or product variants selected will be processed. |
| 111 | + |
| 112 | + .. note:: |
| 113 | + Only the products or product variants with a barcode and without an image will be processed. |
| 114 | + If you select a product that has one or more variants from the Products view, each variant |
| 115 | + matching the previous criteria will be processed. |
| 116 | + |
| 117 | +#. In the action menu, select `Get Pictures from Google Images` and validate by clicking on |
| 118 | + `Get picture`. |
| 119 | + |
| 120 | +#. You should see your images appearing incrementally. |
| 121 | + |
| 122 | + .. note:: |
| 123 | + Only the 10 first images are fetched immediatly. If you selected more than 10, the rest will |
| 124 | + be fetched as a background job, so you can continue doing your work while illustrating your |
| 125 | + products. |
| 126 | + |
| 127 | + The background job process about 100 images in a minute. If you reach the quota authorized |
| 128 | + by Google (either with a free or a paid plan), the background job will put itself on hold |
| 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