Skip to content

Commit

Permalink
Merge pull request #1 from OCA/13.0
Browse files Browse the repository at this point in the history
13.0
  • Loading branch information
mrgoetz authored Mar 16, 2022
2 parents 2d829a0 + 467fea7 commit 7fa1d41
Show file tree
Hide file tree
Showing 367 changed files with 30,589 additions and 158 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,36 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[account_billing](account_billing/) | 13.0.1.0.4 | [![Saran440](https://github.com/Saran440.png?size=30px)](https://github.com/Saran440) | Group invoice as billing before payment
[account_global_discount](account_global_discount/) | 13.0.2.0.1 | | Account Global Discount
[account_invoice_alternate_payer](account_invoice_alternate_payer/) | 13.0.1.0.0 | | Set a alternate payor/payee in invoices
[account_invoice_base_invoicing_mode](account_invoice_base_invoicing_mode/) | 13.0.1.0.1 | | Base module for handling multiple invoicing mode
[account_invoice_blocking](account_invoice_blocking/) | 13.0.1.0.0 | | Set a blocking (No Follow-up) flag on invoices
[account_invoice_check_picking_date](account_invoice_check_picking_date/) | 13.0.1.0.0 | [![carlosdauden](https://github.com/carlosdauden.png?size=30px)](https://github.com/carlosdauden) | Check if date of pickings match with invoice date
[account_invoice_check_total](account_invoice_check_total/) | 13.0.1.0.1 | | Check if the verification total is equal to the bill's total
[account_invoice_date_due](account_invoice_date_due/) | 13.0.1.0.1 | [![luisg123v](https://github.com/luisg123v.png?size=30px)](https://github.com/luisg123v) [![joao-p-marques](https://github.com/joao-p-marques.png?size=30px)](https://github.com/joao-p-marques) | Update Invoice's Due Date
[account_invoice_fiscal_position_update](account_invoice_fiscal_position_update/) | 13.0.1.0.4 | | Changing the fiscal position of an invoice will auto-update invoice lines
[account_invoice_fixed_discount](account_invoice_fixed_discount/) | 13.0.1.0.2 | | Allows to apply fixed amount discounts in invoices.
[account_invoice_force_number](account_invoice_force_number/) | 13.0.1.0.0 | | Allows to force invoice numbering on specific invoices
[account_invoice_line_description](account_invoice_line_description/) | 13.0.1.0.0 | | Account invoice line description
[account_invoice_mode_at_shipping](account_invoice_mode_at_shipping/) | 13.0.1.0.1 | | Create invoices automatically when goods are shipped.
[account_invoice_mode_monthly](account_invoice_mode_monthly/) | 13.0.1.0.1 | | Create invoices automatically on a monthly basis.
[account_invoice_pricelist](account_invoice_pricelist/) | 13.0.1.0.4 | | Add partner pricelist on invoices
[account_invoice_pricelist_sale](account_invoice_pricelist_sale/) | 13.0.1.0.1 | | Module to fill pricelist from sales order in invoice.
[account_invoice_refund_line_selection](account_invoice_refund_line_selection/) | 13.0.1.0.1 | | This module allows the user to refund specific lines in a invoice
[account_invoice_refund_link](account_invoice_refund_link/) | 13.0.1.1.0 | | Show links between refunds and their originator invoices
[account_invoice_refund_line_selection](account_invoice_refund_line_selection/) | 13.0.1.0.2 | | This module allows the user to refund specific lines in a invoice
[account_invoice_refund_link](account_invoice_refund_link/) | 13.0.1.1.1 | | Show links between refunds and their originator invoices
[account_invoice_refund_reinvoice](account_invoice_refund_reinvoice/) | 13.0.1.0.0 | | Allow to Reinvoice a Refund
[account_invoice_search_by_reference](account_invoice_search_by_reference/) | 13.0.1.0.0 | | Account invoice search by reference
[account_invoice_section_sale_order](account_invoice_section_sale_order/) | 13.0.1.1.0 | | For invoices targetting multiple sale order addsections with sale order name.
[account_invoice_show_currency_rate](account_invoice_show_currency_rate/) | 13.0.1.0.1 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Show currency rate in invoices.
[account_invoice_show_currency_rate](account_invoice_show_currency_rate/) | 13.0.1.0.2 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Show currency rate in invoices.
[account_invoice_supplier_ref_reuse](account_invoice_supplier_ref_reuse/) | 13.0.1.0.0 | | Makes it possible to reuse supplier invoice references
[account_invoice_supplier_ref_unique](account_invoice_supplier_ref_unique/) | 13.0.1.0.3 | | Checks that supplier invoices are not entered twice
[account_invoice_supplier_self_invoice](account_invoice_supplier_self_invoice/) | 13.0.1.1.1 | | Purchase Self Invoice
[account_invoice_supplierinfo_update](account_invoice_supplierinfo_update/) | 13.0.1.0.0 | | In the supplier invoice, automatically updates all products whose unit price on the line is different from the supplier price
[account_invoice_supplierinfo_update_discount](account_invoice_supplierinfo_update_discount/) | 13.0.1.0.0 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | In the supplier invoice, automatically update all products whose discount on the line is different from the supplier discount
[account_invoice_tax_note](account_invoice_tax_note/) | 13.0.1.0.0 | | Print tax notes on customer invoices
[account_invoice_tax_required](account_invoice_tax_required/) | 13.0.1.0.2 | | This module adds functional a check on invoice to force user to set tax on invoice line.
[account_invoice_transmit_method](account_invoice_transmit_method/) | 13.0.1.1.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Configure invoice transmit method (email, post, portal, ...)
[account_invoice_tree_currency](account_invoice_tree_currency/) | 13.0.1.0.0 | | Show currencies in the invoice tree view
[account_invoice_triple_discount](account_invoice_triple_discount/) | 13.0.1.0.0 | | Manage triple discount on invoice lines
[account_invoice_validation_queued](account_invoice_validation_queued/) | 13.0.2.0.0 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Enqueue account invoice validation
[account_invoice_warn_message](account_invoice_warn_message/) | 13.0.1.0.1 | | Add a popup warning on invoice to ensure warning is populated
[account_menu_invoice_refund](account_menu_invoice_refund/) | 13.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | New invoice menu that combine invoices and refunds
Expand All @@ -55,12 +61,13 @@ addon | version | maintainers | summary
[account_tax_group_widget_base_amount](account_tax_group_widget_base_amount/) | 13.0.1.0.0 | [![chienandalu](https://github.com/chienandalu.png?size=30px)](https://github.com/chienandalu) | Adds base to tax group widget as it's put in the report
[product_supplierinfo_for_customer_invoice](product_supplierinfo_for_customer_invoice/) | 13.0.1.0.0 | | Based on product_customer_code, this module loads in every account invoice the customer code defined in the product
[purchase_batch_invoicing](purchase_batch_invoicing/) | 13.0.1.1.0 | | Make invoices for all ready purchase orders
[purchase_invoicing_no_zero_line](purchase_invoicing_no_zero_line/) | 13.0.1.0.0 | | Avoid creation of zero quantity invoice lines from purchase
[purchase_stock_picking_return_invoicing](purchase_stock_picking_return_invoicing/) | 13.0.1.2.1 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) [![MiquelRForgeFlow](https://github.com/MiquelRForgeFlow.png?size=30px)](https://github.com/MiquelRForgeFlow) | Add an option to refund returned pickings
[sale_line_refund_to_invoice_qty](sale_line_refund_to_invoice_qty/) | 13.0.1.2.0 | | Allow deciding whether refunded quantity should be considered as quantity to reinvoice
[sale_order_invoicing_grouping_criteria](sale_order_invoicing_grouping_criteria/) | 13.0.2.0.2 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Sales order invoicing grouping criteria
[sale_order_invoicing_queued](sale_order_invoicing_queued/) | 13.0.2.0.1 | | Enqueue sales order invoicing
[sale_timesheet_invoice_description](sale_timesheet_invoice_description/) | 13.0.1.0.0 | | Add timesheet details in invoice line
[stock_picking_invoicing](stock_picking_invoicing/) | 13.0.3.1.0 | | Stock Picking Invoicing
[stock_picking_invoicing](stock_picking_invoicing/) | 13.0.3.1.1 | | Stock Picking Invoicing
[stock_picking_return_refund_option](stock_picking_return_refund_option/) | 13.0.1.0.0 | [![sergio-teruel](https://github.com/sergio-teruel.png?size=30px)](https://github.com/sergio-teruel) | Update the refund options in pickings

[//]: # (end addons)
Expand Down
1 change: 1 addition & 0 deletions account_global_discount/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import models
from . import report
5 changes: 5 additions & 0 deletions account_global_discount/i18n/account_global_discount.pot
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ msgstr ""
msgid "Invoice Global Discounts (readonly)"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_invoice_report
msgid "Invoices Statistics"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_move
msgid "Journal Entries"
Expand Down
5 changes: 5 additions & 0 deletions account_global_discount/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ msgstr "Descuentos Globales en Factura"
msgid "Invoice Global Discounts (readonly)"
msgstr "Descuentos globales en factura (solo lectura)"

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_invoice_report
msgid "Invoices Statistics"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_move
msgid "Journal Entries"
Expand Down
5 changes: 5 additions & 0 deletions account_global_discount/i18n/nl_NL.po
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ msgstr "Factuur algemene kortingen"
msgid "Invoice Global Discounts (readonly)"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_invoice_report
msgid "Invoices Statistics"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_move
msgid "Journal Entries"
Expand Down
5 changes: 5 additions & 0 deletions account_global_discount/i18n/pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ msgstr "Descontos Globais de Fatura"
msgid "Invoice Global Discounts (readonly)"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_invoice_report
msgid "Invoices Statistics"
msgstr ""

#. module: account_global_discount
#: model:ir.model,name:account_global_discount.model_account_move
msgid "Journal Entries"
Expand Down
15 changes: 12 additions & 3 deletions account_global_discount/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ class AccountMove(models.Model):
currency_field="currency_id",
readonly=True,
compute_sudo=True,
store=True,
)
amount_untaxed_before_global_discounts = fields.Monetary(
string="Amount Untaxed Before Discounts",
compute="_compute_amount",
currency_field="currency_id",
readonly=True,
compute_sudo=True,
store=True,
)
invoice_global_discount_ids = fields.One2many(
comodel_name="account.invoice.global.discount",
Expand Down Expand Up @@ -185,10 +187,13 @@ def _recompute_global_discount_lines(self):
% (discount.name, ", ".join(discount.tax_ids.mapped("name"))),
"debit": disc_amount > 0.0 and disc_amount or 0.0,
"credit": disc_amount < 0.0 and -disc_amount or 0.0,
"amount_currency": (disc_amount > 0.0 and disc_amount or 0.0)
- (disc_amount < 0.0 and -disc_amount or 0.0),
"account_id": discount.account_id.id,
"analytic_account_id": discount.account_analytic_id.id,
"exclude_from_invoice_tab": True,
"tax_ids": [(4, x.id) for x in discount.tax_ids],
"partner_id": self.commercial_partner_id.id,
}
)

Expand All @@ -200,12 +205,16 @@ def _onchange_partner_id(self):
self.type in ["out_invoice", "out_refund"]
and self.partner_id.customer_global_discount_ids
):
discounts = self.partner_id.customer_global_discount_ids
discounts = self.partner_id.customer_global_discount_ids.filtered(
lambda d: d.company_id == self.company_id
)
elif (
self.type in ["in_refund", "in_invoice"]
and self.partner_id.supplier_global_discount_ids
):
discounts = self.partner_id.supplier_global_discount_ids
discounts = self.partner_id.supplier_global_discount_ids.filtered(
lambda d: d.company_id == self.company_id
)
if discounts:
self.global_discount_ids = discounts
# We need to manually launch the onchange, as the recursivity is explicitly
Expand Down Expand Up @@ -248,7 +257,7 @@ def _compute_amount_one(self):
amount_untaxed_signed = self.currency_id._convert(
self.amount_untaxed, self.company_id.currency_id, self.company_id, date
)
sign = self.type in ["in_refund", "out_refund"] and -1 or 1
sign = self.type in ["in_invoice", "out_refund"] and -1 or 1
self.amount_total_company_signed = amount_total_company_signed * sign
self.amount_total_signed = self.amount_total * sign
self.amount_untaxed_signed = amount_untaxed_signed * sign
Expand Down
6 changes: 5 additions & 1 deletion account_global_discount/models/global_discount.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@

class GlobalDiscount(models.Model):
_inherit = "global.discount"
_check_company_auto = True

account_id = fields.Many2one(
comodel_name="account.account",
string="Account",
domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]",
check_company=True,
)
account_analytic_id = fields.Many2one(
comodel_name="account.analytic.account", string="Analytic account",
comodel_name="account.analytic.account",
string="Analytic account",
check_company=True,
)

def _get_global_discount_vals(self, base, account_id=False, **kwargs):
Expand Down
1 change: 1 addition & 0 deletions account_global_discount/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_invoice_report
13 changes: 13 additions & 0 deletions account_global_discount/report/account_invoice_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import api, models


class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.report"

@api.model
def _where(self):
where_str = super()._where()
return where_str.replace(
"NOT line.exclude_from_invoice_tab",
"(NOT line.exclude_from_invoice_tab OR global_discount_item)",
)
12 changes: 10 additions & 2 deletions account_global_discount/views/global_discount_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
<field name="inherit_id" ref="base_global_discount.global_discount_view_tree" />
<field name="arch" type="xml">
<field name="company_id" position="before">
<field name="account_id" required="1" />
<field
name="account_id"
required="1"
domain="[('company_id', '=', company_id)]"
/>
<field
domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"
name="account_analytic_id"
groups="analytic.group_analytic_accounting"
/>
Expand All @@ -21,9 +25,13 @@
<field name="inherit_id" ref="base_global_discount.global_discount_view_form" />
<field name="arch" type="xml">
<field name="company_id" position="before">
<field name="account_id" required="1" />
<field
name="account_id"
required="1"
domain="[('company_id', '=', company_id)]"
/>
<field
domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"
name="account_analytic_id"
groups="analytic.group_analytic_accounting"
/>
Expand Down
83 changes: 83 additions & 0 deletions account_invoice_alternate_payer/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
===============================
Account Invoice Alternate Payer
===============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/13.0/account_invoice_alternate_payer
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_invoice_alternate_payer
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/95/13.0
:alt: Try me on Runbot

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

This module allows to enter an alternative payer in the
customer invoice or vendor bill.

This allows, that we pay or expect to get paid by another partner other
than the main partner.

**Table of contents**

.. contents::
:local:

Usage
=====

Access to the invoice and change the Alternate Payor/Payee of the invoice.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_alternate_payer%0Aversion:%2013.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
~~~~~~~

* Eficent

Contributors
~~~~~~~~~~~~

* Eficent Business and IT Consulting Services, S.L. (https://www.eficent.com)
* Jordi Ballester Alomar <[email protected]>

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.

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/13.0/account_invoice_alternate_payer>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_invoice_alternate_payer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions account_invoice_alternate_payer/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Invoice Alternate Payer",
"summary": "Set a alternate payor/payee in invoices",
"version": "13.0.1.0.0",
"license": "AGPL-3",
"category": "Accounting",
"author": "Eficent,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoicing/",
"depends": ["account"],
"data": ["views/account_move_views.xml"],
}
Loading

0 comments on commit 7fa1d41

Please sign in to comment.