diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index f75708322..000000000 --- a/.coveragerc +++ /dev/null @@ -1,18 +0,0 @@ -# Config file .coveragerc -# adapt the include for your project - -[report] -include = - */OCA/stock-logistics-warehouse/* - -omit = - */tests/* - *__init__.py - -# Regexes for lines to exclude from consideration -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - # Don't complain about null context checking - if context is None: diff --git a/.travis.yml b/.travis.yml index c3b2ecd8f..a14d7c6c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,9 @@ python: - "2.7" env: - - VERSION="7.0" ODOO_REPO="odoo/odoo" - - VERSION="7.0" ODOO_REPO="OCA/OCB" + - VERSION="7.0" LINT_CHECK="1" + - VERSION="7.0" ODOO_REPO="odoo/odoo" LINT_CHECK="0" + - VERSION="7.0" ODOO_REPO="OCA/OCB" LINT_CHECK="0" virtualenv: system_site_packages: true @@ -18,7 +19,6 @@ install: - git clone https://github.com/OCA/stock-logistics-barcode -b ${VERSION} $HOME/stock-logistics-barcode script: - - travis_run_flake8 - travis_run_tests after_success: diff --git a/stock_lot_valuation/stock.py b/stock_lot_valuation/stock.py index c51794b09..e8a54198a 100644 --- a/stock_lot_valuation/stock.py +++ b/stock_lot_valuation/stock.py @@ -61,10 +61,8 @@ class stock_production_lot(orm.Model): currency_id = False if lot.company_id and lot.company_id.currency_id: currency_id = lot.company_id.currency_id.id - elif ( - lot.product_id.company_id - and lot.product_id.company_id.currency_id - ): + elif (lot.product_id.company_id and + lot.product_id.company_id.currency_id): currency_id = lot.product_id.company_id.currency_id.id if currency_id: res[lot.id] = self.pool.get('res.currency').compute( @@ -134,10 +132,8 @@ class stock_production_lot(orm.Model): # Accounting Entries # product = lot.product_id - if ( - not journal_id - and product.categ_id.property_stock_journal - ): + if (not journal_id and + product.categ_id.property_stock_journal): journal_id = product.categ_id.property_stock_journal.id if not journal_id: raise orm.except_orm( @@ -287,8 +283,8 @@ class stock_picking(orm.Model): # Get the standard price amount_unit = lot.price_get(context=context)[lot.id] new_std_price = ( - ((amount_unit * lot.stock_available) - + (new_price * qty)) / (lot.stock_available + qty) + ((amount_unit * lot.stock_available) + + (new_price * qty)) / (lot.stock_available + qty) ) lot_obj.write( @@ -323,10 +319,8 @@ class stock_picking(orm.Model): ): self.compute_price( cr, uid, partial_datas, move, context=context) - if ( - move.product_id.lot_valuation and product_price - and not lot.standard_price - ): + if (move.product_id.lot_valuation and product_price and + not lot.standard_price): new_price = currency_obj.compute( cr, uid, product_currency, move.company_id.currency_id.id, product_price) diff --git a/stock_optional_valuation/stock.py b/stock_optional_valuation/stock.py index aa66a7efc..f7f78454a 100644 --- a/stock_optional_valuation/stock.py +++ b/stock_optional_valuation/stock.py @@ -39,9 +39,9 @@ class stock_move(orm.Model): _super = super(stock_move, self) location = move.location_id location_dest = move.location_dest_id - if (location.company_id - and location_dest.company_id - and location.company_id != location_dest.company_id): + if (location.company_id and + location_dest.company_id and + location.company_id != location_dest.company_id): return _super._create_product_valuation_moves( cr, uid, move, context=context) if (move.location_id.usage == 'internal' or