Skip to content
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

[17.0][MIG] sale_margin_security: Migration to 17.0 #217

Open
wants to merge 35 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1717cd0
[ADD] sale_margin_security: New module (#37)
chienandalu Jul 11, 2018
13b96bd
[MIG] sale_margin_security: Migration to v12.0
sergio-teruel Nov 6, 2019
d2ae33d
[IMP] sale_margin_security: black, isort
sergio-teruel Feb 24, 2020
670c2c0
[MIG] sale_margin_security: Migration to v13.0
sergio-teruel Feb 24, 2020
9c94a52
[FIX] sale_margin_security: onchange product
chienandalu Jun 1, 2020
d651671
Added translation using Weblate (Spanish)
HaraldPanten Dec 16, 2020
ef1f542
Translated using Weblate (Spanish)
HaraldPanten Dec 16, 2020
bdcc5e9
[IMP] : black, isort, prettier
rafamarpe Oct 23, 2022
ee9a4f4
[MIG] sale_margin_security: Migration to 14.0
rafamarpe Oct 23, 2022
67f1f2b
[MIG] sale_margin_security: Migration to 15.0
CarlosRoca13 Nov 7, 2022
c9091c0
[UPD] Update sale_margin_security.pot
Nov 7, 2022
b5ace8e
[UPD] README.rst
OCA-git-bot Nov 7, 2022
26475bc
Update translation files
weblate Nov 7, 2022
da21c1f
[IMP] sale_margin_security: pre-commit stuff
Jun 5, 2023
d29264c
[MIG] sale_margin_securtiy: Migration to 16.0
Jun 5, 2023
17901cc
[UPD] Update sale_margin_security.pot
Jun 10, 2023
cc7fc92
[UPD] README.rst
OCA-git-bot Jun 10, 2023
ebd0167
Translated using Weblate (Spanish)
Ivorra78 Aug 21, 2023
9e48229
[UPD] README.rst
OCA-git-bot Sep 3, 2023
3ebe2ef
[IMP] sale_margin_security: Avoid display margin in measures pivot view.
carlosdauden Nov 21, 2023
e4abe95
[UPD] Update sale_margin_security.pot
Dec 22, 2023
54f13b7
[BOT] post-merge updates
OCA-git-bot Dec 22, 2023
9ab831e
Update translation files
weblate Dec 22, 2023
f414d75
Translated using Weblate (Spanish)
Ivorra78 Dec 29, 2023
de87991
Translated using Weblate (Spanish)
Ivorra78 Dec 29, 2023
a17cede
Added translation using Weblate (Italian)
mymage Feb 1, 2024
42ceca5
Translated using Weblate (Italian)
mymage Feb 1, 2024
1de2b83
[IMP] sale_margin_security: depend on product_cost_security
yajo Mar 8, 2024
1239bb9
[UPD] Update sale_margin_security.pot
Apr 6, 2024
2862b4b
[BOT] post-merge updates
OCA-git-bot Apr 6, 2024
4fd45cf
Update translation files
weblate Apr 6, 2024
34b2cc0
Translated using Weblate (Italian)
mymage Apr 8, 2024
e64ea9e
[IMP] sale_margin_security: pre-commit execution
jdidderen-nsi Jul 12, 2024
1badb87
[MIG] sale_margin_security: Migration to 17.0
jdidderen-nsi Jul 12, 2024
1a7b6aa
[DON'T MERGE] test-requirements.txt
jdidderen-nsi Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions account_invoice_margin/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -449,7 +450,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
11 changes: 7 additions & 4 deletions account_invoice_margin_sale/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -441,7 +442,9 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
127 changes: 127 additions & 0 deletions sale_margin_security/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
====================
Sale Margin Security
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a15d1a444994eb36fb8d980a0eb9ec6469281babfadba838c18668d89b77de83
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fmargin--analysis-lightgray.png?logo=github
:target: https://github.com/OCA/margin-analysis/tree/17.0/sale_margin_security
:alt: OCA/margin-analysis
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/margin-analysis-17-0/margin-analysis-17-0-sale_margin_security
: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/margin-analysis&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module lets you limit who can see or edit sale margin data within
sale orders.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

This module was developed because in some companies, salespersons
shouldn't be able to see the product cost or their sale margin.

Installation
============

This module will be auto-installed if these others are installed too:

- ``product_cost_security`` from
`OCA/product-attribute <https://github.com/OCA/product-attribute>`__.
- ``sale_margin`` from Odoo CE.

Configuration
=============

Follow configuration instructions for module ``product_cost_security``.

Usage
=====

Afterwards configuring, the product cost security rules will be applied
to sale orders. Only authorized users will be able to see or edit sale
margin and product cost data from within sale orders.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/margin-analysis/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/margin-analysis/issues/new?body=module:%20sale_margin_security%0Aversion:%2017.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>`__

- Sergio Teruel
- David Vidal
- Carlos Roca

- `Moduon <https://www.moduon.team>`__

- Rafael Blasco
- Jairo Llopis

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-sergio-teruel| image:: https://github.com/sergio-teruel.png?size=40px
:target: https://github.com/sergio-teruel
:alt: sergio-teruel
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
:target: https://github.com/rafaelbn
:alt: rafaelbn
.. |maintainer-yajo| image:: https://github.com/yajo.png?size=40px
:target: https://github.com/yajo
:alt: yajo

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sergio-teruel| |maintainer-rafaelbn| |maintainer-yajo|

This module is part of the `OCA/margin-analysis <https://github.com/OCA/margin-analysis/tree/17.0/sale_margin_security>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions sale_margin_security/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import report
17 changes: 17 additions & 0 deletions sale_margin_security/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Margin Security",
"version": "17.0.1.0.0",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/margin-analysis",
"category": "Sales",
"license": "AGPL-3",
"development_status": "Production/Stable",
"maintainers": ["sergio-teruel", "rafaelbn", "yajo"],
"depends": ["sale_margin", "product_cost_security"],
"data": [
"views/sale_margin_security_view.xml",
],
"auto_install": True,
}
60 changes: 60 additions & 0 deletions sale_margin_security/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_margin_security
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-29 12:35+0000\n"
"Last-Translator: Ivorra78 <[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.17\n"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__purchase_price
msgid "Cost"
msgstr "Coste"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order__margin
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__margin
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_report__margin
msgid "Margin"
msgstr "Margen"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order__margin_percent
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__margin_percent
msgid "Margin (%)"
msgstr "Margen (%)"

#. module: sale_margin_security
#: model:ir.model,name:sale_margin_security.model_sale_report
msgid "Sales Analysis Report"
msgstr "Informe de análisis de ventas"

#. module: sale_margin_security
#: model:ir.model,name:sale_margin_security.model_sale_order
msgid "Sales Order"
msgstr "Orden de Venta"

#. module: sale_margin_security
#: model:ir.model,name:sale_margin_security.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de pedido de venta"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order__user_can_update_cost
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__user_can_update_cost
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_report__user_can_update_cost
msgid "User Can Update Cost"
msgstr ""

#~ msgid "Show Sale Margin"
#~ msgstr "Mostrar Margen de Venta"
60 changes: 60 additions & 0 deletions sale_margin_security/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_margin_security
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-04-08 08:37+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_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__purchase_price
msgid "Cost"
msgstr "Costo"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order__margin
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__margin
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_report__margin
msgid "Margin"
msgstr "Margine"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order__margin_percent
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__margin_percent
msgid "Margin (%)"
msgstr "Margine (%)"

#. module: sale_margin_security
#: model:ir.model,name:sale_margin_security.model_sale_report
msgid "Sales Analysis Report"
msgstr "Resoconto analisi vendite"

#. module: sale_margin_security
#: model:ir.model,name:sale_margin_security.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#. module: sale_margin_security
#: model:ir.model,name:sale_margin_security.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"

#. module: sale_margin_security
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order__user_can_update_cost
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_order_line__user_can_update_cost
#: model:ir.model.fields,field_description:sale_margin_security.field_sale_report__user_can_update_cost
msgid "User Can Update Cost"
msgstr "L'utente può aggiornare il costo"

#~ msgid "Show Sale Margin"
#~ msgstr "Visualizza margine vendita"
Loading
Loading