-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][ADD] Module sale_stock_picking_invoicing #1025
Merged
OCA-git-bot
merged 3 commits into
OCA:14.0
from
akretion:14.0-NEW-sale_stock_picking_invoicing
Oct 24, 2024
+2,099
−0
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,150 @@ | ||
============================ | ||
Sales Stock Picking Invocing | ||
============================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:78538509f50f86482b07cd9015c687145bb674b380411dd35cf95ace3deabab4 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |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%2Faccount--invoicing-lightgray.png?logo=github | ||
:target: https://github.com/OCA/account-invoicing/tree/14.0/sale_stock_picking_invoicing | ||
:alt: OCA/account-invoicing | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-sale_stock_picking_invoicing | ||
: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/account-invoicing&target_branch=14.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends Stock Picking Invoicing implementation to Sale, you can define the 'Sale Invoicing Policy': | ||
|
||
* If set to Sale Order, keep native Odoo behaviour for creation of invoices from Sale Orders. | ||
|
||
* If set to Stock Picking, disallow creation of Invoices from Sale Orders for the cases where the Product Type are 'Product', in case of 'Service' still will be possible create from Sale Order. | ||
|
||
For stock.moves, override price calculation that is present in stock_picking_invoicing, with the native Sale Order Line price calculation, same for the partner_id and other informations used to create the Invoice from Sale Order as such Payment Terms, Down Payments, Incoterm, Client Ref,etc by using sale methods to get data in order to avoid the necessity of 'glue modules' (small modules made just to avoid indirect dependencies), so in the case of any module include a new field in Invoice created by Sale this field also be include when created by Picking, for example the modules `Account Payment Sale`_ and `Sale Commission`_. | ||
|
||
.. _`Account Payment Sale`: https://github.com/OCA/bank-payment/tree/14.0/account_payment_sale | ||
.. _`Sale Commission`: https://github.com/OCA/commission/tree/14.0/sale_commission | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Installation | ||
============ | ||
|
||
This module depends on: | ||
|
||
* sale_management | ||
* sale_stock | ||
* stock_picking_invoicing | ||
* stock_picking_invoice_link | ||
|
||
Configuration | ||
============= | ||
|
||
Define 'Sale Invoicing Policy', if the invoice should be created from Sale Order or from Stock Picking, go to: | ||
|
||
**Settings > Users & Companies > Companies** | ||
|
||
or | ||
|
||
**Sales > Configuration > Settings in Invoicing** | ||
|
||
Usage | ||
===== | ||
|
||
If 'Stock Picking' is choose as Policy the creation of Invoice from Sale Order works only for Service lines, in the case of Sale Order has Products and Service lines will be create two Invoices. | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* It is be possible reference multiple sale lines in only one invoice line, but there are a problem the field qty_invoiced in sale.order.line show the quantity of invoice line without consider, in this case, that the value is the sum of others sale lines https://github.com/odoo/odoo/blob/14.0/addons/sale/models/sale.py#L1230, what can make confuse the user about the real Invoiced Quantity, reference https://github.com/odoo/odoo/pull/77195 | ||
|
||
Changelog | ||
========= | ||
|
||
14.0.1.0.0 (2024-03-12) | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* [ADD] Module sale_stock_picking_invoicing based in l10n_br_sale_stock https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_sale_stock . | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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/account-invoicing/issues/new?body=module:%20sale_stock_picking_invoicing%0Aversion:%2014.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 | ||
~~~~~~~ | ||
|
||
* Akretion | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Akretion <https://akretion.com>`_: | ||
|
||
* Renato Lima <[email protected]> | ||
* Raphaël Valyi <[email protected]> | ||
* Magno Costa <[email protected]> | ||
|
||
* `KMEE <https://www.kmee.com.br>`_: | ||
|
||
* Gabriel Cardoso de Faria <[email protected]> | ||
|
||
Other credits | ||
~~~~~~~~~~~~~ | ||
|
||
The development of this module has been financially supported by: | ||
|
||
* Aketion - www.akretion.com | ||
|
||
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-mbcosta| image:: https://github.com/mbcosta.png?size=40px | ||
:target: https://github.com/mbcosta | ||
:alt: mbcosta | ||
.. |maintainer-renatonlima| image:: https://github.com/renatonlima.png?size=40px | ||
:target: https://github.com/renatonlima | ||
:alt: renatonlima | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-mbcosta| |maintainer-renatonlima| | ||
|
||
This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/14.0/sale_stock_picking_invoicing>`_ 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 @@ | ||
from . import models | ||
from . import wizards |
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,32 @@ | ||
# Copyright (C) 2013-Today - Akretion (<http://www.akretion.com>). | ||
# @author Renato Lima <[email protected]> | ||
# @author Raphael Valyi <[email protected]> | ||
# @author Magno Costa <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Sales Stock Picking Invocing", | ||
"category": "Warehouse Management", | ||
"license": "AGPL-3", | ||
"author": "Akretion, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/account-invoicing", | ||
"version": "14.0.1.0.0", | ||
"maintainers": ["mbcosta", "renatonlima"], | ||
"depends": [ | ||
"sale_management", | ||
"sale_stock", | ||
"stock_picking_invoicing", | ||
"stock_picking_invoice_link", | ||
], | ||
"data": [ | ||
"views/res_company_view.xml", | ||
"views/res_config_settings_view.xml", | ||
# Wizards | ||
"wizards/stock_invoice_onshipping_view.xml", | ||
], | ||
"demo": [ | ||
"demo/sale_order_demo.xml", | ||
], | ||
"installable": True, | ||
"auto_install": False, | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure sale_management is required? If yes could you please just explain why? (and eventually leave a short comment why here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Necessary to access Sale Menu
By some reason the sale module create menuitem with attribute active="False" https://github.com/OCA/OCB/blob/14.0/addons/sale/views/sale_views.xml#L8 and sale_management change for active="True" https://github.com/OCA/OCB/blob/14.0/addons/sale_management/views/sale_management_views.xml#L4