-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
19 changed files
with
858 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
====================================== | ||
Sale Order Product Availability Inline | ||
====================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:688f99946dbceb8ec2c60c5531dc75a77c3160f942ffedce72756f72ef59a651 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Mature | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github | ||
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_order_product_availability_inline | ||
:alt: OCA/sale-workflow | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_order_product_availability_inline | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the functionality of 'Sales and Warehouse | ||
Management' to show you the stock availability (Free To Use Quantity) of | ||
each product as part of its name in the product drop-down widget on | ||
sales order lines. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
1. Go to *Sales > Orders > Orders* and choose an existing sales order or | ||
create a new one. | ||
2. Click on 'Add a product' under 'Order Lines' tab, then click on | ||
'Product' field to deploy products list. | ||
3. You will see stock availability (Free To Use Quantity) of each | ||
product as part of their name. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_order_product_availability_inline%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
------------ | ||
|
||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Ernesto Tejeda | ||
- Pedro M. Baeza | ||
- César A. Sánchez | ||
- Luis D. Lafaurie | ||
- Carlos Lopez | ||
|
||
- `Pesol <https://www.pesol.es>`__: | ||
|
||
- Jonathan Oscategui Taza <[email protected]> | ||
|
||
- `Sodexis <https://www.sodexis.com>`__: | ||
|
||
- SodexisTeam <[email protected]> | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px | ||
:target: https://github.com/ernestotejeda | ||
:alt: ernestotejeda | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-ernestotejeda| | ||
|
||
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_order_product_availability_inline>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2020 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Sale Order Product Availability Inline", | ||
"summary": "Show product availability in sales order line product " "drop-down.", | ||
"version": "18.0.1.0.0", | ||
"development_status": "Mature", | ||
"category": "Sales Management", | ||
"website": "https://github.com/OCA/sale-workflow", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"maintainers": ["ernestotejeda"], | ||
"license": "AGPL-3", | ||
"depends": ["sale_stock", "base_view_inheritance_extension"], | ||
"data": ["views/sale_views.xml"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_product_availability_inline | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-06-28 23:08+0000\n" | ||
"PO-Revision-Date: 2022-06-28 23:08+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_product_product | ||
msgid "Product Variant" | ||
msgstr "" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Línia de comandes de vendes" | ||
|
||
#~ msgid "Product" | ||
#~ msgstr "Producte" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_product_availability_inline | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-06-28 23:08+0000\n" | ||
"PO-Revision-Date: 2023-07-25 12:10+0000\n" | ||
"Last-Translator: Ivorra78 <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_product_product | ||
msgid "Product Variant" | ||
msgstr "Variante de Producto" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Línea Pedido de Venta" | ||
|
||
#~ msgid "Product" | ||
#~ msgstr "Producto" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_product_availability_inline | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-12-07 18:33+0000\n" | ||
"Last-Translator: mymage <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: it\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_product_product | ||
msgid "Product Variant" | ||
msgstr "Variante prodotto" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Riga ordine di vendita" |
24 changes: 24 additions & 0 deletions
24
sale_order_product_availability_inline/i18n/sale_order_product_availability_inline.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_product_availability_inline | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 17.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_product_product | ||
msgid "Product Variant" | ||
msgstr "" | ||
|
||
#. module: sale_order_product_availability_inline | ||
#: model:ir.model,name:sale_order_product_availability_inline.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import product_product | ||
from . import sale |
26 changes: 26 additions & 0 deletions
26
sale_order_product_availability_inline/models/product_product.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2020 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class ProductProduct(models.Model): | ||
_inherit = "product.product" | ||
|
||
def _compute_display_name(self): | ||
res = super()._compute_display_name() | ||
if self.env.context.get("so_product_stock_inline"): | ||
self = self.with_context(warehouse=self.env.context.get("warehouse")) | ||
availability = {r.id: [r.free_qty, r.uom_id.display_name] for r in self} | ||
precision = self.env["decimal.precision"].precision_get( | ||
"Product Unit of Measure" | ||
) | ||
for record in self: | ||
name = "{} ({:.{}f} {})".format( | ||
record.display_name, | ||
availability[record.id][0], | ||
precision, | ||
availability[record.id][1], | ||
) | ||
record.display_name = name | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2020 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class SaleOrderLine(models.Model): | ||
_inherit = "sale.order.line" | ||
|
||
@api.depends("product_id") | ||
def _compute_name(self): | ||
if self.env.context.get("so_product_stock_inline"): | ||
self = self.with_context(so_product_stock_inline=False) | ||
return super()._compute_name() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
10 changes: 10 additions & 0 deletions
10
sale_order_product_availability_inline/readme/CONTRIBUTORS.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- [Tecnativa](https://www.tecnativa.com): | ||
- Ernesto Tejeda | ||
- Pedro M. Baeza | ||
- César A. Sánchez | ||
- Luis D. Lafaurie | ||
- Carlos Lopez | ||
- [Pesol](https://www.pesol.es): | ||
- Jonathan Oscategui Taza \<<[email protected]>\> | ||
- [Sodexis](https://www.sodexis.com): | ||
- SodexisTeam \<<[email protected]>\> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This module extends the functionality of 'Sales and Warehouse | ||
Management' to show you the stock availability (Free To Use Quantity) of | ||
each product as part of its name in the product drop-down widget on | ||
sales order lines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
To use this module, you need to: | ||
|
||
1. Go to *Sales \> Orders \> Orders* and choose an existing sales order | ||
or create a new one. | ||
2. Click on 'Add a product' under 'Order Lines' tab, then click on | ||
'Product' field to deploy products list. | ||
3. You will see stock availability (Free To Use Quantity) of each | ||
product as part of their name. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.