Skip to content

Commit

Permalink
wip - restructure menu items, move wizard_settle to commistion, updat…
Browse files Browse the repository at this point in the history
…e tests
  • Loading branch information
yostashiro committed Oct 30, 2022
1 parent 348babc commit edc4c38
Show file tree
Hide file tree
Showing 32 changed files with 403 additions and 254 deletions.
2 changes: 1 addition & 1 deletion account_commission/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import models
from . import wizard
from . import wizards
from . import report
3 changes: 1 addition & 2 deletions account_commission/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"license": "AGPL-3",
"depends": [
"account",
"product",
"commission",
],
"website": "https://github.com/OCA/commission",
Expand All @@ -18,9 +17,9 @@
"security/account_commission_security.xml",
"views/account_move_views.xml",
"views/account_commission_settlement_view.xml",
"views/commission_views.xml",
"views/report_settlement_templates.xml",
"views/res_partner.xml",
"wizard/wizard_settle.xml",
"report/commission_analysis_view.xml",
],
"installable": True,
Expand Down
1 change: 1 addition & 0 deletions account_commission/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import account_move
from . import commission
from . import settlement
from . import res_partner
14 changes: 14 additions & 0 deletions account_commission/models/commission.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class Commission(models.Model):
_inherit = "commission"

invoice_state = fields.Selection(
[("open", "Invoice Based"), ("paid", "Payment Based")],
string="Invoice Status",
required=True,
default="open",
)
4 changes: 2 additions & 2 deletions account_commission/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For adding commissions:

For adding new agents:

#. Go to *Invoicing > Vendors > Agents*. You can also access from
#. Go to *Invoicing > Vendors > Commissios Agents*. You can also access from
*Contacts > Contacts* or *Invoicing > Customers > Customers*.
#. Edit or create a new record.
#. On "Sales & Purchases" page, mark "Agent" check. It should be checked if
Expand All @@ -37,7 +37,7 @@ For adding new agents:
for setting an "Employee" agent type.
* The associated commission type.
* The settlement period, where you can select:
*

* Monthly: the settlement will be done for the whole past month.
* Bi-weekly: there will be 2 settlement per month, one covering the first
15 days, and the other for the rest of the month.
Expand Down
1 change: 1 addition & 0 deletions account_commission/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Oihane Crucelaegui <[email protected]>
* Nicola Malcontenti <[email protected]>
* Aitor Bouzas <[email protected]>
* Aung Ko Ko Lin <[email protected]>

* `Tecnativa <https://www.tecnativa.com>`__:

Expand Down
2 changes: 1 addition & 1 deletion account_commission/readme/USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For adding commissions on invoices:

For settling the commissions to agents:

#. Go to *Invoicing > Configuration > Commissions Management > Settle commissions*.
#. Go to *Invoicing > Vendors > Commissions > Settle commissions*.
#. On the window that appears, you should select the date up to which you
want to create commissions. It should be at least one day after the last
period date. For example, if you settlements are monthly, you have to put
Expand Down
1 change: 0 additions & 1 deletion account_commission/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_invoice_line_agent,access_account_invoice_line_agent,model_account_invoice_line_agent,account.group_account_invoice,1,1,1,1
access_account_invoice_line_agent_user,access_account_invoice_line_agent_user,model_account_invoice_line_agent,base.group_user,1,0,0,0
access_invoice_commission_make_settle,access_invoice_commission_make_settle,model_invoice_commission_make_settle,account.group_account_manager,1,1,1,0
access_invoice_commission_analysis_report,access_invoice_commission_analysis_report,model_invoice_commission_analysis_report,base.group_user,1,0,0,0
2 changes: 1 addition & 1 deletion account_commission/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import test_invoice_commission
from . import test_account_commission
Loading

0 comments on commit edc4c38

Please sign in to comment.