diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e565d30638f..40daace4eda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,5 +6,6 @@ Contributing to Odoo TL;DR * Use this [template](https://github.com/odoo/odoo/wiki/Contributing#reporting-issues) when reporting issues, and please search for duplicates first! +* The issues not linked to pull requests will be handled with a low priority. * Pull requests must be made against the [correct version](https://github.com/odoo/odoo/wiki/Contributing#against-which-version-should-i-submit-a-patch) * There are restrictions on the kind of [changes allowed in stable series](https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean) diff --git a/README.md b/README.md index aa774a03057..106ffeed09d 100644 --- a/README.md +++ b/README.md @@ -5,43 +5,23 @@ Odoo Odoo is a suite of web based open source business apps. -The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ... +The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ... + Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. -Getting started with Odoo development --------------------------------------- +Getting started with Odoo +------------------------- -If you are a developer type the following command at your terminal: +For a standard installation please follow the Setup instructions +from the documentation. + +If you are a developer you may type the following command at your terminal: wget -O- https://raw.githubusercontent.com/odoo/odoo/master/odoo.py | python -Then follow the developer tutorial - - - -Packages, tarballs and installers ---------------------------------- - -* Debian packages - - Add this apt repository to your /etc/apt/sources.list file - - deb http://nightly.odoo.com/master/nightly/deb/ ./ - - Then type: - - $ sudo apt-get update - $ sudo apt-get install odoo - - If you plan to use Odoo with a local database, please make sure to install PostgreSQL *before* installing the Odoo Debian package. - -* Source tarballs - -* Windows installer - -* RPM package +Then follow the developer tutorials For Odoo employees diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index d7ae034469c..dc8c0fd9d8b 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1261,7 +1261,7 @@ class account_invoice_line(models.Model): uos_id = fields.Many2one('product.uom', string='Unit of Measure', ondelete='set null', index=True) product_id = fields.Many2one('product.product', string='Product', - ondelete='set null', index=True) + ondelete='restrict', index=True) account_id = fields.Many2one('account.account', string='Account', required=True, domain=[('type', 'not in', ['view', 'closed'])], default=_default_account, diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index e2a92a9926f..07bf1cf0c99 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1197,7 +1197,7 @@ class account_move_line(osv.osv): if journal.centralisation: self._check_moves(cr, uid, context=ctx) result = super(account_move_line, self).write(cr, uid, ids, vals, context) - if check: + if check and not context.get('novalidate'): done = [] for line in self.browse(cr, uid, ids): if line.move_id.id not in done: @@ -1339,24 +1339,23 @@ class account_move_line(osv.osv): account_id = 'account_paid_id' base_sign = 'ref_base_sign' tax_sign = 'ref_tax_sign' - tmp_cnt = 0 + base_adjusted = False for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00, force_excluded=False).get('taxes'): #create the base movement - if tmp_cnt == 0: - if tax[base_code]: - tmp_cnt += 1 - if tax_id.price_include: - total = tax['price_unit'] - newvals = { - 'tax_code_id': tax[base_code], - 'tax_amount': tax[base_sign] * abs(total), - } - if tax_id.price_include: - if tax['price_unit'] < 0: - newvals['credit'] = abs(tax['price_unit']) - else: - newvals['debit'] = tax['price_unit'] - self.write(cr, uid, [result], newvals, context=context) + if base_adjusted == False: + base_adjusted = True + if tax_id.price_include: + total = tax['price_unit'] + newvals = { + 'tax_code_id': tax[base_code], + 'tax_amount': tax[base_sign] * abs(total), + } + if tax_id.price_include: + if tax['price_unit'] < 0: + newvals['credit'] = abs(tax['price_unit']) + else: + newvals['debit'] = tax['price_unit'] + self.write(cr, uid, [result], newvals, context=context) else: data = { 'move_id': vals['move_id'], @@ -1372,8 +1371,7 @@ class account_move_line(osv.osv): 'credit': 0.0, 'debit': 0.0, } - if data['tax_code_id']: - self.create(cr, uid, data, context) + self.create(cr, uid, data, context) #create the Tax movement data = { 'move_id': vals['move_id'], @@ -1389,8 +1387,7 @@ class account_move_line(osv.osv): 'credit': tax['amount']<0 and -tax['amount'] or 0.0, 'debit': tax['amount']>0 and tax['amount'] or 0.0, } - if data['tax_code_id']: - self.create(cr, uid, data, context) + self.create(cr, uid, data, context) del vals['account_tax_id'] if check and not context.get('novalidate') and (context.get('recompute', True) or journal.entry_posted): diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 2e434fde466..061fe7f4e2e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -625,7 +625,7 @@