Skip to content

Commit

Permalink
[FIX] account_payment_credit_card: development_status + Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
max3903 authored and OCA-git-bot committed Aug 5, 2019
1 parent 2128a4a commit 69234b6
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 24 deletions.
2 changes: 1 addition & 1 deletion account_payment_credit_card/__manifest__.py
Expand Up @@ -16,6 +16,6 @@
"views/account_view.xml",
],
"installable": True,
"development_status": "beta",
"development_status": "Beta",
"maintainers": ["max3903"],
}
5 changes: 1 addition & 4 deletions account_payment_credit_card/models/account.py
Expand Up @@ -8,7 +8,4 @@ class AccountJournal(models.Model):
_inherit = "account.journal"

credit_card = fields.Boolean('Transfer AP to Credit Card Company')
partner_id = fields.Many2one(
'res.partner',
'Credit Card Company'
)
partner_id = fields.Many2one('res.partner', 'Credit Card Company')
9 changes: 1 addition & 8 deletions account_payment_credit_card/models/account_move.py
@@ -1,7 +1,6 @@
# Copyright 2017 Open Source Integrators <http://www.opensourceintegrators.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


from odoo import api, models


Expand All @@ -11,13 +10,10 @@ class AccountMove(models.Model):
@api.multi
def post(self, invoice=False):
for move in self:

result = []
# Check whether journal has Transfer AP to Credit Card
# Company = checked or not
if move.journal_id and\
move.journal_id.credit_card:

if move.journal_id and move.journal_id.credit_card:
# Browse move lines
for move_line in move.line_ids:
# prepare move line values
Expand All @@ -35,12 +31,9 @@ def post(self, invoice=False):
'move_id': move_line.move_id.id,
'date': move_line.date
})

# Check result list
if result:

# Create new move lines
for vals in result:
self.env['account.move.line'].create(vals)

return super(AccountMove, self).post(invoice=invoice)
1 change: 0 additions & 1 deletion account_payment_credit_card/readme/CONFIGURE.rst
@@ -1,4 +1,3 @@

* Go to Accounting > Configuration > Journals
* Create a new journal for your credit card
* Check the box ‘Transfer AP to Credit Card Company’ and set the ‘Credit Card Company’ field
10 changes: 6 additions & 4 deletions account_payment_credit_card/readme/CONTRIBUTORS.rst
@@ -1,7 +1,9 @@
* `Open Source Integrators <https://www.opensourceintegrators.com>`_:

* Ray Carnes <rcarnes@ursainfosystems.com>
* Balaji Kannan <bkannan@opensourceintegrators.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Sudarshan Kadalazhi <skadalazhi@opensourceintegrators.com>

* Ray Carnes <rcarnes@ursainfosystems.com>
* Balaji Kannan <bkannan@opensourceintegrators.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Sudarshan Kadalazhi <skadalazhi@opensourceintegrators.com>
* Odoo Dev Team: DS, JA
* Nikul Chaudhary <nikulchaudhary2112@gmail.com>
2 changes: 0 additions & 2 deletions account_payment_credit_card/readme/CREDITS.rst

This file was deleted.

1 change: 0 additions & 1 deletion account_payment_credit_card/readme/DESCRIPTION.rst
@@ -1,4 +1,3 @@

This module provides a way to record Credit Card purchases and to pay them the same way regular purchases are recorded (via Vendor Bills) and paid (via Vendor Payments).

By default, if vendor bills are used to record credit card purchases, the liability (AP) from the supplier/vendor must be moved to the credit card company via a manual journal entry.
Expand Down
2 changes: 0 additions & 2 deletions account_payment_credit_card/readme/INSTALL.rst

This file was deleted.

1 change: 0 additions & 1 deletion account_payment_credit_card/readme/USAGE.rst
@@ -1,4 +1,3 @@

To use this module, you need to:

#. Go to Accounting > Purchases > Vendors Bills
Expand Down

0 comments on commit 69234b6

Please sign in to comment.