odoo-addon-account-commission 16.0.2.2.0__py3-none-any.whl → 16.0.2.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/account_commission/README.rst +4 -2
- odoo/addons/account_commission/__manifest__.py +1 -1
- odoo/addons/account_commission/i18n/account_commission.pot +1 -1
- odoo/addons/account_commission/i18n/es.po +2 -2
- odoo/addons/account_commission/i18n/hr.po +8 -5
- odoo/addons/account_commission/i18n/it.po +11 -5
- odoo/addons/account_commission/i18n/ja.po +11 -5
- odoo/addons/account_commission/i18n/pt.po +11 -5
- odoo/addons/account_commission/i18n/pt_BR.po +11 -5
- odoo/addons/account_commission/models/commission.py +1 -1
- odoo/addons/account_commission/readme/CONFIGURE.rst +3 -1
- odoo/addons/account_commission/static/description/index.html +4 -2
- odoo/addons/account_commission/tests/test_account_commission.py +128 -1
- {odoo_addon_account_commission-16.0.2.2.0.dist-info → odoo_addon_account_commission-16.0.2.2.1.dist-info}/METADATA +5 -3
- {odoo_addon_account_commission-16.0.2.2.0.dist-info → odoo_addon_account_commission-16.0.2.2.1.dist-info}/RECORD +17 -17
- {odoo_addon_account_commission-16.0.2.2.0.dist-info → odoo_addon_account_commission-16.0.2.2.1.dist-info}/WHEEL +1 -1
- {odoo_addon_account_commission-16.0.2.2.0.dist-info → odoo_addon_account_commission-16.0.2.2.1.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Account commissions
|
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
8
|
!! changes will be overwritten. !!
|
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
10
|
+
!! source digest: sha256:77299b3b65fc7979bfd7818c3aed06a5912134599c1e0469f00ed5f220b2b5be
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -47,7 +47,9 @@ For selecting invoice status in commissions:
|
|
|
47
47
|
#. Edit or create a new record to select the invoice status for settling the commissions.
|
|
48
48
|
|
|
49
49
|
* **Invoice Based**: Commissions are settled when the invoice is issued.
|
|
50
|
-
* **Payment Based**: Commissions are settled when the invoice is paid.
|
|
50
|
+
* **Payment Based**: Commissions are settled when the invoice is paid or refunded.
|
|
51
|
+
Note that when refunding an invoice, the corresponding reversed commission will
|
|
52
|
+
be settled as well, resulting in a 0 net commission between both operations.
|
|
51
53
|
|
|
52
54
|
Usage
|
|
53
55
|
=====
|
|
@@ -439,7 +439,7 @@ msgstr ""
|
|
|
439
439
|
msgid ""
|
|
440
440
|
"Select the invoice status for settling the commissions:\n"
|
|
441
441
|
"* 'Invoice Based': Commissions are settled when the invoice is issued.\n"
|
|
442
|
-
"* 'Payment Based': Commissions are settled when the invoice is paid."
|
|
442
|
+
"* 'Payment Based': Commissions are settled when the invoice is paid (or refunded)."
|
|
443
443
|
msgstr ""
|
|
444
444
|
|
|
445
445
|
#. module: account_commission
|
|
@@ -445,8 +445,8 @@ msgid ""
|
|
|
445
445
|
"* 'Payment Based': Commissions are settled when the invoice is paid."
|
|
446
446
|
msgstr ""
|
|
447
447
|
"Seleccione el estado de la factura para liquidar las comisiones:\n"
|
|
448
|
-
"* 'Basado en factura': Las comisiones se liquidan cuando se emite la
|
|
449
|
-
"
|
|
448
|
+
"* 'Basado en factura': Las comisiones se liquidan cuando se emite la "
|
|
449
|
+
"factura.\n"
|
|
450
450
|
"* Pago\": Las comisiones se liquidan cuando se paga la factura."
|
|
451
451
|
|
|
452
452
|
#. module: account_commission
|
|
@@ -61,6 +61,7 @@ msgstr ""
|
|
|
61
61
|
|
|
62
62
|
#. module: account_commission
|
|
63
63
|
#: model:ir.model.fields,field_description:account_commission.field_invoice_commission_analysis_report__amount
|
|
64
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
64
65
|
msgid "Amount"
|
|
65
66
|
msgstr ""
|
|
66
67
|
|
|
@@ -174,6 +175,7 @@ msgid "Currency"
|
|
|
174
175
|
msgstr ""
|
|
175
176
|
|
|
176
177
|
#. module: account_commission
|
|
178
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
177
179
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
178
180
|
msgid "Customer"
|
|
179
181
|
msgstr ""
|
|
@@ -183,6 +185,11 @@ msgstr ""
|
|
|
183
185
|
msgid "Date"
|
|
184
186
|
msgstr ""
|
|
185
187
|
|
|
188
|
+
#. module: account_commission
|
|
189
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
190
|
+
msgid "Description"
|
|
191
|
+
msgstr ""
|
|
192
|
+
|
|
186
193
|
#. module: account_commission
|
|
187
194
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__display_name
|
|
188
195
|
#: model:ir.model.fields,field_description:account_commission.field_commission_make_invoice__display_name
|
|
@@ -239,6 +246,7 @@ msgstr ""
|
|
|
239
246
|
|
|
240
247
|
#. module: account_commission
|
|
241
248
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__invoice_id
|
|
249
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
242
250
|
msgid "Invoice"
|
|
243
251
|
msgstr ""
|
|
244
252
|
|
|
@@ -288,11 +296,6 @@ msgstr ""
|
|
|
288
296
|
msgid "Invoice exception"
|
|
289
297
|
msgstr ""
|
|
290
298
|
|
|
291
|
-
#. module: account_commission
|
|
292
|
-
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
293
|
-
msgid "Invoice line"
|
|
294
|
-
msgstr ""
|
|
295
|
-
|
|
296
299
|
#. module: account_commission
|
|
297
300
|
#: model:ir.model.fields.selection,name:account_commission.selection__commission_settlement__state__invoiced
|
|
298
301
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
@@ -64,6 +64,7 @@ msgstr "Agenti/provvigioni collegate alla riga fattura."
|
|
|
64
64
|
|
|
65
65
|
#. module: account_commission
|
|
66
66
|
#: model:ir.model.fields,field_description:account_commission.field_invoice_commission_analysis_report__amount
|
|
67
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
67
68
|
msgid "Amount"
|
|
68
69
|
msgstr "Importo"
|
|
69
70
|
|
|
@@ -179,6 +180,7 @@ msgid "Currency"
|
|
|
179
180
|
msgstr "Valuta"
|
|
180
181
|
|
|
181
182
|
#. module: account_commission
|
|
183
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
182
184
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
183
185
|
msgid "Customer"
|
|
184
186
|
msgstr "Cliente"
|
|
@@ -188,6 +190,11 @@ msgstr "Cliente"
|
|
|
188
190
|
msgid "Date"
|
|
189
191
|
msgstr "Data"
|
|
190
192
|
|
|
193
|
+
#. module: account_commission
|
|
194
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
195
|
+
msgid "Description"
|
|
196
|
+
msgstr ""
|
|
197
|
+
|
|
191
198
|
#. module: account_commission
|
|
192
199
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__display_name
|
|
193
200
|
#: model:ir.model.fields,field_description:account_commission.field_commission_make_invoice__display_name
|
|
@@ -246,6 +253,7 @@ msgstr "ID"
|
|
|
246
253
|
|
|
247
254
|
#. module: account_commission
|
|
248
255
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__invoice_id
|
|
256
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
249
257
|
msgid "Invoice"
|
|
250
258
|
msgstr "Fattura"
|
|
251
259
|
|
|
@@ -297,11 +305,6 @@ msgstr "Data fattura"
|
|
|
297
305
|
msgid "Invoice exception"
|
|
298
306
|
msgstr "Eccezione fattura"
|
|
299
307
|
|
|
300
|
-
#. module: account_commission
|
|
301
|
-
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
302
|
-
msgid "Invoice line"
|
|
303
|
-
msgstr "Riga fattura"
|
|
304
|
-
|
|
305
308
|
#. module: account_commission
|
|
306
309
|
#: model:ir.model.fields.selection,name:account_commission.selection__commission_settlement__state__invoiced
|
|
307
310
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
@@ -598,3 +601,6 @@ msgstr "Analisi fatture provvigioni"
|
|
|
598
601
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
599
602
|
msgid "invoices Commission Analysis"
|
|
600
603
|
msgstr "Analisi fatture provvigioni"
|
|
604
|
+
|
|
605
|
+
#~ msgid "Invoice line"
|
|
606
|
+
#~ msgstr "Riga fattura"
|
|
@@ -62,6 +62,7 @@ msgstr "請求書明細に関連するエージェント/コミッション。"
|
|
|
62
62
|
|
|
63
63
|
#. module: account_commission
|
|
64
64
|
#: model:ir.model.fields,field_description:account_commission.field_invoice_commission_analysis_report__amount
|
|
65
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
65
66
|
msgid "Amount"
|
|
66
67
|
msgstr "金額"
|
|
67
68
|
|
|
@@ -175,6 +176,7 @@ msgid "Currency"
|
|
|
175
176
|
msgstr "通貨"
|
|
176
177
|
|
|
177
178
|
#. module: account_commission
|
|
179
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
178
180
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
179
181
|
msgid "Customer"
|
|
180
182
|
msgstr "顧客"
|
|
@@ -184,6 +186,11 @@ msgstr "顧客"
|
|
|
184
186
|
msgid "Date"
|
|
185
187
|
msgstr "日付"
|
|
186
188
|
|
|
189
|
+
#. module: account_commission
|
|
190
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
191
|
+
msgid "Description"
|
|
192
|
+
msgstr ""
|
|
193
|
+
|
|
187
194
|
#. module: account_commission
|
|
188
195
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__display_name
|
|
189
196
|
#: model:ir.model.fields,field_description:account_commission.field_commission_make_invoice__display_name
|
|
@@ -240,6 +247,7 @@ msgstr "ID"
|
|
|
240
247
|
|
|
241
248
|
#. module: account_commission
|
|
242
249
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__invoice_id
|
|
250
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
243
251
|
msgid "Invoice"
|
|
244
252
|
msgstr "請求書"
|
|
245
253
|
|
|
@@ -289,11 +297,6 @@ msgstr "請求日"
|
|
|
289
297
|
msgid "Invoice exception"
|
|
290
298
|
msgstr "請求書例外"
|
|
291
299
|
|
|
292
|
-
#. module: account_commission
|
|
293
|
-
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
294
|
-
msgid "Invoice line"
|
|
295
|
-
msgstr "請求書明細"
|
|
296
|
-
|
|
297
300
|
#. module: account_commission
|
|
298
301
|
#: model:ir.model.fields.selection,name:account_commission.selection__commission_settlement__state__invoiced
|
|
299
302
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
@@ -586,5 +589,8 @@ msgstr "コミッション請求分析"
|
|
|
586
589
|
msgid "invoices Commission Analysis"
|
|
587
590
|
msgstr "コミッション請求分析"
|
|
588
591
|
|
|
592
|
+
#~ msgid "Invoice line"
|
|
593
|
+
#~ msgstr "請求書明細"
|
|
594
|
+
|
|
589
595
|
#~ msgid "The move of this entry line."
|
|
590
596
|
#~ msgstr "この明細の仕訳"
|
|
@@ -62,6 +62,7 @@ msgstr "Agentes/Comissões relacionados com a linha da fatura."
|
|
|
62
62
|
|
|
63
63
|
#. module: account_commission
|
|
64
64
|
#: model:ir.model.fields,field_description:account_commission.field_invoice_commission_analysis_report__amount
|
|
65
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
65
66
|
msgid "Amount"
|
|
66
67
|
msgstr "Montante"
|
|
67
68
|
|
|
@@ -175,6 +176,7 @@ msgid "Currency"
|
|
|
175
176
|
msgstr "Moeda"
|
|
176
177
|
|
|
177
178
|
#. module: account_commission
|
|
179
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
178
180
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
179
181
|
msgid "Customer"
|
|
180
182
|
msgstr "Cliente"
|
|
@@ -184,6 +186,11 @@ msgstr "Cliente"
|
|
|
184
186
|
msgid "Date"
|
|
185
187
|
msgstr "Data"
|
|
186
188
|
|
|
189
|
+
#. module: account_commission
|
|
190
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
191
|
+
msgid "Description"
|
|
192
|
+
msgstr ""
|
|
193
|
+
|
|
187
194
|
#. module: account_commission
|
|
188
195
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__display_name
|
|
189
196
|
#: model:ir.model.fields,field_description:account_commission.field_commission_make_invoice__display_name
|
|
@@ -240,6 +247,7 @@ msgstr "ID"
|
|
|
240
247
|
|
|
241
248
|
#. module: account_commission
|
|
242
249
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__invoice_id
|
|
250
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
243
251
|
msgid "Invoice"
|
|
244
252
|
msgstr "Fatura"
|
|
245
253
|
|
|
@@ -289,11 +297,6 @@ msgstr "Data da fatura"
|
|
|
289
297
|
msgid "Invoice exception"
|
|
290
298
|
msgstr "Exceção de Fatura"
|
|
291
299
|
|
|
292
|
-
#. module: account_commission
|
|
293
|
-
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
294
|
-
msgid "Invoice line"
|
|
295
|
-
msgstr "Linha de fatura"
|
|
296
|
-
|
|
297
300
|
#. module: account_commission
|
|
298
301
|
#: model:ir.model.fields.selection,name:account_commission.selection__commission_settlement__state__invoiced
|
|
299
302
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
@@ -588,3 +591,6 @@ msgstr "Análise de Comissões de fatura"
|
|
|
588
591
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
589
592
|
msgid "invoices Commission Analysis"
|
|
590
593
|
msgstr "Análise de Comissões de Faturas"
|
|
594
|
+
|
|
595
|
+
#~ msgid "Invoice line"
|
|
596
|
+
#~ msgstr "Linha de fatura"
|
|
@@ -62,6 +62,7 @@ msgstr "Representantes/Comissões relacionadas com a linha da fatura."
|
|
|
62
62
|
|
|
63
63
|
#. module: account_commission
|
|
64
64
|
#: model:ir.model.fields,field_description:account_commission.field_invoice_commission_analysis_report__amount
|
|
65
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
65
66
|
msgid "Amount"
|
|
66
67
|
msgstr "Total"
|
|
67
68
|
|
|
@@ -175,6 +176,7 @@ msgid "Currency"
|
|
|
175
176
|
msgstr "Moeda"
|
|
176
177
|
|
|
177
178
|
#. module: account_commission
|
|
179
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
178
180
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
179
181
|
msgid "Customer"
|
|
180
182
|
msgstr "Cliente"
|
|
@@ -184,6 +186,11 @@ msgstr "Cliente"
|
|
|
184
186
|
msgid "Date"
|
|
185
187
|
msgstr "Data"
|
|
186
188
|
|
|
189
|
+
#. module: account_commission
|
|
190
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
191
|
+
msgid "Description"
|
|
192
|
+
msgstr ""
|
|
193
|
+
|
|
187
194
|
#. module: account_commission
|
|
188
195
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__display_name
|
|
189
196
|
#: model:ir.model.fields,field_description:account_commission.field_commission_make_invoice__display_name
|
|
@@ -240,6 +247,7 @@ msgstr "ID"
|
|
|
240
247
|
|
|
241
248
|
#. module: account_commission
|
|
242
249
|
#: model:ir.model.fields,field_description:account_commission.field_account_invoice_line_agent__invoice_id
|
|
250
|
+
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
243
251
|
msgid "Invoice"
|
|
244
252
|
msgstr "Fatura"
|
|
245
253
|
|
|
@@ -289,11 +297,6 @@ msgstr "Data Fatura"
|
|
|
289
297
|
msgid "Invoice exception"
|
|
290
298
|
msgstr "Exceção Fatura"
|
|
291
299
|
|
|
292
|
-
#. module: account_commission
|
|
293
|
-
#: model_terms:ir.ui.view,arch_db:account_commission.report_settlement_document
|
|
294
|
-
msgid "Invoice line"
|
|
295
|
-
msgstr "Linha Fatura"
|
|
296
|
-
|
|
297
300
|
#. module: account_commission
|
|
298
301
|
#: model:ir.model.fields.selection,name:account_commission.selection__commission_settlement__state__invoiced
|
|
299
302
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
@@ -588,3 +591,6 @@ msgstr "análise de comissão da fatura"
|
|
|
588
591
|
#: model_terms:ir.ui.view,arch_db:account_commission.view_invoice_commission_analysis_search
|
|
589
592
|
msgid "invoices Commission Analysis"
|
|
590
593
|
msgstr "análise de comissão da fatura"
|
|
594
|
+
|
|
595
|
+
#~ msgid "Invoice line"
|
|
596
|
+
#~ msgstr "Linha Fatura"
|
|
@@ -12,5 +12,5 @@ class Commission(models.Model):
|
|
|
12
12
|
default="open",
|
|
13
13
|
help="Select the invoice status for settling the commissions:\n"
|
|
14
14
|
"* 'Invoice Based': Commissions are settled when the invoice is issued.\n"
|
|
15
|
-
"* 'Payment Based': Commissions are settled when the invoice is paid.",
|
|
15
|
+
"* 'Payment Based': Commissions are settled when the invoice is paid (or refunded).",
|
|
16
16
|
)
|
|
@@ -3,4 +3,6 @@ For selecting invoice status in commissions:
|
|
|
3
3
|
#. Edit or create a new record to select the invoice status for settling the commissions.
|
|
4
4
|
|
|
5
5
|
* **Invoice Based**: Commissions are settled when the invoice is issued.
|
|
6
|
-
* **Payment Based**: Commissions are settled when the invoice is paid.
|
|
6
|
+
* **Payment Based**: Commissions are settled when the invoice is paid or refunded.
|
|
7
|
+
Note that when refunding an invoice, the corresponding reversed commission will
|
|
8
|
+
be settled as well, resulting in a 0 net commission between both operations.
|
|
@@ -366,7 +366,7 @@ ul.auto-toc {
|
|
|
366
366
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
367
|
!! changes will be overwritten. !!
|
|
368
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
369
|
+
!! source digest: sha256:77299b3b65fc7979bfd7818c3aed06a5912134599c1e0469f00ed5f220b2b5be
|
|
370
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
371
|
<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/commission/tree/16.0/account_commission"><img alt="OCA/commission" src="https://img.shields.io/badge/github-OCA%2Fcommission-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-account_commission"><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/commission&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
372
372
|
<p>This module adds the function to calculate commissions in invoices (account moves).</p>
|
|
@@ -392,7 +392,9 @@ ul.auto-toc {
|
|
|
392
392
|
<ol class="arabic simple">
|
|
393
393
|
<li>Edit or create a new record to select the invoice status for settling the commissions.<ul>
|
|
394
394
|
<li><strong>Invoice Based</strong>: Commissions are settled when the invoice is issued.</li>
|
|
395
|
-
<li><strong>Payment Based</strong>: Commissions are settled when the invoice is paid
|
|
395
|
+
<li><strong>Payment Based</strong>: Commissions are settled when the invoice is paid or refunded.
|
|
396
|
+
Note that when refunding an invoice, the corresponding reversed commission will
|
|
397
|
+
be settled as well, resulting in a 0 net commission between both operations.</li>
|
|
396
398
|
</ul>
|
|
397
399
|
</li>
|
|
398
400
|
</ol>
|
|
@@ -7,7 +7,7 @@ from dateutil.relativedelta import relativedelta
|
|
|
7
7
|
|
|
8
8
|
from odoo import fields
|
|
9
9
|
from odoo.exceptions import UserError, ValidationError
|
|
10
|
-
from odoo.tests import tagged
|
|
10
|
+
from odoo.tests import Form, tagged
|
|
11
11
|
|
|
12
12
|
from odoo.addons.commission.tests.test_commission import TestCommissionBase
|
|
13
13
|
|
|
@@ -532,3 +532,130 @@ class TestAccountCommission(TestCommissionBase):
|
|
|
532
532
|
]
|
|
533
533
|
)
|
|
534
534
|
self.assertEqual(2, len(settlements))
|
|
535
|
+
|
|
536
|
+
def test_invoice_partial_refund(self):
|
|
537
|
+
commission = self.commission_net_paid
|
|
538
|
+
agent = self.agent_monthly
|
|
539
|
+
today = fields.Date.today()
|
|
540
|
+
# Create an invoice
|
|
541
|
+
invoice = self._create_invoice(agent, commission, today, currency=None)
|
|
542
|
+
invoice.action_post()
|
|
543
|
+
# Register payment for invoice
|
|
544
|
+
payment_journal = self.env["account.journal"].search(
|
|
545
|
+
[("type", "=", "cash"), ("company_id", "=", invoice.company_id.id)],
|
|
546
|
+
limit=1,
|
|
547
|
+
)
|
|
548
|
+
register_payments = (
|
|
549
|
+
self.env["account.payment.register"]
|
|
550
|
+
.with_context(active_ids=invoice.id, active_model="account.move")
|
|
551
|
+
.create({"journal_id": payment_journal.id})
|
|
552
|
+
)
|
|
553
|
+
register_payments.action_create_payments()
|
|
554
|
+
# Make a parcial refund for the invoice
|
|
555
|
+
move_reversal = (
|
|
556
|
+
self.env["account.move.reversal"]
|
|
557
|
+
.with_context(active_model="account.move", active_ids=invoice.id)
|
|
558
|
+
.create(
|
|
559
|
+
{
|
|
560
|
+
"reason": "no reason",
|
|
561
|
+
"refund_method": "refund",
|
|
562
|
+
"journal_id": invoice.journal_id.id,
|
|
563
|
+
}
|
|
564
|
+
)
|
|
565
|
+
)
|
|
566
|
+
refund_form = Form(
|
|
567
|
+
self.env["account.move"].browse(move_reversal.reverse_moves()["res_id"])
|
|
568
|
+
)
|
|
569
|
+
with refund_form.invoice_line_ids.edit(0) as line:
|
|
570
|
+
line.price_unit -= 2
|
|
571
|
+
refund = refund_form.save()
|
|
572
|
+
refund.action_post()
|
|
573
|
+
# Register payment for the refund
|
|
574
|
+
register_payments = (
|
|
575
|
+
self.env["account.payment.register"]
|
|
576
|
+
.with_context(active_ids=refund.id, active_model="account.move")
|
|
577
|
+
.create({"journal_id": payment_journal.id})
|
|
578
|
+
)
|
|
579
|
+
register_payments.action_create_payments()
|
|
580
|
+
# check settlement creation. The commission must be (5 - 3) * 0.2 = 0.4
|
|
581
|
+
self._settle_agent_invoice(agent, 1)
|
|
582
|
+
settlements = self.settle_model.search([("agent_id", "=", agent.id)])
|
|
583
|
+
self.assertEqual(2, len(settlements.line_ids))
|
|
584
|
+
self.assertEqual(0.4, sum(settlements.mapped("total")))
|
|
585
|
+
|
|
586
|
+
def test_invoice_full_refund(self):
|
|
587
|
+
commission = self.commission_net_paid
|
|
588
|
+
agent = self.agent_monthly
|
|
589
|
+
today = fields.Date.today()
|
|
590
|
+
# Create an invoice and refund it
|
|
591
|
+
invoice = self._create_invoice(agent, commission, today, currency=None)
|
|
592
|
+
invoice.action_post()
|
|
593
|
+
move_reversal = (
|
|
594
|
+
self.env["account.move.reversal"]
|
|
595
|
+
.with_context(active_model="account.move", active_ids=invoice.id)
|
|
596
|
+
.create(
|
|
597
|
+
{
|
|
598
|
+
"reason": "no reason",
|
|
599
|
+
"refund_method": "cancel",
|
|
600
|
+
"journal_id": invoice.journal_id.id,
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
)
|
|
604
|
+
move_reversal.reverse_moves()
|
|
605
|
+
# check settlement creation. The commission must be: (5 - 5) * 0.2 = 0
|
|
606
|
+
self._settle_agent_invoice(agent, 1)
|
|
607
|
+
settlements = self.settle_model.search(
|
|
608
|
+
[
|
|
609
|
+
("agent_id", "=", agent.id),
|
|
610
|
+
]
|
|
611
|
+
)
|
|
612
|
+
self.assertEqual(2, len(settlements.line_ids))
|
|
613
|
+
self.assertEqual(0, sum(settlements.mapped("total")))
|
|
614
|
+
|
|
615
|
+
def test_invoice_modify_refund(self):
|
|
616
|
+
commission = self.commission_net_paid
|
|
617
|
+
agent = self.agent_monthly
|
|
618
|
+
today = fields.Date.today()
|
|
619
|
+
# Create an invoice
|
|
620
|
+
invoice = self._create_invoice(agent, commission, today, currency=None)
|
|
621
|
+
invoice.action_post()
|
|
622
|
+
# Create a full refund and a new invoice
|
|
623
|
+
move_reversal = (
|
|
624
|
+
self.env["account.move.reversal"]
|
|
625
|
+
.with_context(active_model="account.move", active_ids=invoice.id)
|
|
626
|
+
.create(
|
|
627
|
+
{
|
|
628
|
+
"reason": "no reason",
|
|
629
|
+
"refund_method": "modify",
|
|
630
|
+
"journal_id": invoice.journal_id.id,
|
|
631
|
+
}
|
|
632
|
+
)
|
|
633
|
+
)
|
|
634
|
+
invoice2_form = Form(
|
|
635
|
+
self.env["account.move"].browse(move_reversal.reverse_moves()["res_id"])
|
|
636
|
+
)
|
|
637
|
+
with invoice2_form.invoice_line_ids.edit(0) as line:
|
|
638
|
+
line.price_unit -= 2
|
|
639
|
+
invoice2 = invoice2_form.save()
|
|
640
|
+
invoice2.action_post()
|
|
641
|
+
# Register payment for the new invoice
|
|
642
|
+
payment_journal = self.env["account.journal"].search(
|
|
643
|
+
[("type", "=", "cash"), ("company_id", "=", invoice.company_id.id)],
|
|
644
|
+
limit=1,
|
|
645
|
+
)
|
|
646
|
+
register_payments = (
|
|
647
|
+
self.env["account.payment.register"]
|
|
648
|
+
.with_context(active_ids=invoice2.id, active_model="account.move")
|
|
649
|
+
.create({"journal_id": payment_journal.id})
|
|
650
|
+
)
|
|
651
|
+
register_payments.action_create_payments()
|
|
652
|
+
|
|
653
|
+
# check settlement creation. The commission must be (5 - 5 + 3) * 0.2 = 0.6
|
|
654
|
+
self._settle_agent_invoice(agent, 1)
|
|
655
|
+
settlements = self.settle_model.search(
|
|
656
|
+
[
|
|
657
|
+
("agent_id", "=", agent.id),
|
|
658
|
+
]
|
|
659
|
+
)
|
|
660
|
+
self.assertEqual(3, len(settlements.line_ids))
|
|
661
|
+
self.assertAlmostEqual(0.6, sum(settlements.mapped("total")), 2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account-commission
|
|
3
|
-
Version: 16.0.2.2.
|
|
3
|
+
Version: 16.0.2.2.1
|
|
4
4
|
Summary: Account commissions
|
|
5
5
|
Home-page: https://github.com/OCA/commission
|
|
6
6
|
Author: Tecnativa, Odoo Community Association (OCA)
|
|
@@ -24,7 +24,7 @@ Account commissions
|
|
|
24
24
|
!! This file is generated by oca-gen-addon-readme !!
|
|
25
25
|
!! changes will be overwritten. !!
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
-
!! source digest: sha256:
|
|
27
|
+
!! source digest: sha256:77299b3b65fc7979bfd7818c3aed06a5912134599c1e0469f00ed5f220b2b5be
|
|
28
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
29
|
|
|
30
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -64,7 +64,9 @@ For selecting invoice status in commissions:
|
|
|
64
64
|
#. Edit or create a new record to select the invoice status for settling the commissions.
|
|
65
65
|
|
|
66
66
|
* **Invoice Based**: Commissions are settled when the invoice is issued.
|
|
67
|
-
* **Payment Based**: Commissions are settled when the invoice is paid.
|
|
67
|
+
* **Payment Based**: Commissions are settled when the invoice is paid or refunded.
|
|
68
|
+
Note that when refunding an invoice, the corresponding reversed commission will
|
|
69
|
+
be settled as well, resulting in a 0 net commission between both operations.
|
|
68
70
|
|
|
69
71
|
Usage
|
|
70
72
|
=====
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
odoo/addons/account_commission/README.rst,sha256=
|
|
1
|
+
odoo/addons/account_commission/README.rst,sha256=yrN_glpY0JN2HsDPh6AGoq_tBuisbi2CQx5WpX6D4yg,6143
|
|
2
2
|
odoo/addons/account_commission/__init__.py,sha256=8JG3SPnwMlgXTppOwkp3YTgDDQGo7U7veMEMpG1bL_c,64
|
|
3
|
-
odoo/addons/account_commission/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/account_commission/__manifest__.py,sha256=LYhfoiheaRMmpLKQm9b32TW0L3amYfCu4MefuAEYcA4,893
|
|
4
4
|
odoo/addons/account_commission/data/menuitem_data.xml,sha256=OX8KpilSn3zWf9cMNiJLDO7aV_vtaH6GTIyMZWDxYqM,361
|
|
5
|
-
odoo/addons/account_commission/i18n/account_commission.pot,sha256=
|
|
6
|
-
odoo/addons/account_commission/i18n/es.po,sha256=
|
|
7
|
-
odoo/addons/account_commission/i18n/hr.po,sha256=
|
|
8
|
-
odoo/addons/account_commission/i18n/it.po,sha256=-
|
|
9
|
-
odoo/addons/account_commission/i18n/ja.po,sha256=
|
|
10
|
-
odoo/addons/account_commission/i18n/pt.po,sha256=
|
|
11
|
-
odoo/addons/account_commission/i18n/pt_BR.po,sha256=
|
|
5
|
+
odoo/addons/account_commission/i18n/account_commission.pot,sha256=YM_lHjaDADe8EjFteiOtG5wRZutjZuvuXy8P7hCbZRU,21969
|
|
6
|
+
odoo/addons/account_commission/i18n/es.po,sha256=Ph1GCvKqbAc2ejPfGACqmwF81HP0m5UrBRCbdFjopok,24802
|
|
7
|
+
odoo/addons/account_commission/i18n/hr.po,sha256=Q0fYDpbCdxtKNvJ1ElqlOG_Yprpkf5_uBCL5bl2R46g,22102
|
|
8
|
+
odoo/addons/account_commission/i18n/it.po,sha256=-bMDQcj7sjtmzmDcr-w7xUWKq0FkEgk95Fnkfc7hTN8,24522
|
|
9
|
+
odoo/addons/account_commission/i18n/ja.po,sha256=BQv8Nzq_Q26TCWM-GhKTvOUnRQignYu3pVYaaq1_YN4,24651
|
|
10
|
+
odoo/addons/account_commission/i18n/pt.po,sha256=LULptNZCEkKt1JLTcf_slnnh_fYNyOWhfRzObKacn-k,24514
|
|
11
|
+
odoo/addons/account_commission/i18n/pt_BR.po,sha256=UmMTEJy8d-W7yEZbSh2bHlFMi3RczRQt85vYVsSQ9iI,24504
|
|
12
12
|
odoo/addons/account_commission/models/__init__.py,sha256=NAnZVtdmEwISK51Ipnoin5jHE3_bVPLsNghvuFcM3NI,88
|
|
13
13
|
odoo/addons/account_commission/models/account_move.py,sha256=6P9SkOsurOvxTY4eA3hv72pHK95u1wYrkVYsLkSyJz4,9198
|
|
14
|
-
odoo/addons/account_commission/models/commission.py,sha256=
|
|
14
|
+
odoo/addons/account_commission/models/commission.py,sha256=OHzmB5iH-h4oQf5JQGV4EFpNOkAHxC1_0-j0g-8nDXE,576
|
|
15
15
|
odoo/addons/account_commission/models/commission_settlement.py,sha256=zlC641aN3U_13O0qVp2fPuHHMXnEhMS_Q-RbD4z4JU8,7177
|
|
16
|
-
odoo/addons/account_commission/readme/CONFIGURE.rst,sha256=
|
|
16
|
+
odoo/addons/account_commission/readme/CONFIGURE.rst,sha256=vUEhtDTSXiZc88gXBuQZIcSkM3CbkmzQQwdVgJfnbSA,466
|
|
17
17
|
odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=QsQobB9fWIKbpeWn8EHcxpOVKgnsjuqydf3FRLbC3v4,667
|
|
18
18
|
odoo/addons/account_commission/readme/DESCRIPTION.rst,sha256=dLMZSNYGysvHiOC7Untw2leoCloADPLcrkIoE8FDEVI,208
|
|
19
19
|
odoo/addons/account_commission/readme/USAGE.rst,sha256=kyhxu0d4eBImmEfJ4f-blVNPNByzArlsT9SIvLpQFqI,1798
|
|
@@ -24,9 +24,9 @@ odoo/addons/account_commission/security/account_commission_security.xml,sha256=p
|
|
|
24
24
|
odoo/addons/account_commission/security/ir.model.access.csv,sha256=c0k8cFhVg1A4XCaUQ-mzJdLIotKKt1ltIYznK8ELhYE,883
|
|
25
25
|
odoo/addons/account_commission/static/description/icon.png,sha256=ydxSIUuHSeE4CfMVsEzLjKKVdX4RicuPj8VGM2rBpBg,8219
|
|
26
26
|
odoo/addons/account_commission/static/description/icon.svg,sha256=96b_cQ-F1XuDU6S5mDi9ioe0d22Vwn30uBDQ_3ZSi5w,17220
|
|
27
|
-
odoo/addons/account_commission/static/description/index.html,sha256=
|
|
27
|
+
odoo/addons/account_commission/static/description/index.html,sha256=rsCEueGEDQH3lDRwd6PE-_TBnXDr2h1gq4VaNtBejHc,17067
|
|
28
28
|
odoo/addons/account_commission/tests/__init__.py,sha256=bxd564RH-TWEpEJWbbc558dPFEJZCsH9JM8JF3-PMUM,38
|
|
29
|
-
odoo/addons/account_commission/tests/test_account_commission.py,sha256=
|
|
29
|
+
odoo/addons/account_commission/tests/test_account_commission.py,sha256=yhSNC5SyEqDt3kFG7edGLka3eZl0C7FzqtBYKoIXQp8,27141
|
|
30
30
|
odoo/addons/account_commission/views/account_move_views.xml,sha256=N6PGXNMSxgpwaz5HtydDTRX0stu3QzTX5vBICCksP9s,6600
|
|
31
31
|
odoo/addons/account_commission/views/commission_settlement_views.xml,sha256=JG5sX13R5jdB79m1Pub2rwqhM1s3Kux3btXAbgv_sFk,3496
|
|
32
32
|
odoo/addons/account_commission/views/commission_views.xml,sha256=oY2-WJ-lEn3gCoFMqStKObGT3LRkBxMmANm2MRhYuRE,614
|
|
@@ -35,7 +35,7 @@ odoo/addons/account_commission/wizards/__init__.py,sha256=ddwjnl0fpZTw56iNQmRcDJ
|
|
|
35
35
|
odoo/addons/account_commission/wizards/commission_make_settle.py,sha256=k7yztap0JSa5q-QH71GXd0WFaUG639ETaAKrqdH8UE0,1717
|
|
36
36
|
odoo/addons/account_commission/wizards/wizard_invoice.py,sha256=SumDW3606uLS4d6L2rKjQbwdvfmIYovKark-EUMTve0,3162
|
|
37
37
|
odoo/addons/account_commission/wizards/wizard_invoice.xml,sha256=Afx90Mccl0EjLzZ2dJa2dOikYhWxIY5tQ7objmca8gc,2292
|
|
38
|
-
odoo_addon_account_commission-16.0.2.2.
|
|
39
|
-
odoo_addon_account_commission-16.0.2.2.
|
|
40
|
-
odoo_addon_account_commission-16.0.2.2.
|
|
41
|
-
odoo_addon_account_commission-16.0.2.2.
|
|
38
|
+
odoo_addon_account_commission-16.0.2.2.1.dist-info/METADATA,sha256=iIQxKe0IT3HNDbFbgPMhFtln-eN_0b2fwHBsSqsxLDY,6729
|
|
39
|
+
odoo_addon_account_commission-16.0.2.2.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
40
|
+
odoo_addon_account_commission-16.0.2.2.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
41
|
+
odoo_addon_account_commission-16.0.2.2.1.dist-info/RECORD,,
|