Skip to content

Commit

Permalink
[IMP] sale_invoice_policy: Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
rousseldenis committed Oct 25, 2024
1 parent f8ec895 commit dd6f488
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 31 deletions.
46 changes: 41 additions & 5 deletions sale_invoice_policy/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,57 @@ Sale invoice Policy

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

This modules helps to get Invoicing Policy on Sale Order Level without
breaking behaviour (as it is defined from >= v10 on product level).
This module adds an invoicing policy on sale order level in order to
apply that invoicing policy on the whole sale order.

That invoicing policy can take three values:

- Products Invoicing Policy: The sale order will follow the standard
behavior and apply the policy depending on products configurations.
- Ordered Quantities: The sale order will invoice the ordered quantities.
- Delivered Quantities: The sale order will invoice the delivered quantities.

Following the chosen policy, the quantity to invoice and the
amount to invoice on each line will be computed accordingly.

You will be able also to define a default invoicing policy
(globally per company)
that can be different than the default invoicing policy for new products.

**Table of contents**

.. contents::
:local:

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

In Odoo, products have their own invoicing policy that can be:

- Invoicing on ordered quantities
- Invoicing on ordered quantities

Following that configuration, when trying to create invoices from
sale orders, each line of product will apply its invoicing policy.

In some cases, user needs to apply an invoicing policy on a whole
sale order.

The solution proposed here is to add an invoicing policy on
sale order level.

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

* Go to Sale > Configuration > Settings > Sale Invoice Policy
* Choose the one that fits your needs.

Usage
=====

* Create Sale Order
* Select Invoicing Policy on Sale Order or let it void
* Either the policy selected on Sale Order would be used, either if not
filled in, the policy would be chosen from product configuration
* Select Invoicing Policy on Sale Order or let it on Products Invoicing Policy
* The created invoices will use the configuration on sale order.

Bug Tracker
===========
Expand Down
2 changes: 2 additions & 0 deletions sale_invoice_policy/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Go to Sale > Configuration > Settings > Sale Invoice Policy
* Choose the one that fits your needs.
13 changes: 13 additions & 0 deletions sale_invoice_policy/readme/CONTEXT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
In Odoo, products have their own invoicing policy that can be:

- Invoicing on ordered quantities
- Invoicing on ordered quantities

Following that configuration, when trying to create invoices from
sale orders, each line of product will apply its invoicing policy.

In some cases, user needs to apply an invoicing policy on a whole
sale order.

The solution proposed here is to add an invoicing policy on
sale order level.
18 changes: 16 additions & 2 deletions sale_invoice_policy/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
This modules helps to get Invoicing Policy on Sale Order Level without
breaking behaviour (as it is defined from >= v10 on product level).
This module adds an invoicing policy on sale order level in order to
apply that invoicing policy on the whole sale order.

That invoicing policy can take three values:

- Products Invoicing Policy: The sale order will follow the standard
behavior and apply the policy depending on products configurations.
- Ordered Quantities: The sale order will invoice the ordered quantities.
- Delivered Quantities: The sale order will invoice the delivered quantities.

Following the chosen policy, the quantity to invoice and the
amount to invoice on each line will be computed accordingly.

You will be able also to define a default invoicing policy
(globally per company)
that can be different than the default invoicing policy for new products.
5 changes: 2 additions & 3 deletions sale_invoice_policy/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
* Create Sale Order
* Select Invoicing Policy on Sale Order or let it void
* Either the policy selected on Sale Order would be used, either if not
filled in, the policy would be chosen from product configuration
* Select Invoicing Policy on Sale Order or let it on Products Invoicing Policy
* The created invoices will use the configuration on sale order.
68 changes: 51 additions & 17 deletions sale_invoice_policy/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,48 +370,82 @@ <h1 class="title">Sale invoice Policy</h1>
!! source digest: sha256:c97ec053f6a06fcb824861d16be9e31cc8a53549f47a0f38b6f54f534d09138b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/sale-workflow/tree/16.0/sale_invoice_policy"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_invoice_policy"><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/sale-workflow&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 modules helps to get Invoicing Policy on Sale Order Level without
breaking behaviour (as it is defined from &gt;= v10 on product level).</p>
<p>This module adds an invoicing policy on sale order level in order to
apply that invoicing policy on the whole sale order.</p>
<p>That invoicing policy can take three values:</p>
<ul class="simple">
<li>Products Invoicing Policy: The sale order will follow the standard
behavior and apply the policy depending on products configurations.</li>
<li>Ordered Quantities: The sale order will invoice the ordered quantities.</li>
<li>Delivered Quantities: The sale order will invoice the delivered quantities.</li>
</ul>
<p>Following the chosen policy, the quantity to invoice and the
amount to invoice on each line will be computed accordingly.</p>
<p>You will be able also to define a default invoicing policy
(globally per company)
that can be different than the default invoicing policy for new products.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="use-cases-context">
<h1><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h1>
<p>In Odoo, products have their own invoicing policy that can be:</p>
<ul class="simple">
<li>Invoicing on ordered quantities</li>
<li>Invoicing on ordered quantities</li>
</ul>
<p>Following that configuration, when trying to create invoices from
sale orders, each line of product will apply its invoicing policy.</p>
<p>In some cases, user needs to apply an invoicing policy on a whole
sale order.</p>
<p>The solution proposed here is to add an invoicing policy on
sale order level.</p>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<ul class="simple">
<li>Go to Sale &gt; Configuration &gt; Settings &gt; Sale Invoice Policy</li>
<li>Choose the one that fits your needs.</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
<ul class="simple">
<li>Create Sale Order</li>
<li>Select Invoicing Policy on Sale Order or let it void</li>
<li>Either the policy selected on Sale Order would be used, either if not
filled in, the policy would be chosen from product configuration</li>
<li>Select Invoicing Policy on Sale Order or let it on Products Invoicing Policy</li>
<li>The created invoices will use the configuration on sale order.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_invoice_policy%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>
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>ACSONE SA/NV</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Cédric Pigeon &lt;<a class="reference external" href="mailto:cedric.pigeon&#64;acsone.eu">cedric.pigeon&#64;acsone.eu</a>&gt;</li>
<li>François Honoré &lt;<a class="reference external" href="mailto:francois.honore&#64;acsone.eu">francois.honore&#64;acsone.eu</a>&gt;</li>
Expand All @@ -424,7 +458,7 @@ <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>
<h2><a class="toc-backref" href="#toc-entry-8">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" />
Expand Down
10 changes: 6 additions & 4 deletions sale_invoice_policy/views/res_config_settings_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
class="col-12 col-lg-6 o_setting_box"
id="sale_invoice_policy_setting"
>
<div class="o_setting_left_pane">
<field name="sale_default_invoice_policy" />
</div>
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<label
string="Sale Invoice Policy"
for="sale_default_invoice_policy"
/>
<div class="text-muted" id="sale_default_invoice_policy">
Default Invoice Policy in Sale Orders
<div class="text-muted">
<field name="sale_default_invoice_policy" />
<p><span
>Choose the default policy that will be applied for new sale orders (the 'Invoicing Policy' configuration is the policy for new products).</span></p>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit dd6f488

Please sign in to comment.