diff --git a/addons/account/demo/account_invoice_demo.yml b/addons/account/demo/account_invoice_demo.yml
index a03fdc6818f..be9471405d5 100644
--- a/addons/account/demo/account_invoice_demo.yml
+++ b/addons/account/demo/account_invoice_demo.yml
@@ -10,12 +10,10 @@
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
invoice_line_ids:
- - name: ''
- product_id: product.consu_delivery_02
+ - product_id: product.consu_delivery_02
price_unit: 642.0
quantity: 5
- - name: ''
- product_id: product.consu_delivery_03
+ - product_id: product.consu_delivery_03
price_unit: 280.0
quantity: 5.0
-
@@ -27,12 +25,10 @@
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-08'
invoice_line_ids:
- - name: ''
- product_id: product.consu_delivery_03
+ - product_id: product.consu_delivery_03
price_unit: 50.0
quantity: 3
- - name: ''
- product_id: product.consu_delivery_01
+ - product_id: product.consu_delivery_01
price_unit: 25
quantity: 20
-
@@ -44,12 +40,10 @@
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-08'
invoice_line_ids:
- - name: ''
- product_id: product.consu_delivery_01
+ - product_id: product.consu_delivery_01
price_unit: 90.0
quantity: 5
- - name: ''
- product_id: product.consu_delivery_03
+ - product_id: product.consu_delivery_03
price_unit: 15.0
quantity: 5.0
-
@@ -69,13 +63,11 @@
type: 'in_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
invoice_line_ids:
- - name: ''
- price_unit: 10.0
+ - price_unit: 10.0
quantity: 1.0
product_id: product.product_delivery_01
uom_id: product.product_uom_unit
- - name: ''
- price_unit: 4.0
+ - price_unit: 4.0
quantity: 1.0
product_id: product.product_order_01
uom_id: product.product_uom_unit
diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index f8661ac7e3e..bf13bdc64c3 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -620,6 +620,8 @@ class AccountInvoice(models.Model):
def invoice_line_move_line_get(self):
res = []
for line in self.invoice_line_ids:
+ if line.quantity==0:
+ continue
tax_ids = []
for tax in line.invoice_line_tax_ids:
tax_ids.append((4, tax.id, None))
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 211e31d9b7c..8d576958f58 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -114,18 +114,16 @@ class crm_lead(FormatAddress, osv.osv):
}
def _compute_kanban_state(self, cr, uid, ids, fields, args, context=None):
- """ Very interesting kanban state color. This makes complete sense. Or
- not. """
result = {}
today = date.today()
for lead in self.browse(cr, uid, ids, context=context):
- result[lead.id] = 'grey'
+ result[lead.id] = 'red'
if lead.date_action:
lead_date = datetime.strptime(lead.date_action, tools.DEFAULT_SERVER_DATE_FORMAT).date()
- if lead_date > today:
+ if lead_date >= today:
result[lead.id] = 'green'
elif lead_date < today:
- result[lead.id] = 'red'
+ result[lead.id] = 'grey'
return result
def _compute_day(self, cr, uid, ids, fields, args, context=None):
@@ -174,7 +172,7 @@ class crm_lead(FormatAddress, osv.osv):
select=True, track_visibility='onchange', help='When sending mails, the default email address is taken from the sales team.'),
'kanban_state': fields.function(
_compute_kanban_state, string='Activity State', type="selection",
- selection=[('grey', 'Normal'), ('red', 'Blocked'), ('green', 'Ready for next stage')]),
+ selection=[('grey', 'No next activity planned'), ('red', 'Next activity late'), ('green', 'Next activity is planned')]),
'create_date': fields.datetime('Creation Date', readonly=True),
'email_cc': fields.text('Global CC', help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'description': fields.text('Notes'),
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index d0f78e9cf40..0e6b43ab9d1 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -284,11 +284,16 @@
Recommended activities: