summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/account/models/account.py10
-rw-r--r--addons/account/models/account_payment.py7
-rw-r--r--addons/account/views/account_view.xml15
-rw-r--r--addons/account_check_printing/views/account_journal_views.xml13
-rw-r--r--addons/point_of_sale/models/account_journal.py7
-rw-r--r--addons/point_of_sale/views/account_statement_view.xml24
-rw-r--r--addons/pos_mercury/models/pos_mercury.py2
-rw-r--r--addons/pos_mercury/views/pos_mercury_views.xml16
8 files changed, 80 insertions, 14 deletions
diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 2c8436a9b1e..9c1074a5912 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -281,12 +281,14 @@ class AccountJournal(models.Model):
inbound_payment_method_ids = fields.Many2many('account.payment.method', 'account_journal_inbound_payment_method_rel', 'journal_id', 'inbound_payment_method',
domain=[('payment_type', '=', 'inbound')], string='Debit Methods', default=lambda self: self._default_inbound_payment_methods(),
- help="Means of payment for collecting money. Odoo modules offer various payments handling facilities, "
- "but you can always use the 'Manual' payment method in order to manage payments outside of the software.")
+ help="Manual: Get paid by cash, check or any other method outside of Odoo.\n"\
+ "Electronic: Get paid automatically through a payment acquirer by requesting a transaction on a card saved by the customer when buying or subscribing online (payment token).\n"\
+ "Batch Deposit: Encash several customer checks at once by generating a batch deposit to submit to your bank. When encoding the bank statement in Odoo,you are suggested to reconcile the transaction with the batch deposit. Enable this option from the settings.")
outbound_payment_method_ids = fields.Many2many('account.payment.method', 'account_journal_outbound_payment_method_rel', 'journal_id', 'outbound_payment_method',
domain=[('payment_type', '=', 'outbound')], string='Payment Methods', default=lambda self: self._default_outbound_payment_methods(),
- help="Means of payment for sending money. Odoo modules offer various payments handling facilities, "
- "but you can always use the 'Manual' payment method in order to manage payments outside of the software.")
+ help="Manual:Pay bill by cash or any other method outside of Odoo.\n"\
+ "Check:Pay bill by check and print it from Odoo.\n"\
+ "SEPA Credit Transfer: Pay bill from a SEPA Credit Transfer file you submit to your bank. Enable this option from the settings.")
at_least_one_inbound = fields.Boolean(compute='_methods_compute', store=True)
at_least_one_outbound = fields.Boolean(compute='_methods_compute', store=True)
profit_account_id = fields.Many2one('account.account', string='Profit Account', domain=[('deprecated', '=', False)], help="Used to register a profit when the ending balance of a cash register differs from what the system computes")
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py
index 5aba0f5bd83..b75f87354df 100644
--- a/addons/account/models/account_payment.py
+++ b/addons/account/models/account_payment.py
@@ -31,7 +31,12 @@ class account_abstract_payment(models.AbstractModel):
_description = "Contains the logic shared between models which allows to register payments"
payment_type = fields.Selection([('outbound', 'Send Money'), ('inbound', 'Receive Money')], string='Payment Type', required=True)
- payment_method_id = fields.Many2one('account.payment.method', string='Payment Method Type', required=True, oldname="payment_method")
+ payment_method_id = fields.Many2one('account.payment.method', string='Payment Method Type', required=True, oldname="payment_method",
+ help="Manual: Get paid by cash, check or any other method outside of Odoo.\n"\
+ "Electronic: Get paid automatically through a payment acquirer by requesting a transaction on a card saved by the customer when buying or subscribing online (payment token).\n"\
+ "Check: Pay bill by check and print it from Odoo.\n"\
+ "Batch Deposit: Encash several customer checks at once by generating a batch deposit to submit to your bank. When encoding the bank statement in Odoo, you are suggested to reconcile the transaction with the batch deposit.To enable batch deposit,module account_batch_deposit must be installed.\n"\
+ "SEPA Credit Transfer: Pay bill from a SEPA Credit Transfer file you submit to your bank. To enable sepa credit transfer, module account_sepa must be installed ")
payment_method_code = fields.Char(related='payment_method_id.code',
help="Technical field used to adapt the interface to the payment type selected.", readonly=True)
diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml
index b71980e0ece..117e855d141 100644
--- a/addons/account/views/account_view.xml
+++ b/addons/account/views/account_view.xml
@@ -362,12 +362,25 @@
<group>
<field name="bank_acc_number"/>
<field name="bank_id"/>
- </group><group>
+ </group>
+ <group>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
+ </group>
+ </group>
+ <group>
+ <group string="Receivables">
<field name="inbound_payment_method_ids" widget="many2many_checkboxes"/>
+ </group>
+ <group string="Payables">
<field name="outbound_payment_method_ids" widget="many2many_checkboxes"/>
</group>
+ <group name="bank_statement" string="Bank Statements">
+ <label for="bank_statements_source"/>
+ <div name="bank_source">
+ <field name="bank_statements_source" widget="radio" attrs="{'required': [('type', '=', 'bank')]}"/>
+ </div>
+ </group>
</group>
</sheet>
</form>
diff --git a/addons/account_check_printing/views/account_journal_views.xml b/addons/account_check_printing/views/account_journal_views.xml
index 11bcb277b5a..95628770749 100644
--- a/addons/account_check_printing/views/account_journal_views.xml
+++ b/addons/account_check_printing/views/account_journal_views.xml
@@ -36,4 +36,17 @@
</xpath>
</field>
</record>
+ <record id="view_account_bank_journal_form_inherited_check_printing" model="ir.ui.view">
+ <field name="name">account.bank.journal.form.inherited.check.printing</field>
+ <field name="model">account.journal</field>
+ <field name="inherit_id" ref="account.view_account_bank_journal_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='outbound_payment_method_ids']" position="after">
+ <field name="check_printing_payment_method_selected" invisible="1"/>
+ <field name="check_sequence_id" invisible="1"/>
+ <field name="check_manual_sequencing" string="Manual Numbering of check" attrs="{'invisible': [('check_printing_payment_method_selected', '=', False)]}"/>
+ <field name="check_next_number" attrs="{'invisible': [('check_manual_sequencing', '=', False)]}"/>
+ </xpath>
+ </field>
+ </record>
</odoo>
diff --git a/addons/point_of_sale/models/account_journal.py b/addons/point_of_sale/models/account_journal.py
index 4785d7e02f8..1f487f522e2 100644
--- a/addons/point_of_sale/models/account_journal.py
+++ b/addons/point_of_sale/models/account_journal.py
@@ -7,7 +7,7 @@ from odoo import fields, models, api
class AccountJournal(models.Model):
_inherit = 'account.journal'
- journal_user = fields.Boolean('Active in Point of Sale',
+ journal_user = fields.Boolean('Use in Point of Sale',
help="Check this box if this journal define a payment method that can be used in a point of sale.")
amount_authorized_diff = fields.Float('Amount Authorized Difference',
help="This field depicts the maximum difference allowed between the ending balance and the theoretical cash when "
@@ -22,3 +22,8 @@ class AccountJournal(models.Model):
if session:
args += [('id', 'in', session.config_id.journal_ids.ids)]
return super(AccountJournal, self).search(args=args, offset=offset, limit=limit, order=order, count=count)
+
+ @api.onchange('type')
+ def onchange_type(self):
+ if self.type not in ['bank', 'cash']:
+ self.journal_user = False
diff --git a/addons/point_of_sale/views/account_statement_view.xml b/addons/point_of_sale/views/account_statement_view.xml
index 67b072b1a5d..15064b759e8 100644
--- a/addons/point_of_sale/views/account_statement_view.xml
+++ b/addons/point_of_sale/views/account_statement_view.xml
@@ -5,14 +5,30 @@
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
+ <xpath expr="//field[@name='type']" position="after">
+ <field name="journal_user" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
+ </xpath>
<xpath expr="//notebook[last()]" position="inside">
- <page string="Point of Sale" attrs="{'invisible': [('type','not in',['bank','cash'])]}">
- <group col="4" colspan="4">
- <field name="journal_user"/>
- <field name="amount_authorized_diff"/>
+ <page string="Point of Sale" attrs="{'invisible': [('journal_user', '=', False)]}">
+ <group>
+ <group name="amount_authorized" attrs="{'invisible': [('type', '!=', 'cash')]}">
+ <field name="amount_authorized_diff"/>
+ </group>
</group>
</page>
</xpath>
</field>
</record>
+ <record id="view_account_bank_journal_form_inherited_pos" model="ir.ui.view">
+ <field name="name">account.bank.journal.form.inherit.pos</field>
+ <field name="model">account.journal</field>
+ <field name="inherit_id" ref="account.view_account_bank_journal_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='bank_statement']" position="after">
+ <group string="Point of Sale">
+ <field name="journal_user"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
</odoo>
diff --git a/addons/pos_mercury/models/pos_mercury.py b/addons/pos_mercury/models/pos_mercury.py
index 707f85692e0..0a329634e5e 100644
--- a/addons/pos_mercury/models/pos_mercury.py
+++ b/addons/pos_mercury/models/pos_mercury.py
@@ -46,7 +46,7 @@ class AccountBankStatementLine(models.Model):
class AccountJournal(models.Model):
_inherit = 'account.journal'
- pos_mercury_config_id = fields.Many2one('pos_mercury.configuration', string='Mercury configuration', help='The configuration of Mercury used for this journal')
+ pos_mercury_config_id = fields.Many2one('pos_mercury.configuration', string='Mercury Credentials', help='The configuration of Mercury used for this journal')
class PosOrder(models.Model):
diff --git a/addons/pos_mercury/views/pos_mercury_views.xml b/addons/pos_mercury/views/pos_mercury_views.xml
index 02647810032..a201a02070f 100644
--- a/addons/pos_mercury/views/pos_mercury_views.xml
+++ b/addons/pos_mercury/views/pos_mercury_views.xml
@@ -73,8 +73,20 @@
<field name="model">account.journal</field>
<field name="inherit_id" ref="point_of_sale.view_account_journal_pos_user_form"></field>
<field name="arch" type="xml">
- <xpath expr="//field[@name='amount_authorized_diff']" position="after">
- <field name="pos_mercury_config_id"/>
+ <xpath expr="//group[@name='amount_authorized']" position="after">
+ <group attrs="{'invisible': [('type', '!=', 'bank')]}">
+ <field name="pos_mercury_config_id"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ <record id="view_account_bank_journal_form_inherited_pos_mercury" model="ir.ui.view">
+ <field name="name">account.bank.journal.form.inherited.pos.mercury</field>
+ <field name="model">account.journal</field>
+ <field name="inherit_id" ref="point_of_sale.view_account_bank_journal_form_inherited_pos"></field>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='journal_user']" position="after">
+ <field name="pos_mercury_config_id" attrs="{'invisible': [('journal_user', '=', False)]}"/>
</xpath>
</field>
</record>