Skip to content

Commit

Permalink
[FIX] changed to MVC structure
Browse files Browse the repository at this point in the history
[FIX] changed to MVC structure - modifications

[IMP] modifications for account_payment_mode
  • Loading branch information
atchuthan authored and hugosantosred committed Feb 9, 2018
1 parent 8d85709 commit cb21320
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 35 deletions.
8 changes: 1 addition & 7 deletions connector_ecommerce/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
#
##############################################################################

from . import stock
from . import account
from . import product
from . import invoice
from . import payment_method
from . import event
from . import models
from . import unit
from . import sale
from . import wizard
18 changes: 9 additions & 9 deletions connector_ecommerce/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@
##############################################################################

{'name': 'Connector for E-Commerce',
'version': '8.0.3.0.0',
'version': '9.0.1.0.0',
'category': 'Hidden',
'author': "Camptocamp,Akretion,Odoo Community Association (OCA)",
'website': 'http://openerp-connector.com',
'license': 'AGPL-3',
'depends': [
'connector',
'sale_payment_method_automatic_workflow',
'sale_exceptions',
'sale_automatic_workflow_payment_mode',
'sale_exception',
'delivery',
'connector_base_product',
],
'data': [
'security/security.xml',
'security/ir.model.access.csv',
'wizard/sale_ignore_cancel_view.xml',
'sale_view.xml',
'invoice_view.xml',
'ecommerce_data.xml',
'stock_view.xml',
'payment_method_view.xml',
'account_view.xml',
'data/ecommerce_data.xml',
'views/sale_view.xml',
'views/invoice_view.xml',
'views/stock_view.xml',
'views/payment_mode_view.xml',
'views/account_view.xml',
],
'installable': True,
}
File renamed without changes.
8 changes: 8 additions & 0 deletions connector_ecommerce/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
from . import stock
from . import account
from . import product
from . import invoice
from . import payment_method
from . import event
from . import sale
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from openerp.osv import orm, fields


class account_tax_code(orm.Model):
class AccountTaxCode(orm.Model):
_inherit = 'account.tax'

def get_tax_from_rate(self, cr, uid, rate, is_tax_included=False,
Expand Down Expand Up @@ -51,7 +51,7 @@ def get_tax_from_rate(self, cr, uid, rate, is_tax_included=False,
return False


class account_tax_group(orm.Model):
class AccountTaxGroup(orm.Model):
_name = 'account.tax.group'
_description = 'account tax group'

Expand All @@ -61,7 +61,7 @@ class account_tax_group(orm.Model):
}


class account_tax(orm.Model):
class AccountTax(orm.Model):
_inherit = 'account.tax'

_columns = {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from openerp import models, fields, api


class PaymentMethod(models.Model):
_inherit = "sale.payment.method"
class AccountPaymentMode(models.Model):
_inherit = "account.payment.mode"

@api.model
def _get_import_rules(self):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions connector_ecommerce/tests/test_onchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_play_onchange(self):
product_model = self.env['product.product']
partner_model = self.env['res.partner']
tax_model = self.env['account.tax']
payment_method_model = self.env['sale.payment.method']
payment_mode_model = self.env['account.payment.mode']

backend_record = mock.Mock()
env = Environment(backend_record, self.session, 'sale.order')
Expand All @@ -63,7 +63,7 @@ def test_play_onchange(self):
'weight': 15,
'taxes_id': [(6, 0, [tax.id])]})
payment_term = self.env.ref('account.account_payment_term_advance')
payment_method = payment_method_model.create({
payment_method = payment_mode_model.create({
'name': 'Cash',
'payment_term_id': payment_term.id,
})
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<data>

<!-- VIEW FOR THE OBJECT : payment_method -->
<record id="payment_method_view_form" model="ir.ui.view">
<field name="name">sale.payment.method.connector_ecommerce.form</field>
<field name="model">sale.payment.method</field>
<field name="inherit_id"
ref="sale_payment_method_automatic_workflow.payment_method_view_form" />
<record id="account_payment_mode_form_inherit" model="ir.ui.view">
<field name="name">account.payment.mode.connector_ecommerce.form</field>
<field name="model">account.payment.mode</field>
<field name="inherit_id" ref="account_payment_mode.account_payment_mode_form" />
<field name="arch" type="xml">
<group name="general" position="after">
<group name="main" position="after">
<group name="import_rule" string="Import Rules">
<group>
<field name="import_rule" />
Expand Down Expand Up @@ -41,13 +40,12 @@
</field>
</record>

<record id="payment_method_view_tree" model="ir.ui.view">
<field name="name">sale.payment.method.connector_ecommerce.tree</field>
<field name="model">sale.payment.method</field>
<field name="inherit_id"
ref="sale_payment_method_automatic_workflow.payment_method_view_tree" />
<record id="account_payment_mode_tree_inherit" model="ir.ui.view">
<field name="name">account.payment.mode.connector_ecommerce.tree</field>
<field name="model">account.payment.mode</field>
<field name="inherit_id" ref="account_payment_mode.account_payment_mode_tree" />
<field name="arch" type="xml">
<field name="workflow_process_id" position="after">
<field name="company_id" position="before">
<field name="import_rule" />
</field>
</field>
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit cb21320

Please sign in to comment.