Skip to content

Commit

Permalink
[MIG] ported module account_invoice_line_default_account to 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaudoux authored and SirTakobi committed Apr 21, 2022
1 parent 82d239d commit 06607d5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
4 changes: 3 additions & 1 deletion account_invoice_line_default_account/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
[email protected]
http://www.therp.nl
Ported to 7.0 on Sept. 17, 2013 by Jacques-Etienne Baudoux, BCIM (www.bcim.be)
'''
import model
from . import model
2 changes: 1 addition & 1 deletion account_invoice_line_default_account/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
'name': 'Account Invoice Line Default Account',
'version': '6.1.r005',
'version': '7.0.r001',
'depends': [
'base',
'account'
Expand Down
8 changes: 4 additions & 4 deletions account_invoice_line_default_account/model/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class res_partner(orm.Model):
'account.account',
type='many2one',
relation='account.account',
string='Default expense account',
string='Default Expense Account',
view_load=True,
domain='''[('user_type.report_type', '=', 'expense')]''',
help='Default counterpart account for purchases',
help='Default counterpart account for purchases on invoice lines',
required=False),
'auto_update_account_expense': fields.boolean(
'Save account selected on invoice',
help='When account selected on invoice, automatically save it'),
'Autosave account selected on invoice line',
help='When an account is selected on an invoice line, automatically assign it as default expense account'),
}

_defaults = {
Expand Down
22 changes: 9 additions & 13 deletions account_invoice_line_default_account/view/res_partner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,16 @@
<field
name="arch"
type="xml">
<field
name="property_account_payable"
position="after">
<field
name="property_account_payable"
position="after">
<group
colspan="2"
col="4">
<field
name="property_account_expense"
groups="account.group_account_invoice" />
<field
name="auto_update_account_expense"
groups="account.group_account_invoice" />
</group>
</field>
name="property_account_expense"
groups="account.group_account_invoice" />
<field
name="auto_update_account_expense"
groups="account.group_account_invoice" />
</field>
</field>
</record>
</data>
Expand Down

0 comments on commit 06607d5

Please sign in to comment.