Skip to content

Commit

Permalink
[IMP] sale_margin_delivered_security: combine with product_cost_security
Browse files Browse the repository at this point in the history
Following OCA/product-attribute#1538, the security is now done via mixin and the view can be removed.

@moduon MT-5158
  • Loading branch information
yajo committed Mar 13, 2024
1 parent b0552a5 commit cc510a8
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 30 deletions.
2 changes: 1 addition & 1 deletion sale_margin_delivered_security/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Sale Margin Delivered - Sale Margin Security
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:776fdc7ba6f0b52c2bb9229c972b8a5ff2dc59b45c29d69b48d2d7fcd8777579
!! source digest: sha256:8029d7d5d31f441fdca5507186a66e9e0acc5a1acab710c0932f44613fcf51f1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
1 change: 1 addition & 0 deletions sale_margin_delivered_security/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
3 changes: 1 addition & 2 deletions sale_margin_delivered_security/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
"name": "Sale Margin Delivered - Sale Margin Security",
"summary": "Glue module between sale margin delivered"
" and sale margin security modules",
"version": "16.0.1.0.0",
"version": "16.0.1.1.0",
"author": "Tecnativa, GRAP, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/margin-analysis",
"category": "Sales",
"license": "AGPL-3",
"depends": ["sale_margin_delivered", "sale_margin_security"],
"data": ["views/sale_margin_delivered_view.xml"],
"auto_install": True,
"maintainers": ["sergio-teruel"],
}
1 change: 1 addition & 0 deletions sale_margin_delivered_security/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
17 changes: 17 additions & 0 deletions sale_margin_delivered_security/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 Moduon Team S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
from odoo import fields, models


class SaleOrder(models.Model):
_name = "sale.order"
_inherit = ["sale.order", "product.cost.security.mixin"]

# Inherited fields
purchase_price_delivery = fields.Float(
groups="product_cost_security.group_product_cost"
)
margin_delivered_percent = fields.Float(
groups="product_cost_security.group_product_cost"
)
margin_delivered = fields.Float(groups="product_cost_security.group_product_cost")
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Sale Margin Delivered - Sale Margin Security</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:776fdc7ba6f0b52c2bb9229c972b8a5ff2dc59b45c29d69b48d2d7fcd8777579
!! source digest: sha256:8029d7d5d31f441fdca5507186a66e9e0acc5a1acab710c0932f44613fcf51f1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/margin-analysis/tree/16.0/sale_margin_delivered_security"><img alt="OCA/margin-analysis" src="https://img.shields.io/badge/github-OCA%2Fmargin--analysis-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_delivered_security"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/margin-analysis&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Glue auto installable module between ‘Sale Margin Delivered’
Expand Down

This file was deleted.

0 comments on commit cc510a8

Please sign in to comment.