Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions account_invoice_margin/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

======================
Account Invoice Margin
======================
Expand All @@ -13,7 +17,7 @@ Account Invoice Margin
.. |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
.. |badge2| image:: https://img.shields.io/badge/license-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
Expand All @@ -35,14 +39,10 @@ The new information is available:
* on the invoice form view

.. figure:: https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_form.png
:scale: 80 %
:alt: Invoice Tree View

* and on the invoice tree view

.. figure:: https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_tree.png
:scale: 80 %
:alt: Invoice Tree View

**Table of contents**

Expand Down
4 changes: 0 additions & 4 deletions account_invoice_margin/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ The new information is available:
* on the invoice form view

.. figure:: ../static/description/account_invoice_form.png
:scale: 80 %
:alt: Invoice Tree View

* and on the invoice tree view

.. figure:: ../static/description/account_invoice_tree.png
:scale: 80 %
:alt: Invoice Tree View
42 changes: 25 additions & 17 deletions account_invoice_margin/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Account Invoice Margin</title>
<title>README.rst</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
: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 @@ -275,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 @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

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

span.section-subtitle {
Expand Down Expand Up @@ -360,29 +360,34 @@
</style>
</head>
<body>
<div class="document" id="account-invoice-margin">
<h1 class="title">Account Invoice Margin</h1>
<div class="document">


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="account-invoice-margin">
<h1>Account Invoice Margin</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:63c59a6f13b1dfbd9554ce86e1fc68e4c2d638bcfaa2397408e584866a8933dc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/account_invoice_margin"><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-account_invoice_margin"><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><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/margin-analysis/tree/16.0/account_invoice_margin"><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-account_invoice_margin"><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>This module allows to show sales margin in invoices.</p>
<p>The new information is available:</p>
<ul class="simple">
<li>on the invoice form view</li>
</ul>
<div class="figure">
<img alt="Invoice Tree View" src="https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_form.png" />
<img alt="https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_form.png" src="https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_form.png" />
</div>
<ul class="simple">
<li>and on the invoice tree view</li>
</ul>
<div class="figure">
<img alt="Invoice Tree View" src="https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_tree.png" />
<img alt="https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_tree.png" src="https://raw.githubusercontent.com/OCA/margin-analysis/16.0/account_invoice_margin/static/description/account_invoice_tree.png" />
</div>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -398,32 +403,32 @@ <h1 class="title">Account Invoice Margin</h1>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<p>This module also adds a security group.</p>
<ol class="arabic simple">
<li>To activate it go to user and active “Show Invoice Margin” in
security options.</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/margin-analysis/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/margin-analysis/issues/new?body=module:%20account_invoice_margin%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<ul class="simple">
<li>Tecnativa</li>
<li>GRAP</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Sergio Teruel</li>
Expand All @@ -448,9 +453,11 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
<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 All @@ -461,5 +468,6 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
</div>
</div>
</div>
</div>
</body>
</html>
13 changes: 8 additions & 5 deletions account_invoice_margin/views/account_invoice_margin_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
name="purchase_price"
optional="show"
groups="account_invoice_margin.group_account_invoice_margin_security"
attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"
/>
<field
name="margin"
optional="show"
optional="hide"
groups="account_invoice_margin.group_account_invoice_margin_security"
attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"
/>
<field
name="margin_percent"
optional="show"
optional="hide"
groups="account_invoice_margin.group_account_invoice_margin_security"
attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"
/>
</xpath>
<!-- Add fields to embed invoice line form view -->
Expand Down Expand Up @@ -59,18 +62,18 @@
</record>
<record id="view_account_invoice_tree" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree" />
<field name="inherit_id" ref="account.view_out_invoice_tree" />
<field name="arch" type="xml">
<field name="amount_untaxed_signed" position="before">
<field
name="margin_signed"
sum="Total"
optional="show"
optional="hide"
groups="account_invoice_margin.group_account_invoice_margin_security"
/>
<field
name="margin_percent"
optional="show"
optional="hide"
groups="account_invoice_margin.group_account_invoice_margin_security"
/>
</field>
Expand Down
Loading