[MERGE] forward port branch saas-15 up to d3154e0ef4
@@ -73,6 +73,7 @@ class HrPayrollAdvice(models.Model):
|
|||||||
self.env['hr.payroll.advice.line'].create({
|
self.env['hr.payroll.advice.line'].create({
|
||||||
'advice_id': advice.id,
|
'advice_id': advice.id,
|
||||||
'name': slip.employee_id.bank_account_id.acc_number,
|
'name': slip.employee_id.bank_account_id.acc_number,
|
||||||
|
'ifsc_code': slip.employee_id.bank_account_id.bank_bic or '',
|
||||||
'employee_id': slip.employee_id.id,
|
'employee_id': slip.employee_id.id,
|
||||||
'bysal': payslip_line.total
|
'bysal': payslip_line.total
|
||||||
})
|
})
|
||||||
@@ -147,6 +148,7 @@ class HrPayslipRun(models.Model):
|
|||||||
self.env['hr.payroll.advice.line'].create({
|
self.env['hr.payroll.advice.line'].create({
|
||||||
'advice_id': advice.id,
|
'advice_id': advice.id,
|
||||||
'name': slip.employee_id.bank_account_id.acc_number,
|
'name': slip.employee_id.bank_account_id.acc_number,
|
||||||
|
'ifsc_code': slip.employee_id.bank_account_id.bank_bic or '',
|
||||||
'employee_id': slip.employee_id.id,
|
'employee_id': slip.employee_id.id,
|
||||||
'bysal': payslip_line.total
|
'bysal': payslip_line.total
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ class PurchaseOrder(models.Model):
|
|||||||
moves = order.order_line._create_stock_moves(picking)
|
moves = order.order_line._create_stock_moves(picking)
|
||||||
moves = moves.filtered(lambda x: x.state not in ('done', 'cancel')).action_confirm()
|
moves = moves.filtered(lambda x: x.state not in ('done', 'cancel')).action_confirm()
|
||||||
seq = 0
|
seq = 0
|
||||||
for move in moves:
|
for move in sorted(moves, key=lambda move: move.date_expected):
|
||||||
seq += 5
|
seq += 5
|
||||||
move.sequence = seq
|
move.sequence = seq
|
||||||
moves.force_assign()
|
moves.force_assign()
|
||||||
|
|||||||
@@ -569,7 +569,7 @@
|
|||||||
<group string="Warning when Purchasing this Product" groups="purchase.group_warning_purchase">
|
<group string="Warning when Purchasing this Product" groups="purchase.group_warning_purchase">
|
||||||
<field name="purchase_line_warn" nolabel="1"/>
|
<field name="purchase_line_warn" nolabel="1"/>
|
||||||
<field name="purchase_line_warn_msg" colspan="3" nolabel="1"
|
<field name="purchase_line_warn_msg" colspan="3" nolabel="1"
|
||||||
attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')]}"/>
|
attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')], 'invisible':[('purchase_line_warn','=','no-message')]}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group name="description" position="inside">
|
<group name="description" position="inside">
|
||||||
|
|||||||
@@ -629,7 +629,7 @@
|
|||||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||||
<field name="sale_line_warn" nolabel="1"/>
|
<field name="sale_line_warn" nolabel="1"/>
|
||||||
<field name="sale_line_warn_msg" colspan="3" nolabel="1"
|
<field name="sale_line_warn_msg" colspan="3" nolabel="1"
|
||||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/>
|
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')], 'invisible':[('sale_line_warn','=','no-message')]}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ class SaleOrderLine(models.Model):
|
|||||||
if move.location_dest_id.usage == "customer":
|
if move.location_dest_id.usage == "customer":
|
||||||
if not move.origin_returned_move_id:
|
if not move.origin_returned_move_id:
|
||||||
qty += move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom)
|
qty += move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom)
|
||||||
elif move.location_dest_id.usage == "internal" and move.to_refund:
|
elif move.location_dest_id.usage != "customer" and move.to_refund:
|
||||||
qty -= move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom)
|
qty -= move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom)
|
||||||
return qty
|
return qty
|
||||||
|
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ class ProductTemplate(models.Model):
|
|||||||
def action_view_stock_moves(self):
|
def action_view_stock_moves(self):
|
||||||
products = self.mapped('product_variant_ids')
|
products = self.mapped('product_variant_ids')
|
||||||
action = self.env.ref('stock.act_product_stock_move_open').read()[0]
|
action = self.env.ref('stock.act_product_stock_move_open').read()[0]
|
||||||
if self:
|
if products:
|
||||||
action['context'] = {'default_product_id': products.ids[0]}
|
action['context'] = {'default_product_id': products.ids[0]}
|
||||||
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
|
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
|
||||||
return action
|
return action
|
||||||
|
|||||||
@@ -219,8 +219,11 @@ class StockMove(models.Model):
|
|||||||
|
|
||||||
@api.constrains('product_uom')
|
@api.constrains('product_uom')
|
||||||
def _check_uom(self):
|
def _check_uom(self):
|
||||||
if any(move.product_id.uom_id.category_id.id != move.product_uom.category_id.id for move in self):
|
moves_error = self.filtered(lambda move: move.product_id.uom_id.category_id.id != move.product_uom.category_id.id)
|
||||||
raise UserError(_('You try to move a product using a UoM that is not compatible with the UoM of the product moved. Please use an UoM in the same UoM category.'))
|
if moves_error:
|
||||||
|
user_warning = _('You try to move a product using a UoM that is not compatible with the UoM of the product moved. Please use an UoM in the same UoM category.')
|
||||||
|
user_warning += '\n\nBlocking: %s' % ' ,'.join(moves_error.mapped('name'))
|
||||||
|
raise UserError(user_warning)
|
||||||
|
|
||||||
@api.model_cr
|
@api.model_cr
|
||||||
def init(self):
|
def init(self):
|
||||||
|
|||||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 18 KiB |
@@ -28,66 +28,111 @@
|
|||||||
<record id="slide_0" model="slide.slide">
|
<record id="slide_0" model="slide.slide">
|
||||||
<field name="name">Odoo MRP</field>
|
<field name="name">Odoo MRP</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=QtIU0p8daAo</field>
|
<field name="url">https://www.youtube.com/watch?v=QtIU0p8daAo</field>
|
||||||
|
<field name="document_id">QtIU0p8daAo</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_1"/>
|
<field name="category_id" ref="category_1"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/QtIU0p8daAo.jpg"/>
|
||||||
|
<field name="description">Discover how you can integrate MRP, PLM, Quality and Maintenance in a single application to maximize the efficiency of your manufacturing operations.
|
||||||
|
|
||||||
|
Read more about the features at: https://www.odoo.com/page/manufacturing-features
|
||||||
|
|
||||||
|
Discover Odoo MRP: https://www.odoo.com/page/manufacturing</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_1" model="slide.slide">
|
<record id="slide_1" model="slide.slide">
|
||||||
<field name="name">Odoo CRM</field>
|
<field name="name">Odoo CRM</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=fgdz8MH2YHY</field>
|
<field name="url">https://www.youtube.com/watch?v=fgdz8MH2YHY</field>
|
||||||
|
<field name="document_id">fgdz8MH2YHY</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_1"/>
|
<field name="category_id" ref="category_1"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag1'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag1'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/fgdz8MH2YHY.jpg"/>
|
||||||
|
<field name="description">Discover the CRM sales people love https://www.odoo.com/page/crm</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_2" model="slide.slide">
|
<record id="slide_2" model="slide.slide">
|
||||||
<field name="name">Odoo All-in-One Software Demonstration</field>
|
<field name="name">Odoo All-in-One Software Demonstration</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=tUx39vAENy0</field>
|
<field name="url">https://www.youtube.com/watch?v=tUx39vAENy0</field>
|
||||||
|
<field name="document_id">tUx39vAENy0</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_2"/>
|
<field name="category_id" ref="category_2"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/tUx39vAENy0.jpg"/>
|
||||||
|
<field name="description">Discover the all-in-one business management software solution that fits any business size and use case.
|
||||||
|
|
||||||
|
Learn more at https://odoo.com</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_3" model="slide.slide">
|
<record id="slide_3" model="slide.slide">
|
||||||
<field name="name">Odoo Sign Demonstration</field>
|
<field name="name">Odoo Sign Demonstration</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=8DBabYQ1nUE</field>
|
<field name="url">https://www.youtube.com/watch?v=8DBabYQ1nUE</field>
|
||||||
|
<field name="document_id">8DBabYQ1nUE</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_2"/>
|
<field name="category_id" ref="category_2"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/8DBabYQ1nUE.jpg"/>
|
||||||
|
<field name="description">Stop doing manual printing and scanning. Move to electronic signature with Odoo Sign!
|
||||||
|
|
||||||
|
Discover more at https://www.odoo.com/page/sign</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_5" model="slide.slide">
|
<record id="slide_5" model="slide.slide">
|
||||||
<field name="name">Awesome Timesheet by Odoo</field>
|
<field name="name">Awesome Timesheet by Odoo</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=v2O0YZU19ms</field>
|
<field name="url">https://www.youtube.com/watch?v=v2O0YZU19ms</field>
|
||||||
|
<field name="document_id">v2O0YZU19ms</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_1"/>
|
<field name="category_id" ref="category_1"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/v2O0YZU19ms.jpg"/>
|
||||||
|
<field name="description">Download Awesome Timesheet by Odoo and discover how easy time tracking and employee management can be!
|
||||||
|
|
||||||
|
Chrome: http://bit.ly/2613LcY
|
||||||
|
iOS: http://bit.ly/1ZUZsZD</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_6" model="slide.slide">
|
<record id="slide_6" model="slide.slide">
|
||||||
<field name="name">Odoo Marketing</field>
|
<field name="name">Odoo Marketing</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=sDxfUTd-gs0</field>
|
<field name="url">https://www.youtube.com/watch?v=sDxfUTd-gs0</field>
|
||||||
|
<field name="document_id">sDxfUTd-gs0</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_1"/>
|
<field name="category_id" ref="category_1"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/sDxfUTd-gs0.jpg"/>
|
||||||
|
<field name="description">Discover how easy marketing your business can be with Odoo</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_7" model="slide.slide">
|
<record id="slide_7" model="slide.slide">
|
||||||
<field name="name">Odoo Inventory</field>
|
<field name="name">Odoo Inventory</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=Vp5xqQOWLzE</field>
|
<field name="url">https://www.youtube.com/watch?v=Vp5xqQOWLzE</field>
|
||||||
|
<field name="document_id">Vp5xqQOWLzE</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_1"/>
|
<field name="category_id" ref="category_1"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/Vp5xqQOWLzE.jpg"/>
|
||||||
|
<field name="description">Warehouse management software for the 21st century.
|
||||||
|
|
||||||
|
Discover Odoo Inventory: https://www.odoo.com/page/warehouse</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="slide_8" model="slide.slide">
|
<record id="slide_8" model="slide.slide">
|
||||||
<field name="name">Odoo Sales</field>
|
<field name="name">Odoo Sales</field>
|
||||||
<field name="url">https://www.youtube.com/watch?v=VMuCr5_arsY</field>
|
<field name="url">https://www.youtube.com/watch?v=VMuCr5_arsY</field>
|
||||||
|
<field name="document_id">VMuCr5_arsY</field>
|
||||||
|
<field name="slide_type">video</field>
|
||||||
<field name="channel_id" ref="channel_public"/>
|
<field name="channel_id" ref="channel_public"/>
|
||||||
<field name="category_id" ref="category_1"/>
|
<field name="category_id" ref="category_1"/>
|
||||||
<field name="website_published" eval="True"/>
|
<field name="website_published" eval="True"/>
|
||||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||||
|
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/VMuCr5_arsY.jpg"/>
|
||||||
|
<field name="description">Learn more at https://www.odoo.com/page/sales</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="slide_9" model="slide.slide">
|
<record id="slide_9" model="slide.slide">
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ class Slide(models.Model):
|
|||||||
values['image'] = values['datas']
|
values['image'] = values['datas']
|
||||||
if values.get('website_published') and not values.get('date_published'):
|
if values.get('website_published') and not values.get('date_published'):
|
||||||
values['date_published'] = datetime.datetime.now()
|
values['date_published'] = datetime.datetime.now()
|
||||||
if values.get('url'):
|
if values.get('url') and not values.get('document_id'):
|
||||||
doc_data = self._parse_document_url(values['url']).get('values', dict())
|
doc_data = self._parse_document_url(values['url']).get('values', dict())
|
||||||
for key, value in doc_data.iteritems():
|
for key, value in doc_data.iteritems():
|
||||||
values.setdefault(key, value)
|
values.setdefault(key, value)
|
||||||
@@ -401,7 +401,7 @@ class Slide(models.Model):
|
|||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def write(self, values):
|
def write(self, values):
|
||||||
if values.get('url'):
|
if values.get('url') and values['url'] != self.url:
|
||||||
doc_data = self._parse_document_url(values['url']).get('values', dict())
|
doc_data = self._parse_document_url(values['url']).get('values', dict())
|
||||||
for key, value in doc_data.iteritems():
|
for key, value in doc_data.iteritems():
|
||||||
values.setdefault(key, value)
|
values.setdefault(key, value)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class except_orm(Exception):
|
|||||||
|
|
||||||
class UserError(except_orm):
|
class UserError(except_orm):
|
||||||
def __init__(self, msg):
|
def __init__(self, msg):
|
||||||
super(UserError, self).__init__(msg)
|
super(UserError, self).__init__(msg, value='')
|
||||||
|
|
||||||
|
|
||||||
# deprecated due to collision with builtins, kept for compatibility
|
# deprecated due to collision with builtins, kept for compatibility
|
||||||
|
|||||||