[FIX] account: demo data invoice line without required name
[IMP] account: d'ont create journal items for invoice lines with quantity 0 (not amount because of tax) [IMP] crm: usability kanban view and schedule an activity [FIX] crm: schedule an activity bug when no activity yet [IMP] website: app for website (not a menu in website admin)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -284,11 +284,16 @@
|
||||
<span class='oe_kanban_mail_new' title='Unread Messages'><i class='fa fa-comments'/><t t-raw="record.message_needaction_counter.raw_value"/></span>
|
||||
</t>
|
||||
<div>
|
||||
<a name="%(crm.crm_activity_log_action)d" type="action">
|
||||
<a name="%(crm.crm_activity_log_action)d" type="action" t-if="record.kanban_state.raw_value!='red'">
|
||||
<span
|
||||
t-if="record.date_action.raw_value" t-att-title="record.date_action.value + ': '+ record.title_action.value"
|
||||
t-att-title="record.date_action.value + ': '+ record.title_action.value"
|
||||
t-attf-class="oe_kanban_status oe_kanban_status_#{record.kanban_state.raw_value}"/>
|
||||
</a>
|
||||
<a name="%(crm.crm_activity_schedule_action)d" type="action" t-if="record.kanban_state.raw_value=='red'">
|
||||
<span
|
||||
title="No 'next activity' scheduled, click to set one."
|
||||
class="oe_kanban_status oe_kanban_status_red"/>
|
||||
</a>
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ class ActivityLog(models.TransientModel):
|
||||
_rec_name = 'title_action'
|
||||
|
||||
next_activity_id = fields.Many2one('crm.activity', 'Activity')
|
||||
last_activity_id = fields.Many2one('crm.activity', 'Previous Activity')
|
||||
last_activity_id = fields.Many2one('crm.activity', 'Previous Activity', default=False)
|
||||
recommended_activity_id = fields.Many2one("crm.activity", "Recommended Activities")
|
||||
title_action = fields.Char('Summary')
|
||||
note = fields.Html('Note')
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<div>
|
||||
<p><strong>Recommended activities:</strong></p>
|
||||
<field name="recommended_activity_id" widget="radio"
|
||||
domain="[('preceding_activity_ids', 'in', [last_activity_id])]"/>
|
||||
domain="[('preceding_activity_ids', '=', last_activity_id)]"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
@@ -71,4 +71,15 @@
|
||||
<field name="view_id" ref="crm_activity_log_view_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
<record id="crm_activity_schedule_action" model="ir.actions.act_window">
|
||||
<field name="name">Schedule an Activity</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">crm.activity.log</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_activity_log_view_form_schedule"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -87,14 +87,13 @@
|
||||
<field name="target">self</field>
|
||||
</record>
|
||||
|
||||
<data noupdate="0">
|
||||
<record id="menu_website" model="ir.ui.menu">
|
||||
<field name="name">Website</field>
|
||||
<field name="sequence" eval="200"/>
|
||||
<field name="web_icon">website,static/description/icon.png</field>
|
||||
<field name="action" ref="action_website"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="base.open_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_website_tutorial"/>
|
||||
<field name="state">open</field>
|
||||
|
||||
@@ -155,9 +155,6 @@
|
||||
|
||||
<menuitem id="menu_dashboard" name="Dashboard" action="website.backend_dashboard" parent="website.menu_website_configuration" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_website" name="Website" parent="website.menu_website_configuration" sequence="2"/>
|
||||
<menuitem id="menu_website_view" name="View Website" action="website.action_website" parent="website.menu_website"/>
|
||||
|
||||
<menuitem id="menu_website_global_configuration" parent="menu_website_configuration"
|
||||
sequence="100" name="Configuration" groups="base.group_system"/>
|
||||
<menuitem id="menu_website_website_settings" parent="menu_website_global_configuration" name="Settings" action="action_website_configuration"/>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user