Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/10.0' into 11.0-automerge-5abe…
…b016cd044cdefc18773c0d2333e323d01a9c
- Loading branch information
Showing
28 changed files
with
363 additions
and
19 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,45 @@ | ||
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/lgpl | ||
:alt: License: LGPL-3 | ||
|
||
============================ | ||
Sale Layout Hidden Section | ||
============================ | ||
|
||
In Odoo all the layouts are the corresponding sections, which used to group the PDF report data. By default, all such layouts are displayed for every existing Sale Orders and there are no possibility to display a specific one. So it is inconvenient, because some of the layouts may not suit for some set of sale orders. | ||
|
||
The module eliminates this disadvantage, because allows to use layouts only within Sale Order they created for. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Artyom Losev <apps@it-projects.info> | ||
|
||
Sponsors | ||
-------- | ||
* `IT-Projects LLC <https://it-projects.info>`__ | ||
|
||
Maintainers | ||
----------- | ||
* `IT-Projects LLC <https://it-projects.info>`__ | ||
|
||
To get a guaranteed support you are kindly requested to purchase the module at `odoo apps store <https://apps.odoo.com/apps/modules/10.0/sale_layout_hidden_section/>`__. | ||
|
||
Thank you for understanding! | ||
|
||
`IT-Projects Team <https://www.it-projects.info/team>`__ | ||
|
||
Further information | ||
=================== | ||
|
||
Demo: http://runbot.it-projects.info/demo/misc-addons/10.0 | ||
|
||
HTML Description: https://apps.odoo.com/apps/modules/10.0/sale_layout_hidden_section | ||
|
||
Usage instructions: `<doc/index.rst>`_ | ||
|
||
Changelog: `<doc/changelog.rst>`_ | ||
|
||
Tested on Odoo 10.0 e66e1e2142aa8812149e82cdc5f391aa9599cea6 |
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 @@ | ||
# -*- coding: utf-8 -*- | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
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,34 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 Artyom Losev | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
{ | ||
"name": """Separate Layouts for Sale Orders""", | ||
"summary": """ | ||
Display the layouts (sections) within the Sale Orders they were created for""", | ||
"category": "Sale", | ||
"images": ['images/sale_layout_hidden_section.png'], | ||
"version": "10.0.1.0.0", | ||
"application": False, | ||
|
||
"author": "IT-Projects LLC, Artyom Losev", | ||
"support": "apps@it-projects.info", | ||
"website": "https://it-projects.info", | ||
"price": 29.00, | ||
"currency": 'EUR', | ||
|
||
"license": "LGPL-3", | ||
|
||
"depends": [ | ||
"sale", | ||
], | ||
"external_dependencies": {"python": [], "bin": []}, | ||
"data": [ | ||
'views/views.xml' | ||
], | ||
"post_load": None, | ||
"pre_init_hook": None, | ||
"post_init_hook": None, | ||
|
||
"auto_install": False, | ||
"installable": 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,4 @@ | ||
`1.0.0` | ||
------- | ||
|
||
- Init version |
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,35 @@ | ||
================================ | ||
Hidden Layouts for Sale Orders | ||
================================ | ||
|
||
Installation | ||
============ | ||
|
||
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
* Open ``Sales >> Settings`` menu | ||
* Switch **Sales Reports Layout** to *Personalize the sales orders and invoice report with categories, subtotals and page-breaks* | ||
* Click ``[Apply]`` | ||
|
||
Usage | ||
===== | ||
|
||
* Open ``Sales >> Sale Orders`` menu | ||
* Click ``[Create]`` | ||
* Add a product to sale order line | ||
* Create new section in ``Section`` field | ||
RESULT: the section created is available (selectable) for this SO only | ||
|
||
Global Section | ||
-------------- | ||
|
||
At any time you are able to set a section as global at ``Sales >> Configuration >> Report Layout Categories`` menu. It means that the section will be available for all SO created. | ||
|
||
Note | ||
---- | ||
|
||
Once you create new sale order, you need to save it after creating new layout (Section), otherwise layout will not be displayed on other order lines. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
# coding: utf-8 | ||
# Copyright 2017 Artyom Losev | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
from odoo import models, fields, api | ||
|
||
|
||
class SaleLayoutCategory(models.Model): | ||
_inherit = 'sale.layout_category' | ||
|
||
sale_order_id = fields.Many2one('sale.order') | ||
is_global = fields.Boolean(default=False, string='Global') | ||
|
||
|
||
class SaleOrderLine(models.Model): | ||
_inherit = 'sale.order.line' | ||
|
||
@api.model | ||
def create(self, vals): | ||
record = super(SaleOrderLine, self).create(vals) | ||
if record.layout_category_id and not record.layout_category_id.sale_order_id: | ||
record.layout_category_id.sale_order_id = record.order_id | ||
return record |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.