Skip to content

Commit

Permalink
Merge PR #903 into 11.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jul 23, 2019
2 parents 894346d + 85cb26e commit 16b7ba1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sale_elaboration/__manifest__.py
Expand Up @@ -3,7 +3,7 @@
{
'name': 'Sale Elaboration',
'summary': 'Set an elaboration for any sale line',
'version': '11.0.1.0.0',
'version': '11.0.1.0.1',
'development_status': 'Beta',
'category': 'Sale',
'website': 'https://github.com/OCA/sale-workflow',
Expand Down
6 changes: 6 additions & 0 deletions sale_elaboration/models/sale_order.py
Expand Up @@ -70,3 +70,9 @@ def _prepare_invoice_line(self, qty):
if self.is_elaboration:
vals['name'] = '{} - {}'.format(self.order_id.name, self.name)
return vals

@api.onchange('product_id')
def product_id_change(self):
result = super().product_id_change()
self.is_elaboration = self.product_id.is_elaboration
return result
2 changes: 2 additions & 0 deletions sale_elaboration/tests/test_sale_elaboration.py
Expand Up @@ -20,12 +20,14 @@ def setUpClass(cls):
'type': 'service',
'list_price': 50.0,
'invoice_policy': 'order',
'is_elaboration': True,
})
cls.product_elaboration_B = cls.env['product.product'].create({
'name': 'Product Elaboration B',
'type': 'service',
'list_price': 25.0,
'invoice_policy': 'order',
'is_elaboration': True,
})
cls.pricelist = cls.env['product.pricelist'].create({
'name': 'Test pricelist',
Expand Down

0 comments on commit 16b7ba1

Please sign in to comment.