Merge branch 'develop'

develop
Ahmed Aly 2018-09-07 12:49:50 +02:00
commit 9c83258ee8
6 changed files with 15 additions and 19 deletions

View File

@ -8,7 +8,7 @@ db_port = 5432
db_user = False
db_password = False
addons_path = ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons
addons_path = ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons,ext/clarico-addons
; For enterprise use the addons path bellow
; addons_path = ext/enterprise-addons,ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons,dmi/run1
timezone = Europe/Vienna

View File

@ -1,21 +1,14 @@
#!/usr/bin/env bash
if ! $(python -c "import pylint" &> /dev/null); then
echo 'Pylint is not installed and is going to be installed now!'
sudo pip install pylint
else
echo 'Pylint is already installed. Continue ...'
fi
if ! $(python -c "import pylint_odoo" &> /dev/null); then
echo 'The pylint module "pylint-odoo" is not installed and is going to be installed now!'
sudo pip install --upgrade git+https://github.com/oca/pylint-odoo.git
sudo pip3 install --upgrade git+https://github.com/oca/pylint-odoo.git
else
echo 'The pylint module "pylint-odoo" is already installed. Continue ...'
fi
if ! $(python -c "import git_pylint_commit_hook" &> /dev/null); then
echo 'git-pylint-commit-hook is not insalled and is going to be isntalled now!'
sudo pip install git-pylint-commit-hook
sudo pip3 install git-pylint-commit-hook
else
echo 'git-pylint-commit-hook is already installed. Continue ...'
fi

View File

@ -37,7 +37,7 @@ class AccountInvoiceLine(models.Model):
if vals.get('lot_id', False):
vals.update(intrastat_id=self.env['stock.production.lot'].browse(vals['lot_id']).intrastat_id.id)
elif vals.get('product_id', False):
vals.update(intrastat_id=self.env['product.template'].browse(vals['product_id']).intrastat_id.id)
vals.update(intrastat_id=self.env['product.product'].browse(vals['product_id']).intrastat_id.id)
return super(AccountInvoiceLine, self).create(vals)
@api.multi

View File

@ -36,12 +36,14 @@ class StockProductionLot(models.Model):
@api.model
def create(self, vals):
tools.image_resize_images(vals)
if vals.get('image'):
vals.update(tools.image_get_resized_images(vals['image'], return_big=True, return_medium=True, return_small=False))
return super(StockProductionLot, self).create(vals)
@api.multi
def write(self, vals):
tools.image_resize_images(vals)
if vals.get('image'):
vals.update(tools.image_get_resized_images(vals['image'], return_big=True, return_medium=True, return_small=False))
return super(StockProductionLot, self).write(vals)

View File

@ -110,7 +110,7 @@
<p t-if="o.note1">
<span t-field="o.note1"/>
</p>
<table class="table table-condensed">
<table class="table table-condensed" style="background-color: #E6E7E9;">
<t t-set="discount_is_set" t-value="field_set_in_lines(o.order_line, 'discount')"/>
<thead class="table-header">
<tr>
@ -143,8 +143,7 @@
kg
</t>
</td>
<td class="text-right">
</td>
<td class="text-right"/>
<td rowspan="2" class="text-left">
<t t-if="order_line.product_id.default_code and order_line.product_id.material_type_id.print_default_code">
<strong>

View File

@ -23,7 +23,9 @@ class SaleOrderLine(models.Model):
def _inverse_delivery_date(self):
for line in self:
stock_move = self.env['stock.move']
move = stock_move.search([('sale_line_id', '=', line.id), ('state', 'not in', ['cancel'])])
move = stock_move.search([('sale_line_id', '=', line.id), ('state', 'not in', ['cancel', 'done'])])
if move:
move.date = line.delivery_date
move.date_expected = line.delivery_date
move.write({
'date': line.delivery_date,
'date_expected': line.delivery_date
})