diff options
| author | Fabien Pinckaers <fp@openerp.com> | 2017-04-08 16:52:05 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@openerp.com> | 2017-04-08 16:52:05 +0200 |
| commit | 525d094ef6a26fa412227ceed3bfee1ab266ee43 (patch) | |
| tree | d693fcd84b2b6cd024818c37051bbd3e950ea783 /addons | |
| parent | a76ed8f2f3010e4a4c0d73610a5132b15c3bdbb0 (diff) | |
[IMP] account: misc UX improvements
Allow to configure the bank statement import mode from kanban
When doing a manual journal entry, don't show the maturity date
Removing Issued total, using credit instead (less code, more
useful to have due amounts, instead of overdue)
Creating a bank, set a name 'BofA Current' and an
account number (that way, the account.account is based
on name)
Settings Wizard & menus: better sentences
Statement CSV Import: installed by default (it
does not add any menu)
remove use_in_payment: complex field, only
used for a default value
Small code cleanup
[IMP] sale: moving order date to secondary tab (strange on a quotation)
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/models/account.py | 2 | ||||
| -rw-r--r-- | addons/account/models/account_journal_dashboard.py | 2 | ||||
| -rw-r--r-- | addons/account/models/partner.py | 12 | ||||
| -rw-r--r-- | addons/account/views/account_journal_dashboard_view.xml | 17 | ||||
| -rw-r--r-- | addons/account/views/account_view.xml | 31 | ||||
| -rw-r--r-- | addons/account/views/partner_view.xml | 2 | ||||
| -rw-r--r-- | addons/account/views/res_config_view.xml | 9 | ||||
| -rw-r--r-- | addons/account/views/tax_adjustments.xml | 2 | ||||
| -rw-r--r-- | addons/account_bank_statement_import/__manifest__.py | 2 | ||||
| -rw-r--r-- | addons/account_check_printing/data/account_check_printing_data.xml | 2 | ||||
| -rw-r--r-- | addons/payment/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/payment/models/__init__.py | 1 | ||||
| -rw-r--r-- | addons/payment/models/account_journal.py | 10 | ||||
| -rw-r--r-- | addons/payment/views/account_journal_views.xml | 15 | ||||
| -rw-r--r-- | addons/payment_transfer/models/payment.py | 2 | ||||
| -rw-r--r-- | addons/sale/views/sale_views.xml | 2 |
16 files changed, 38 insertions, 74 deletions
diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 32e90d115eb..3684c6f1c92 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -242,7 +242,7 @@ class AccountJournal(models.Model): # Bank journals fields bank_account_id = fields.Many2one('res.partner.bank', string="Bank Account", ondelete='restrict', copy=False) - bank_statements_source = fields.Selection([('no_feeds', 'No Feeds'),('manual', 'Record Manually')], string='Bank Feeds', default='no_feeds') + bank_statements_source = fields.Selection([('undefined', 'Undefined Yet'),('manual', 'Record Manually')], string='Bank Feeds', default='undefined') bank_acc_number = fields.Char(related='bank_account_id.acc_number') bank_id = fields.Many2one('res.bank', related='bank_account_id.bank_id') diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index d45f61fe50d..d14b95be8e5 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -219,7 +219,7 @@ class account_journal(models.Model): ctx.update({'default_type': 'in_refund', 'type': 'in_refund'}) view_id = self.env.ref('account.invoice_supplier_form').id else: - ctx.update({'default_journal_id': self.id}) + ctx.update({'default_journal_id': self.id, 'view_no_maturity': True}) view_id = self.env.ref('account.view_move_form').id model = 'account.move' return { diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py index 79ab283d34c..e826524eb57 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -316,17 +316,6 @@ class ResPartner(models.Model): domain += overdue_domain return domain - @api.multi - def _compute_issued_total(self): - """ Returns the issued total as will be displayed on partner view """ - today = fields.Date.context_today(self) - for partner in self: - domain = partner.get_followup_lines_domain(today, overdue_only=True) - issued_total = 0 - for aml in self.env['account.move.line'].search(domain): - issued_total += aml.amount_residual - partner.issued_total = issued_total - @api.one def _compute_has_unreconciled_entries(self): # Avoid useless work if has_unreconciled_entries is not relevant for this partner @@ -387,7 +376,6 @@ class ResPartner(models.Model): contracts_count = fields.Integer(compute='_journal_item_count', string="Contracts", type='integer') journal_item_count = fields.Integer(compute='_journal_item_count', string="Journal Items", type="integer") - issued_total = fields.Monetary(compute='_compute_issued_total', string="Journal Items") property_account_payable_id = fields.Many2one('account.account', company_dependent=True, string="Account Payable", oldname="property_account_payable", domain="[('internal_type', '=', 'payable'), ('deprecated', '=', False)]", diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index 5a7f69d23bb..f295f26173f 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -19,8 +19,13 @@ <div class="row"> <t t-if="(journal_type == 'bank' || journal_type == 'cash')" t-call="JournalBodyBankCash"/> <t t-if="journal_type == 'sale' || journal_type == 'purchase'" t-call="JournalBodySalePurchase"/> - <div t-if="journal_type == 'general' || journal_type == 'situation'" class="row"> - </div> + <t t-if="journal_type == 'general' || journal_type == 'situation'"> + <div class="col-xs-6 o_kanban_primary_left"> + <button type="object" name="open_action" context="{'action_name': 'action_move_journal_line', 'view_no_maturity': 1}" class="btn btn-primary btn-sm"> + <span>Journal Entries</span> + </button> + </div> + </t> </div> <t t-if="journal_type == 'bank' || journal_type == 'cash' || journal_type == 'sale' || journal_type == 'purchase'" t-call="JournalBodyGraph"/> </div><div class="container o_kanban_card_manage_pane o_invisible"> @@ -166,10 +171,10 @@ <span>View</span> </div> <div> - <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line'}">Journal Entries</a> + <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line', 'view_no_maturity': 1}">Journal Entries</a> </div> <div> - <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line', 'search_default_toreview': 1}">Entries to Review</a> + <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line', 'search_default_toreview': 1, 'view_no_maturity': 1}">Entries to Review</a> </div> <div> <a type="object" name="open_action" context="{'action_name': 'action_account_moves_all_a'}" groups="base.group_no_one">Journal Items</a> @@ -214,11 +219,11 @@ <button type="object" name="action_open_reconcile" class="btn btn-primary btn-sm"> Reconcile <t t-esc="dashboard.number_to_reconcile"/> Items</button> </t> <t t-if="journal_type == 'bank'"> - <div name="bank_journal_default_cta" t-if="! dashboard.bank_statements_source"> + <div name="bank_journal_default_cta" t-if="dashboard.bank_statements_source == 'undefined'"> <button t-if="dashboard.number_to_reconcile == 0" type="object" name="create_bank_statement" class="btn btn-primary btn-sm">New Statement</button> <a t-if="dashboard.number_to_reconcile > 0" type="object" name="create_bank_statement" class="oe_inline">New Statement</a> </div> - <div name="bank_journal_cta" t-if="dashboard.bank_statements_source"> + <div name="bank_journal_cta" t-if="dashboard.bank_statements_source != 'undefined'"> <button t-if="dashboard.bank_statements_source == 'manual' && dashboard.number_to_reconcile == 0" type="object" name="create_bank_statement" class="btn btn-primary btn-sm">New Statement</button> <a t-if="dashboard.bank_statements_source == 'manual' && dashboard.number_to_reconcile > 0" type="object" name="create_bank_statement" class="oe_inline">New Statement</a> </div> diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index 199d1cc95e5..25a153a54d1 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -311,15 +311,19 @@ <sheet> <field name="type" invisible="1"/> <div class="oe_title"> - <label for="bank_acc_number" required="1" class="oe_edit_only"/> - <h1><field name="bank_acc_number" required="1"/></h1> + <label for="name" class="oe_edit_only" string="Bank Account Name"/> + <h1><field name="name"/></h1> </div> - <group col="4"> - <field name="bank_id"/> - <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"/> - <field name="inbound_payment_method_ids" widget="many2many_checkboxes"/> - <field name="outbound_payment_method_ids" widget="many2many_checkboxes"/> + <group> + <group> + <field name="bank_acc_number"/> + <field name="bank_id"/> + </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"/> + <field name="inbound_payment_method_ids" widget="many2many_checkboxes"/> + <field name="outbound_payment_method_ids" widget="many2many_checkboxes"/> + </group> </group> </sheet> </form> @@ -1275,17 +1279,16 @@ string="Reconciled entries"> </button> </div> - <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/> <h1> <field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/> </h1> <group> <group> - <field name="journal_id" options="{'no_open': True, 'no_create': True}"/> <field name="date"/> + <field name="ref"/> </group> <group> - <field name="ref" required="1"/> + <field name="journal_id" options="{'no_open': True, 'no_create': True}"/> <field name="company_id" required="1" groups="base.group_multi_company"/> <field name="amount" invisible="1"/> <field name="currency_id" invisible="1"/> @@ -1306,7 +1309,7 @@ <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> <field name="debit" sum="Total Debit"/> <field name="credit" sum="Total Credit"/> - <field name="date_maturity" required="0"/> + <field name="date_maturity" required="0" invisible="context.get('view_no_maturity', False)"/> </tree> </field> <field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/> @@ -1355,7 +1358,7 @@ <field name="view_mode">tree,form</field> <field name="view_id" ref="view_move_tree"/> <field name="search_view_id" ref="view_account_move_filter"/> - <field name="context">{'search_default_misc_filter':1}</field> + <field name="context">{'search_default_misc_filter':1, 'view_no_maturity': True}</field> <field name="help" type="html"> <p class="oe_view_nocontent_create"> Click to create a journal entry. @@ -2012,6 +2015,6 @@ <field name="tag">manual_reconciliation_view</field> </record> - <menuitem id="menu_action_manual_reconciliation" name="Manual Payments & Invoices Matching" parent="menu_finance_entries" action="action_manual_reconciliation" sequence="25"/> + <menuitem id="menu_action_manual_reconciliation" parent="menu_finance_entries" action="action_manual_reconciliation" sequence="25"/> </data> </odoo> diff --git a/addons/account/views/partner_view.xml b/addons/account/views/partner_view.xml index 24377f47075..84607ad971d 100644 --- a/addons/account/views/partner_view.xml +++ b/addons/account/views/partner_view.xml @@ -163,12 +163,10 @@ <group> <group string="Sale" name="acc_sale"> <field name="property_payment_term_id" widget="selection"/> - <field name="credit" groups="base.group_no_one"/> <field name="trust"/> </group> <group string="Purchase" name="acc_purchase"> <field name="property_supplier_payment_term_id" widget="selection"/> - <field name="debit" groups="base.group_no_one"/> <field name="currency_id" invisible="1"/> </group> <group string="Fiscal Information" name="fiscal_information"> diff --git a/addons/account/views/res_config_view.xml b/addons/account/views/res_config_view.xml index b7ee84bbdda..1fe8aee70e9 100644 --- a/addons/account/views/res_config_view.xml +++ b/addons/account/views/res_config_view.xml @@ -99,7 +99,7 @@ <div class="col-xs-12 col-md-6 o_setting_box"> <div class="o_setting_left_pane"/> <div class="o_setting_right_pane"> - <label string="Currency"/> + <label string="Main Currency"/> <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/> <div class="text-muted"> Main currency of your company @@ -107,10 +107,7 @@ <div class="content-group"> <div class="row mt16"> <label for="currency_id" class="col-md-3 o_light_label"/> - <field name="currency_id"/> - </div> - <div> - <button name="%(base.action_currency_form)d" icon="fa-arrow-right" type="action" string="Activate Other Currencies" class="btn-link"/> + <field name="currency_id" options="{'no_create_edit': True, 'no_open': True}"/> </div> </div> </div> @@ -126,7 +123,7 @@ </div> <div class="content-group" attrs="{'invisible': [('group_multi_currency', '=', False)]}"> <div class="mt16"> - <button name="%(base.action_currency_form_company)d" icon="fa-arrow-right" type="action" string="Currencies" class="btn-link"/> + <button name="%(base.action_currency_form)d" icon="fa-arrow-right" type="action" string="Activate Currencies" class="btn-link"/> </div> </div> </div> diff --git a/addons/account/views/tax_adjustments.xml b/addons/account/views/tax_adjustments.xml index 5a6fa13e98d..2bc58711376 100644 --- a/addons/account/views/tax_adjustments.xml +++ b/addons/account/views/tax_adjustments.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <record id="tax_adjustments_form" model="ir.actions.act_window"> - <field name="name">Make Manual Tax Adjustments</field> + <field name="name">Tax Adjustment</field> <field name="res_model">tax.adjustments.wizard</field> <field name="view_type">form</field> <field name="view_mode">form</field> diff --git a/addons/account_bank_statement_import/__manifest__.py b/addons/account_bank_statement_import/__manifest__.py index 1fbf54ddf18..1206f8eadee 100644 --- a/addons/account_bank_statement_import/__manifest__.py +++ b/addons/account_bank_statement_import/__manifest__.py @@ -3,7 +3,7 @@ 'name': 'Account Bank Statement Import', 'category': 'Accounting', 'version': '1.0', - 'depends': ['account'], + 'depends': ['account_accountant'], 'description': """Generic Wizard to Import Bank Statements. Includes the import of files in .OFX format""", 'data': [ 'account_bank_statement_import_view.xml', diff --git a/addons/account_check_printing/data/account_check_printing_data.xml b/addons/account_check_printing/data/account_check_printing_data.xml index 70eb2b132d3..4089bef5cb9 100644 --- a/addons/account_check_printing/data/account_check_printing_data.xml +++ b/addons/account_check_printing/data/account_check_printing_data.xml @@ -3,7 +3,7 @@ <data noupdate="1"> <record id="account_payment_method_check" model="account.payment.method"> - <field name="name">Check</field> + <field name="name">Checks</field> <field name="code">check_printing</field> <field name="payment_type">outbound</field> </record> diff --git a/addons/payment/__manifest__.py b/addons/payment/__manifest__.py index daa20389586..545c528f610 100644 --- a/addons/payment/__manifest__.py +++ b/addons/payment/__manifest__.py @@ -12,7 +12,6 @@ 'data/payment_acquirer_data.xml', 'views/payment_views.xml', 'views/account_payment_views.xml', - 'views/account_journal_views.xml', 'views/payment_templates.xml', 'views/res_partner_views.xml', 'security/ir.model.access.csv', diff --git a/addons/payment/models/__init__.py b/addons/payment/models/__init__.py index 28a6594b0e5..e5b3f93737c 100644 --- a/addons/payment/models/__init__.py +++ b/addons/payment/models/__init__.py @@ -3,4 +3,3 @@ import payment_acquirer import res_partner import account_payment -import account_journal diff --git a/addons/payment/models/account_journal.py b/addons/payment/models/account_journal.py deleted file mode 100644 index 043e646ead7..00000000000 --- a/addons/payment/models/account_journal.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo import fields, models - - -class AccountJournal(models.Model): - _inherit = "account.journal" - - use_in_payment = fields.Boolean("Use in payment", help="Display this bank account on messages in payment process.") diff --git a/addons/payment/views/account_journal_views.xml b/addons/payment/views/account_journal_views.xml deleted file mode 100644 index 86f77bb503b..00000000000 --- a/addons/payment/views/account_journal_views.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> -<odoo> - - <record id="account_bank_journal_view_form" model="ir.ui.view"> - <field name="name">account.bank.journal.inherit.payment</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="bank_id"]' position="after"> - <field name="use_in_payment"/> - </xpath> - </field> - </record> - -</odoo> diff --git a/addons/payment_transfer/models/payment.py b/addons/payment_transfer/models/payment.py index b8bc7e2fe86..996294bf287 100644 --- a/addons/payment_transfer/models/payment.py +++ b/addons/payment_transfer/models/payment.py @@ -21,7 +21,7 @@ class TransferPaymentAcquirer(models.Model): def _format_transfer_data(self): company_id = self.env.user.company_id.id # filter only bank accounts marked as visible - journals = self.env['account.journal'].search([('type', '=', 'bank'), ('use_in_payment', '=', True), ('company_id', '=', company_id)]) + journals = self.env['account.journal'].search([('type', '=', 'bank'), ('company_id', '=', company_id)]) accounts = journals.mapped('bank_account_id').name_get() bank_title = _('Bank Accounts') if len(accounts) > 1 else _('Bank Account') bank_accounts = ''.join(['<ul>'] + ['<li>%s</li>' % name for id, name in accounts] + ['</ul>']) diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index baa12aa4654..629ac4f45b5 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -190,7 +190,6 @@ <field name="partner_shipping_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}"/> </group> <group> - <field name="date_order" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/> <field name="validity_date" attrs="{'invisible': [('state', 'in', ['sale', 'done'])]}"/> <field name="confirmation_date" attrs="{'invisible': [('state', 'in', ['draft', 'sent', 'cancel'])]}"/> <field name="pricelist_id" groups="product.group_sale_pricelist"/> @@ -347,6 +346,7 @@ groups="analytic.group_analytic_accounting"/> </group> <group name="sale_pay" string="Invoicing"> + <field name="date_order" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/> <field name="fiscal_position_id" options="{'no_create': True}"/> <field name="invoice_status" attrs="{'invisible': [('state', 'not in', ('sale','done'))]}"/> |
