diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index b4fc2388a68..8b2a9aff257 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -461,10 +461,9 @@ class account_bank_statement(osv.osv): return {} balance_start = self._compute_balance_end_real(cr, uid, journal_id, context=context) - journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id', 'company_id'], context=context) - account_id = journal_data['default_debit_account_id'] + journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['company_id'], context=context) company_id = journal_data['company_id'] - return {'value': {'balance_start': balance_start, 'account_id': account_id, 'company_id': company_id}} + return {'value': {'balance_start': balance_start, 'company_id': company_id}} def unlink(self, cr, uid, ids, context=None): stat = self.read(cr, uid, ids, ['state'], context=context) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index c543b493831..57f16473b82 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1360,6 +1360,7 @@ class account_invoice_line(osv.osv): _columns = { 'name': fields.text('Description', required=True), 'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."), + 'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."), 'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True), 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'), 'product_id': fields.many2one('product.product', 'Product', ondelete='set null'), diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 26e18271dc2..8421409d4ce 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -322,7 +322,7 @@ + options='{"always_reload": True}'/> @@ -458,7 +458,6 @@ - diff --git a/addons/account/test/account_supplier_invoice.yml b/addons/account/test/account_supplier_invoice.yml index 9c5ce2dea3e..02c3d367050 100644 --- a/addons/account/test/account_supplier_invoice.yml +++ b/addons/account/test/account_supplier_invoice.yml @@ -21,7 +21,7 @@ - I create a supplier invoice - - !record {model: account.invoice, id: account_invoice_supplier0}: + !record {model: account.invoice, id: account_invoice_supplier0, view: invoice_supplier_form}: account_id: account.a_pay check_total: 3000.0 company_id: base.main_company diff --git a/addons/account/wizard/account_invoice_state_view.xml b/addons/account/wizard/account_invoice_state_view.xml index 11703a4f259..eb636f61b50 100644 --- a/addons/account/wizard/account_invoice_state_view.xml +++ b/addons/account/wizard/account_invoice_state_view.xml @@ -6,7 +6,12 @@ account.invoice.confirm
- +

+ Once draft invoices are confirmed, you will not be able + to modify them. The invoices will receive a unique + number and journal items will be created in your chart + of accounts. +