-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
764 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,92 @@ | ||
========================= | ||
Sale Stock Secondary Unit | ||
========================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:8cc009d57453a4bd562d225ef150463b9702aa10478309bc7543a643efaa2ad6 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |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/12.0/sale_stock_secondary_unit | ||
: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-12-0/sale-workflow-12-0-sale_stock_secondary_unit | ||
: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=12.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the functionality of stock secondary unit module and | ||
sale_order_secondary_unit to allow copy secondary sale data to stock move when | ||
a sale order is confirmed. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To use this module you need to: | ||
|
||
#. Go to a *Product > General Information tab*. | ||
#. Create any record in "Secondary unit of measure". | ||
#. Set the conversion factor. | ||
#. Go to *Sale > Quotation* and create a sale order with this product. | ||
#. Confirm the sale order. | ||
#. Go to picking from this sale order, you will see secondary unit information. | ||
|
||
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_stock_secondary_unit%0Aversion:%2012.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 | ||
~~~~~~~~~~~~ | ||
|
||
* Carlos Dauden <[email protected]> | ||
* Sergio Teruel <[email protected]> | ||
* Tony Gu <[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. | ||
|
||
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/12.0/sale_stock_secondary_unit>`_ 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,19 @@ | ||
# Copyright 2019 Tecnativa - Sergio Teruel | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
'name': 'Sale Stock Secondary Unit', | ||
'summary': 'Get product quantities in a secondary unit', | ||
'version': '12.0.1.0.0', | ||
'development_status': 'Beta', | ||
'category': 'stock', | ||
'website': 'https://github.com/OCA/sale-workflow', | ||
'author': 'Tecnativa, Odoo Community Association (OCA)', | ||
'license': 'AGPL-3', | ||
'application': False, | ||
'installable': True, | ||
'depends': [ | ||
'sale_order_secondary_unit', | ||
'stock_secondary_unit', | ||
], | ||
'auto_install': True, | ||
} |
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,22 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_stock_secondary_unit | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-03-22 10:46+0000\n" | ||
"Last-Translator: Daniel Martinez Vila <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: ca\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.3.2\n" | ||
|
||
#. module: sale_stock_secondary_unit | ||
#: model:ir.model,name:sale_stock_secondary_unit.model_stock_rule | ||
msgid "Stock Rule" | ||
msgstr "Regla d’estoc" |
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,20 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_stock_secondary_unit | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: Automatically generated\n" | ||
"Language-Team: none\n" | ||
"Language: de\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" | ||
|
||
#. module: sale_stock_secondary_unit | ||
#: model:ir.model,name:sale_stock_secondary_unit.model_stock_rule | ||
msgid "Stock Rule" | ||
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,22 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_stock_secondary_unit | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-03-22 10:46+0000\n" | ||
"Last-Translator: Daniel Martinez Vila <[email protected]>\n" | ||
"Language-Team: none\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.3.2\n" | ||
|
||
#. module: sale_stock_secondary_unit | ||
#: model:ir.model,name:sale_stock_secondary_unit.model_stock_rule | ||
msgid "Stock Rule" | ||
msgstr "Regla de stock" |
20 changes: 20 additions & 0 deletions
20
sale_stock_secondary_unit/i18n/sale_stock_secondary_unit.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,20 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_stock_secondary_unit | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.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_stock_secondary_unit | ||
#: model:ir.model,name:sale_stock_secondary_unit.model_stock_rule | ||
msgid "Stock Rule" | ||
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,23 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_stock_secondary_unit | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: Tony Gu<[email protected]>\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_stock_secondary_unit | ||
#: model:ir.model,name:sale_stock_secondary_unit.model_stock_rule | ||
msgid "Stock Rule" | ||
msgstr "" | ||
|
||
#~ msgid "Procurement Rule" | ||
#~ 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,2 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import stock_rule |
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,23 @@ | ||
# Copyright 2019 Tecnativa - Sergio Teruel | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from odoo import models | ||
|
||
|
||
class StockRule(models.Model): | ||
_inherit = 'stock.rule' | ||
|
||
def _get_stock_move_values(self, product_id, product_qty, product_uom, | ||
location_id, name, origin, values, group_id): | ||
res = super(StockRule, self)._get_stock_move_values( | ||
product_id, product_qty, product_uom, location_id, name, origin, | ||
values, group_id | ||
) | ||
if values.get('sale_line_id', False): | ||
sale_line = self.env['sale.order.line'].browse( | ||
values['sale_line_id']) | ||
if sale_line.secondary_uom_id: | ||
res.update({ | ||
'secondary_uom_id': sale_line.secondary_uom_id.id, | ||
'secondary_uom_qty': sale_line.secondary_uom_qty, | ||
}) | ||
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,3 @@ | ||
* Carlos Dauden <[email protected]> | ||
* Sergio Teruel <[email protected]> | ||
* Tony Gu <[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,3 @@ | ||
This module extends the functionality of stock secondary unit module and | ||
sale_order_secondary_unit to allow copy secondary sale data to stock move when | ||
a sale order is confirmed. |
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: | ||
|
||
#. Go to a *Product > General Information tab*. | ||
#. Create any record in "Secondary unit of measure". | ||
#. Set the conversion factor. | ||
#. Go to *Sale > Quotation* and create a sale order with this product. | ||
#. Confirm the sale order. | ||
#. Go to picking from this sale order, you will see secondary unit information. |
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.