[MERGE]: Merged with lp:openobject-addons

bzr revid: atp@tinyerp.com-20120907045501-t1z6sl9nhogfuksz
This commit is contained in:
Atul Patel (OpenERP)
2012-09-07 10:25:01 +05:30
62 changed files with 554 additions and 145 deletions
+2 -2
View File
@@ -111,7 +111,7 @@ class account_payment_term_line(osv.osv):
'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
"If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True),
'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True, ondelete='cascade'),
}
_defaults = {
'value': 'balance',
@@ -1375,7 +1375,7 @@ class account_move(osv.osv):
balance = 0.0
for line in line_ids:
if line[2]:
balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00)
balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00)))
return {'value': {'balance': balance}}
def write(self, cr, uid, ids, vals, context=None):
-1
View File
@@ -29,7 +29,6 @@
<form string="Account Board" version="7.0">
<board style="2-1">
<column>
<action name="%(account.action_invoice_tree1)d" creatable="true" string="Draft Customer Invoices" domain="[('state','in',('draft','proforma2')), ('type','=','out_invoice')]"/>
<action name="%(action_company_analysis_tree)d" string="Company Analysis"/>
</column>
<column>
@@ -30,9 +30,11 @@ class account_common_report(osv.osv_memory):
_description = "Account Common Report"
def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None):
res = {}
if chart_account_id:
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
return {'value': {'company_id': company_id}}
res['value'] = {'company_id': company_id}
return res
_columns = {
'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
+1 -3
View File
@@ -28,9 +28,7 @@
Lets the user create a custom dashboard.
========================================
This module also creates the Administration Dashboard.
The user can also publish notes.
Allows users to create custom dashboard.
""",
'author': 'OpenERP SA',
'depends': ['base'],
+3
View File
@@ -0,0 +1,3 @@
dashboard.css: dashboard.sass
sass --trace -t expanded dashboard.sass dashboard.css
@@ -5,6 +5,11 @@
.openerp .oe_dashboard {
width: 100%;
}
.openerp .oe_dashboard .oe_dashboard_layout_selector ul, .openerp .oe_dashboard .oe_dashboard_layout_selector li {
margin: 0;
padding: 0;
list-style-type: none;
}
.openerp .oe_dashboard .oe_action {
margin: 0 8px 8px 0;
background-color: white;
@@ -14,6 +14,11 @@
margin: 0 4px 6px 0
.oe_dashboard
width: 100%
.oe_dashboard_layout_selector
ul, li
margin: 0
padding: 0
list-style-type: none
.oe_action
margin: 0 8px 8px 0
background-color: white
+1 -1
View File
@@ -36,7 +36,7 @@
</div>
</t>
<t t-name="DashBoard.layouts">
<div class="oe_dashboard_layout_selector oe_semantic_html_override">
<div class="oe_dashboard_layout_selector">
<p>
<strong>Choose dashboard layout</strong>
</p>
+1 -19
View File
@@ -2,22 +2,6 @@
<openerp>
<data>
<!-- CRM dashboard -->
<record model="ir.actions.act_window" id="act_my_oppor">
<field name="name">My Opportunities</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree</field>
<field name="domain">[('user_id','=',uid),('type', '=', 'opportunity'),('state','not in',('cancel','done'))]</field>
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
</record>
<record model="ir.actions.act_window" id="act_crm_tag_tree_view_leads_all">
<field name="name">New Leads</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree</field>
<field name="domain">[('user_id','=',uid),('state','=','draft'),('type','=','lead')]</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_stage_graph">
<field name="name">Opportunities By Stage - Graph</field>
<field name="model">crm.lead.report</field>
@@ -70,11 +54,9 @@
<form string="Statistics Dashboard" version="7.0">
<board style="1-1">
<column>
<action string="New Leads" name="%(act_crm_tag_tree_view_leads_all)d"/>
<action string="My Opportunities" name="%(act_my_oppor)d"/>
<action string="Planned Revenue by Stage and User" name="%(act_oppor_stage_user)d"/>
</column>
<column>
<action string="Planned Revenue by Stage and User" name="%(act_oppor_stage_user)d"/>
<action string="Opportunities by Stage" name="%(act_opportunity_stage)d"/>
</column>
</board>
+9 -4
View File
@@ -87,8 +87,8 @@ class crm_lead(base_stage, osv.osv):
search_domain = []
section_id = self._resolve_section_id_from_context(cr, uid, context=context)
if section_id:
search_domain += ['|', '&', ('section_ids', '=', section_id), ('fold', '=', False)]
search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)]
search_domain += ['|', ('section_ids', '=', section_id)]
search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)]
# retrieve type from the context (if set: choose 'type' or 'both')
type = self._resolve_type_from_context(cr, uid, context=context)
if type:
@@ -98,7 +98,12 @@ class crm_lead(base_stage, osv.osv):
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
return result
fold = {}
for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
fold[stage.id] = stage.fold or False
return result, fold
_group_by_full = {
'stage_id': _read_group_stage_ids
@@ -200,7 +205,7 @@ class crm_lead(base_stage, osv.osv):
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage',
domain="['&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"),
domain="['&', ('fold', '=', False), '&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"),
'user_id': fields.many2one('res.users', 'Salesperson'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
+1 -1
View File
@@ -55,7 +55,7 @@
<record model="crm.case.stage" id="stage_lead7">
<field name="name">Dead</field>
<field eval="1" name="case_default"/>
<field eval="True" name="fold"/>
<field eval="False" name="fold"/>
<field name="state">cancel</field>
<field eval="'0'" name="probability"/>
<field eval="'16'" name="sequence"/>
+3 -13
View File
@@ -257,7 +257,7 @@
<field name="stage_id"/>
<field name="user_id" invisible="1"/>
<field name="section_id" invisible="context.get('invisible_section', True)" />
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="channel_id" invisible="1"/>
@@ -297,17 +297,9 @@
<field name="message_summary"/>
<field name="message_unread"/>
<templates>
<t t-name="lead_details">
<ul class="oe_kanban_tooltip oe_semantic_html_override">
<li t-if="record.phone.raw_value"><b>Phone:</b> <field name="phone"/></li>
<li><b>Probability:</b> <field name="probability"/>%%</li>
<li><b>Creation date:</b> <field name="create_date"/></li>
<li t-if="record.date_deadline.raw_value"><b>Date Deadline:</b> <field name="date_deadline"/></li>
</ul>
</t>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban oe_semantic_html_override">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
@@ -382,7 +374,6 @@
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<separator orientation="vertical"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Creation" help="Create date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
</group>
<group string="Display">
@@ -511,7 +502,7 @@
<field name="day_open" groups="base.group_no_one"/>
<field name="day_close" groups="base.group_no_one"/>
<field name="referred"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="type" invisible="1"/>
</group>
<group string="References">
@@ -595,7 +586,6 @@
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
</group>
@@ -105,21 +105,11 @@
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Stage" name="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" />
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'creation_year'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'creation_month'}"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'creation_day'}"/>
<filter string="Exp. Closing" icon="terp-go-month" domain="[]" context="{'group_by':'deadline_month'}"/>
<filter string="Campaign" icon="terp-gtk-jump-to-rtl"
domain="[]" context="{'group_by':'type_id'}" />
<filter string="Channel" icon="terp-call-start"
domain="[]" context="{'group_by':'channel_id'}" />
<separator orientation="vertical" />
<filter string="Status" icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical" />
<filter string="Year" icon="terp-go-year"
domain="[]" context="{'group_by':'creation_year'}"/>
<filter string="Month" icon="terp-go-month"
+1 -1
View File
@@ -50,9 +50,9 @@
parent="base.menu_aftersale" action="crm_case_categ_claim0" sequence="1"/>
<!-- Claim Stages -->
<menuitem id="base.menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
<menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1"/>
<menuitem id="menu_claim_stage_view" name="Claim Stages" action="crm_claim_stage_act" parent="base.menu_project_config_project" sequence="20"/>
<menuitem id="base.menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
</data>
</openerp>
-3
View File
@@ -8,9 +8,6 @@
<form string="Document board" version="7.0">
<board style="2-1" >
<column>
<action string="New Files"
name="%(document.action_view_all_document_tree1)d"
view_mode="tree,form"/>
<action string="Files by Month"
name="%(document.action_view_files_by_month_graph)d"
view_mode="graph,tree"/>
+1 -1
View File
@@ -151,7 +151,7 @@
reference <strong><t t-esc="doc.internal_number"/></strong> on the transfer:
<br/><br/>
</p>
<ul class="oe_edi_nested_block_pay oe_edi_pay_wire_nested oe_semantic_html_override">
<ul class="oe_edi_nested_block_pay oe_edi_pay_wire_nested">
<t t-foreach="doc.company_address.bank_ids" t-as="bank_info">
<li><t t-esc="bank_info[1]"/></li>
</t>
@@ -151,7 +151,7 @@
reference <strong><t t-esc="doc.name"/></strong> on the transfer:
<br/><br/>
</p>
<ul class="oe_edi_nested_block_pay oe_edi_pay_wire_nested oe_semantic_html_override">
<ul class="oe_edi_nested_block_pay oe_edi_pay_wire_nested">
<t t-foreach="doc.company_address.bank_ids" t-as="bank_info">
<li><t t-esc="bank_info[1]"/></li>
</t>
-1
View File
@@ -50,7 +50,6 @@
<board style="2-1">
<column>
<action string="Next Events" name="%(act_event_view)d"/>
<action string="New Registrations" name="%(act_event_view_registration)d"/>
</column>
<column>
<action string="Events Filling By Status" name="%(act_event_reg)d"/>
+6 -2
View File
@@ -37,8 +37,8 @@ class event_type(osv.osv):
}
_defaults = {
'default_registration_min': 0,
'default_registration_max':0,
}
'default_registration_max': 0,
}
event_type()
@@ -52,6 +52,10 @@ class event_event(osv.osv):
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
if isinstance(ids, (long, int)):
ids = [ids]
res = []
for record in self.browse(cr, uid, ids, context=context):
date = record.date_begin.split(" ")[0]
+1 -1
View File
@@ -128,7 +128,7 @@
<field name="last_login"/>
<templates>
<t t-name="kanban-box">
<div class="oe_employee_vignette oe_semantic_html_override">
<div class="oe_employee_vignette">
<div class="oe_employee_image">
<a type="open"><img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)" class="oe_employee_picture"/></a>
</div>
+1
View File
@@ -65,4 +65,5 @@
.oe_employee_details li {
margin: 2px 0;
padding: 0;
}
+8 -4
View File
@@ -131,13 +131,17 @@ class hr_applicant(base_stage, osv.Model):
department_id = self._resolve_department_id_from_context(cr, uid, context=context)
search_domain = []
if department_id:
search_domain += ['|', '&', ('department_id', '=', department_id), ('fold', '=', False)]
search_domain += ['|', ('id', 'in', ids), '&', ('department_id', '=', False), ('fold', '=', False)]
search_domain += ['|', ('department_id', '=', department_id)]
search_domain += ['|', ('id', 'in', ids), ('department_id', '=', False)]
stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
return result
fold = {}
for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
fold[stage.id] = stage.fold or False
return result, fold
def _compute_day(self, cr, uid, ids, fields, args, context=None):
"""
@@ -182,7 +186,7 @@ class hr_applicant(base_stage, osv.Model):
'create_date': fields.datetime('Creation Date', readonly=True, select=True),
'write_date': fields.datetime('Update Date', readonly=True),
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage',
domain="['|', ('department_id', '=', department_id), ('department_id', '=', False)]"),
domain="['&', ('fold', '=', False), '|', ('department_id', '=', department_id), ('department_id', '=', False)]"),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=AVAILABLE_STATES, string="State", readonly=True,
help='The state is set to \'Draft\', when a case is created.\
+12 -8
View File
@@ -95,7 +95,7 @@
<field name="availability" invisible="1"/>
<field name="department_id" invisible="context.get('invisible_department', True)"/>
<field name="user_id"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
@@ -107,7 +107,7 @@
<form string="Jobs - Recruitment Form" version="7.0">
<header>
<button name="case_close_with_emp" string="Hire" type="object"
states="open,pending" class="oe_highlight"/>
states="draft,open,pending" class="oe_highlight"/>
<button name="case_cancel" string="Refuse" type="object"
states="draft,open,pending" class="oe_highlight"/>
<field name="stage_id" widget="statusbar" clickable="True"/>
@@ -228,7 +228,6 @@
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'availability'}"/>
<filter string="Appreciation" icon="terp-face-plain" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Source" icon="terp-face-plain" domain="[]" context="{'group_by':'source_id'}"/>
<filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
</group>
@@ -271,7 +270,7 @@
<field name="categ_ids"/>
<templates>
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip oe_semantic_html_override">
<ul class="oe_kanban_tooltip">
<li t-if="record.type_id.raw_value"><b>Degree:</b> <field name="type_id"/></li>
<li t-if="record.partner_id.raw_value"><b>Contact:</b> <field name="partner_id"/></li>
<li t-if="record.department_id.raw_value"><b>Departement:</b> <field name="department_id"/></li>
@@ -376,10 +375,15 @@
<field name="arch" type="xml">
<form string="Stage" version="7.0">
<group string="Stage Definition">
<field name="name"/>
<field name="department_id"/>
<field name="sequence"/>
<field name="state"/>
<group>
<field name="name"/>
<field name="department_id"/>
</group>
<group>
<field name="state"/>
<field name="sequence"/>
<field name="fold"/>
</group>
</group>
<separator string="Requirements"/>
<field name="requirements"/>
@@ -71,7 +71,6 @@
<filter string="Department" name="department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Degree" name="degree" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Day" name = "day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}" help="Creation Date"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" help="Creation Date"/>
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'year'}" help="Creation Date"/>
@@ -442,8 +442,10 @@ class hr_timesheet_sheet(osv.osv):
return True
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
if not ids:
return []
if isinstance(ids, (long, int)):
ids = [ids]
return [(r['id'], r['date_from'] + ' - ' + r['date_to']) \
for r in self.read(cr, uid, ids, ['date_from', 'date_to'],
context=context, load='_classic_write')]
-1
View File
@@ -9,7 +9,6 @@
<board style="2-1">
<column>
<action name="%(procurement.procurement_exceptions)d" string="Procurements in Exception" domain="[('state','=','exception')]"/>
<action name="%(mrp.mrp_production_action2)d" string="Next Production Orders" creatable="true"/>
</column>
<column>
<action name="%(mrp.action_report_in_out_picking_tree)d" string="Stock Value Variation"/>
+6 -2
View File
@@ -64,11 +64,15 @@ class note_note(osv.osv):
stage_obj = self.pool.get('note.stage')
# only show stage groups not folded and owned by user
search_domain = [('fold', '=', False),('user_id', '=', uid)]
search_domain = [('user_id', '=', uid)]
stage_ids = stage_obj._search(cr, uid, search_domain, order=self._order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
return result
fold = {}
for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
fold[stage.id] = stage.fold or False
return result, fold
_columns = {
'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type="text"),
+1 -1
View File
@@ -19,7 +19,7 @@
<separator string="Installation and Configuration Steps"/>
<p>Click on the link above to download the installer for either 32 or 64 bits, and execute it.</p>
<p>System requirements:</p>
<ul class="oe_semantic_html_override">
<ul>
<li>1. MS Outlook 2005 or above.</li>
<li>2. MS .Net Framework 3.5 or above.</li>
</ul>
@@ -20,7 +20,7 @@
</group>
<separator string="Installation and Configuration Steps"/>
<p>Thunderbird plugin installation:</p>
<ul class="oe_semantic_html_override">
<ul>
<li>1. Save the Thunderbird plug-in.</li>
<li>2. From the Thunderbird menubar: Tools ­> Add-ons -> Screwdriver/Wrench Icon -> Install add-on from file...</li>
<li>3. Select the plug-in (the file named openerp_plugin.xpi).</li>
@@ -20,6 +20,12 @@
user-select: none;
}
.point-of-sale ul, .point-of-sale li {
margin: 0;
padding: 0;
list-style-type: none;
}
.point-of-sale .shadow-top{
position: absolute;
top:0;
+1 -1
View File
@@ -4,7 +4,7 @@
<templates id="template" xml:space="preserve">
<t t-name="PosWidget">
<div class="point-of-sale oe_semantic_html_override">
<div class="point-of-sale">
<div id="topheader">
<div id="branding">
<img src="/point_of_sale/static/src/img/logo.png" />
+2 -2
View File
@@ -40,14 +40,14 @@
<templates>
<t t-name="kanban-box">
<h4><field name="name"/></h4>
<ul class="oe_portal_crm_address oe_semantic_html_override">
<ul class="oe_portal_crm_address">
<li t-if="record.street"><field name="street"/></li>
<li t-if="record.street2"><field name="street2"/></li>
<li t-if="record.zip"><field name="zip"/></li>
<li t-if="record.city"><field name="city"/></li>
<li t-if="record.country_id"><field name="country_id"/></li>
</ul>
<ul class="oe_portal_crm_contact_info oe_semantic_html_override">
<ul class="oe_portal_crm_contact_info">
<li t-if="record.phone"><field name="phone"/></li>
<li t-if="record.email.raw_value">
<a title="Mail" t-att-href="'mailto:'+record.email.value">
@@ -32,7 +32,7 @@
<templates>
<t t-name="kanban-box">
<div class="oe_employee_vignette oe_semantic_html_override">
<div class="oe_employee_vignette">
<div class="oe_employee_image">
<img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/>
</div>
@@ -12,3 +12,9 @@
width: 65px;
height: 65px;
}
.openerp .oe_employee_vignette ul, .openerp .oe_employee_vignette li {
margin: 0;
padding: 0;
list-style: none;
}
+10
View File
@@ -45,5 +45,15 @@ This module shows the basic processes involved in the selected modules and in th
'auto_install': False,
'certificate': '0055447636669',
'images': ['images/process_nodes.jpeg','images/process_transitions.jpeg', 'images/processes.jpeg'],
'js': [
'static/src/js/process.js'
],
'css': [
'static/src/css/process.css'
],
'qweb': [
'static/src/xml/*.xml'
],
'auto_install': True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -195,8 +195,8 @@ class process_process(osv.osv):
if nodes[nid].get('directory_id', False):
resource['directory'] = self.pool.get('document.directory').get_resource_path(cr, uid, nodes[nid]['directory_id'], ref_model, ref_id)
resource['name'] = refobj.name_get(context)[0][1]
resource['perm'] = pool.get(ref_model).perm_read(cr, uid, [ref_id], context)[0]
resource['name'] = pool.get(ref_model).name_get(cr, uid, [ref_id], context=context)[0][1]
resource['perm'] = pool.get(ref_model).perm_read(cr, uid, [ref_id], context=context)[0]
for r in relatives:
node = nodes[r]
+70
View File
@@ -0,0 +1,70 @@
a.cta-a {
float: left;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background: #eeeded url(/process/static/src/img/cta-a.gif) repeat-x;
box-shadow: 0 1px 0 #fff;
-moz-box-shadow: 0 1px 0 #fff;
-webkit-box-shadow: 0 1px 0 #fff;
color: #8c8c8c;
font-size: 0.9em;
text-transform: uppercase;
font-weight: bold;
text-shadow: #fff 0 1px 0;
margin: 2px;
}
a.cta-a span {
float: left;
padding: 7px 0 5px 5px;
background-position: 0 50%;
background-repeat: no-repeat;
cursor: pointer;
}
a.cta-a strong {
display: block;
color: #393939;
}
.process-links {
padding: 5px 10px;
text-align: center;
display: table;
margin: auto;
}
.process-links a.cta-a {
display: table-cell;
}
.process_canvas{
border: 1px solid #aaa;
background-color:#FFF;
}
.process_canvas svg{
height:500px;!important;
padding:15px;
}
.oe_process {
height: 20px;
margin-top:3px;
padding: 0;
width: 24px;
cursor: pointer;
display: block;
background: url(/web/static/src/img/iconset-a-help.png) no-repeat center center;
float: left;
}
.process-help-text {
float: left;
padding:5px 10px;
min-height:56px;
font-size: 120%;
}
td.process_fields,button.toggle_fields span:last-child {
display: none;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

+249
View File
@@ -0,0 +1,249 @@
openerp.process = function (instance) {
var QWeb = instance.web.qweb,
_t = instance.web._t;
instance.web.ViewManager.include({
start: function() {
var self = this;
var _super = this._super();
this.process_help = this.action ? this.action.help : '';
self.process_help = $(this.process_help).text();
if(this.action) {
this.process_model = this.action.res_model;
} else {
this.process_model = this.dataset.model;
}
this.$el.on('click', '.oe_process', function(ev) { self.initialize_process_view(ev);});
return _super;
},
initialize_process_view: function(ev) {
var self = this;
this.record_id = false;
if(this.active_view == 'form') {
this.record_id = this.views[this.active_view].controller.datarecord.id;
}
this.process_get_object().pipe(function(process) {
if(process && process.length) {
if(process.length > 1) {
self.process_selection = process;
} else {
self.process_id = process[0][0],
self.process_title = process[0][1];
}
}
return $.Deferred().resolve();
}).pipe(function() {
var def = $.Deferred();
if(self.process_id) {
$.when(self.process_graph_get()).done(function(res) {
self.process_notes = res.notes;
self.process_title = res.name;
self.process_subflows = _(res.nodes).chain()
.filter(function (node) { return node['subflow'] !== false; })
.uniq(false, function (node) { return node['subflow'][0]; }).value();
self.process_related = res.related;
def.resolve(res);
});
} else def.resolve();
return def.promise();
}).done(function(res) {
$.when(self.process_render_view()).done(function() {
if(res) {
self.process_draw_graph(res);
}
});
});
},
process_graph_get: function() {
var self = this;
var def = $.Deferred();
this.process_id = parseInt(this.process_id, 10);
this.process_dataset
.call("graph_get",[self.process_id, self.model || self.dataset.model, self.record_id, [80,80,150,100], self.session.user_context])
.done(function(res) {
self.process_dataset
.call("search_by_model",[self.model || self.dataset.model, self.session.user_context])
.done(
function(r) {
res['related'] = r;
def.resolve(res);
});
});
return def.promise();
},
process_get_object : function() {
var self = this,
def = $.Deferred();
if(this.process_id)
return def.resolve().promise();
this.process_dataset = new instance.web.DataSet(self, "process.process", self.session.user_context);
this.process_dataset
.call("search_by_model", [self.process_model,self.session.user_context])
.done(function(res) {
if (!res.length) {
self.process_model = false;
self.process_get_object().done(def.resolve);
}
else {
def.resolve(res);
}
})
.fail(def.reject);
return def.promise();
},
process_render_view : function() {
var self = this;
this.$el.html(QWeb.render("process.ProcessView", this));
this.$el.addClass('oe_view_process').css({'background-color':'#F0EEEE'});
this.$el.find('#edit_process').click(function() {
self.process_edit_view();
});
var $parent = this.getParent().$el;
$parent.find('#change_process').click(function() {
self.process_selection = false,
self.process_id = $parent.find('#select_process').val(),
self.process_title = $.trim($parent.find('#select_process option:selected').text());
self.initialize_process_view();
});
this.$el.find(".process_subflow").click(function() {
self.process_id = this.id;
self.initialize_process_view();
});
},
process_draw_graph : function(result) {
var self = this;
var res_nodes = result['nodes'];
var res_edges = result['transitions'];
var id_to_node = {};
var canvas = $('div.process_canvas').empty().get(0);
var style = {
edge_color: "#A0A0A0",
edge_label_font_size: 10,
edge_width: 2,
edge_spacing: 40,
edge_loop_radius: 200,
node_label_color: "#333",
node_label_font_size: 12,
node_outline_color: "#333",
node_outline_width: 1,
node_outline_color: "#F5F5F5",
node_outline_width: 0,
node_selected_width: 0,
node_size_x: 150,
node_size_y: 100,
gray: "#DCDCDC",
white: "#FFF",
viewport_margin: 50
};
var r = new Raphael(canvas,'100%','100%');
var graph = new CuteGraph(r,style,canvas.parentNode);
var render_process = function(r,nodes){
//For Image
var image_node = nodes.kind == "subflow" ? "node-subflow" : "node";
image_node = nodes.gray ? image_node + "-gray" : image_node;
image_node = nodes.active ? 'node-current': image_node;
var img_src = '/web_process/static/src/img/'+ image_node + '.png';
var image = r['image'](img_src, nodes.x-25, nodes.y,150, 100).attr({"cursor": "default"}) .mousedown(function() { return false; });
//For Node
var process_node = r['rect'](nodes.x, nodes.y, 150, 150).attr({stroke: "none"});
// Node text
if(nodes.name.length > 18){
var text = nodes.name.substr(0,16) + '...'
}
var node_text = r.text(nodes.x+60, nodes.y+10,(text || nodes.name.substr(0,18))).attr({"fill": "#fff","font-weight": "bold", "cursor": "default","title":nodes.name});
//Node Description
var new_notes = nodes.notes;
if(nodes.notes.length > 25) {
var to;
var temp_str = new_notes = '';
var from = to = 0;
while (1) {
from = 25;
temp_str = nodes.notes.substr(to, 25);
if (temp_str.lastIndexOf(" ") < 25 && temp_str.length >= 25) {
from = temp_str.lastIndexOf(" ");
}
new_notes += "\n" + nodes.notes.substr(to, from);
if (new_notes.length > 80){
break;
}
to += from;
}
}
if(nodes.res)
new_notes = nodes.res.name + '\n' + new_notes;
if(nodes.notes.length > 60){
var notes = new_notes.substring(0,60) +'..';
}
r.text(nodes.x+60, nodes.y+30, (notes || new_notes)).attr({"title":nodes.notes,"cursor": "default"});
if(nodes.menu) {
r['image']('/web/static/src/img/icons/gtk-jump-to.png', nodes.x+100, nodes.y+75, 16, 16)
.attr({"cursor": "pointer", "title": nodes.menu.name})
.click(function() {
self.process_jump_to_view(nodes.res_model, nodes.menu.id);
});
}
var process_set =r.set().push(process_node);
process_set.mousedown(function() {
return false;
});
return process_set;
}
_.each(res_nodes, function(node,id) {
node['res_model'] = self.model,
node['res_id'] = false,
node['color'] = 'gray'
var n = new CuteNode(
graph,
node.x + 50, //FIXME the +50 should be in the layout algorithm
node.y + 50,
CuteGraph.wordwrap("", 14));
n.id = id;
id_to_node[id] = n;
return render_process(r,node);
});
_.each(res_edges, function(edge) {
var e = new CuteEdge(
graph,
CuteGraph.wordwrap(" ",0),
id_to_node[edge.source],
id_to_node[edge.target] || id_to_node[edge.source]);
e.id = edge.id;
});
},
process_jump_to_view: function(model,id) {
var self = this;
var dataset = new instance.web.DataSet(this, 'ir.values', this.session.user_context);
var action_manager = new instance.web.ActionManager(self);
dataset.call('get',
['action', 'tree_but_open',[['ir.ui.menu', id]], dataset.context],
function(res) {
var action = res[0][res[0].length - 1];
self.rpc("/web/action/load", {
action_id: action.id,
context: dataset.context
}, function(result) {
action_manager.replace(self.$el);
action_manager.do_action(result.result);
})
});
},
process_edit_view: function() {
var self = this;
var pop = new instance.web.form.FormOpenPopup(self);
pop.show_element(
self.process_dataset.model,
self.process_id,
self.context || self.dataset.context,
{
title: _t('Process')
});
var form_controller = pop.view_form;
pop.on_write_completed.add_last(function() {
self.initialize_process_view();
});
}
});
};
// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
+93
View File
@@ -0,0 +1,93 @@
<template>
<!-- vim:fdl=1:
-->
<t t-extend="ViewManagerAction">
<t t-jquery="h2.oe_view_title" t-operation="after">
<t t-if="widget.session.debug &amp;&amp; widget.flags.display_title !== false">
<a class="oe_process" title="Process View" href="javascript: void(0)"></a>
</t>
</t>
</t>
<t t-name="process.ProcessView">
<table class="view" border="0" width="auto" height="auto" cellpadding="0" cellspacing="0">
<tr>
<td width="70%" valign="top" class="fields collapsed">
<div class="oe_view_manager oe_view_manager_current">
<div class="oe_view_manager_header" style="padding: 8px;">
<div class="oe_header_row">
<h2 class="oe_view_title">
<span class="oe_view_title_text oe_breadcrumb_title"><t t-esc="action.name"/> (<t t-esc="action.res_model"/>)</span>
</h2>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td style="padding-left:10px;">
<p><t t-esc="process_help"/></p>
</td>
</tr>
<tr>
<td style="padding-left:10px;">
<h2> <t t-esc="process_title"/> Process </h2>
<t t-if="process_notes">
<p>
<strong>Notes:</strong> <t t-esc="process_notes"/>
</p>
<p>
<strong>Last modified by:</strong> N/A
</p>
<t t-if="process_subflows.length">
<strong>Subflows:</strong>
<t t-foreach="process_subflows" t-as="subflow">
<t t-if="subflow.subflow[0] != process_id">
<p>
<a class="oe_bold process_subflow" t-att-id="subflow.subflow[0]" href="javascript: void(0)">
<t t-esc="subflow.subflow[1]"/>
</a>
</p>
</t>
</t>
</t>
<t t-if="process_related.length and process_related[0][0] != process_id">
<strong>Related:</strong>
<p>
<a class="oe_bold process_subflow" t-att-id="process_related[0][0]" href="javascript: void(0)">
<t t-esc="process_related[0][1]"/>
</a>
</p>
</t>
</t>
</td>
</tr>
<tr t-if="process_selection">
<td style="padding-left:10px;">
<fieldset>
<legend>
Select Process
</legend>
<select id="select_process">
<t t-foreach="process_selection" t-as="prc">
<option t-att-value="prc[0]">
<t t-esc="prc[1]"/>
</option>
</t>
</select>
<button class="oe_button oe_highlight" id="change_process">Select</button>
</fieldset>
</td>
</tr>
<tr t-if="process_id">
<td>
<div class="process_canvas"></div>
</td>
</tr>
<tr t-if="process_id">
<td style="padding-left:10px;">
<button class="oe_button oe_highlight" id="edit_process">Edit Process</button>
</td>
</tr>
</table>
</t>
</template>
+1 -1
View File
@@ -16,7 +16,7 @@
<field name="effective_hours" widget="float_time"/>
<field name="progress" widget="progressbar"/>
<field name="stage_id" invisible="context.get('set_visible',False)"/>
<field name="state" invisible="context.get('set_visible',False)" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
+9 -5
View File
@@ -582,13 +582,17 @@ class task(base_stage, osv.osv):
search_domain = []
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
if project_id:
search_domain += ['|', '&', ('project_ids', '=', project_id), ('fold', '=', False)]
search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)]
search_domain += ['|', ('project_ids', '=', project_id)]
search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)]
stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
return result
fold = {}
for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
fold[stage.id] = stage.fold or False
return result, fold
def _read_group_user_id(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
res_users = self.pool.get('res.users')
@@ -605,7 +609,7 @@ class task(base_stage, osv.osv):
result = res_users.name_get(cr, access_rights_uid, ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(ids.index(x[0]), ids.index(y[0])))
return result
return result, {}
_group_by_full = {
'stage_id': _read_group_stage_ids,
@@ -715,7 +719,7 @@ class task(base_stage, osv.osv):
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
'stage_id': fields.many2one('project.task.type', 'Stage',
domain="['|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
domain="['&', ('fold', '=', False), '|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=_TASK_STATE, string="State", readonly=True,
help='The state is set to \'Draft\', when a case is created.\
+6 -7
View File
@@ -232,7 +232,7 @@
<field name="alias_domain"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click oe_semantic_html_override">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
@@ -424,7 +424,7 @@
<button name="%(action_project_task_reevaluate)d" string="Reactivate" type="action"
states="cancelled,done" context="{'button_reactivate':True}"/>
<button name="action_close" string="Done" type="object"
states="draft,open,pending" class="oe_highlight"/>
states="draft,open,pending"/>
<button name="%(action_project_task_delegate)d" string="Delegate" type="action"
states="pending,open,draft" groups="project.group_delegate_task"/>
<button name="do_cancel" string="Cancel" type="object"
@@ -482,7 +482,7 @@
<field name="name"/>
<field name="user_id"/>
<field name="stage_id"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="effective_hours" widget="float_time"/>
<field name="progress" widget="progressbar"/>
<field name="remaining_hours" widget="float_time"/>
@@ -498,7 +498,7 @@
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
</group>
</page>
</notebook>
@@ -533,7 +533,7 @@
<field name="categ_ids"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_semantic_html_override">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
@@ -607,7 +607,7 @@
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
<field name="stage_id" invisible="context.get('set_visible',False)"/>
<field name="state" invisible="context.get('set_visible',False)" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="date_start" invisible="1" groups="base.group_no_one"/>
<field name="date_end" invisible="1" groups="base.group_no_one"/>
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
@@ -674,7 +674,6 @@
<filter string="Users" name="group_user_id" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Project" name="group_project_id" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Deadline" icon="terp-gnome-cpu-frequency-applet+" domain="[]" context="{'group_by':'date_deadline'}"/>
<filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" groups="base.group_no_one"/>
<filter string="End Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_end'}" groups="base.group_no_one"/>
@@ -79,7 +79,6 @@
<filter string="Task" icon="terp-stock_align_left_24" context="{'group_by':'name'}" />
<filter string="Contact" icon="terp-partner" context="{'group_by':'partner_id'}" />
<filter string="Assigned to" name="User" icon="terp-personal" context="{'group_by':'user_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Creation Date"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Creation Date"/>
@@ -6,6 +6,7 @@
width: 250px;
min-height: 160px;
}
.oe_kanban_project_list {
margin: 4px 0;
}
@@ -16,7 +16,7 @@
<field name="version_id" widget="selection"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
<field name="stage_id" widget="selection" readonly="1"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="categ_ids" invisible="1"/>
<field name="task_id" invisible="1"/>
</tree>
+8 -4
View File
@@ -87,14 +87,18 @@ class project_issue(base_stage, osv.osv):
search_domain = []
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
if project_id:
search_domain += ['|', '&', ('project_ids', '=', project_id), ('fold', '=', False)]
search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)]
search_domain += ['|', ('project_ids', '=', project_id)]
search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)]
# perform search
stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
return result
fold = {}
for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
fold[stage.id] = stage.fold or False
return result, fold
def _compute_day(self, cr, uid, ids, fields, args, context=None):
"""
@@ -239,7 +243,7 @@ class project_issue(base_stage, osv.osv):
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'version_id': fields.many2one('project.issue.version', 'Version'),
'stage_id': fields.many2one ('project.task.type', 'Stage',
domain="['|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
domain="['&', ('fold', '=', False), '|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
'project_id':fields.many2one('project.project', 'Project'),
'duration': fields.float('Duration'),
'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
+3 -4
View File
@@ -151,7 +151,7 @@
<field name="id"/>
<field name="active"/>
</group>
<group colspan="4" col="4">
<group colspan="4" col="4" invisible="1">
<separator string="Status" colspan="4"/>
<field name="state" groups="base.group_no_one" string="Status"/>
</group>
@@ -182,7 +182,7 @@
<field name="user_id"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
<field name="stage_id" widget="selection" readonly="1"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="categ_ids" invisible="1"/>
<field name="task_id" invisible="1"/>
</tree>
@@ -212,7 +212,6 @@
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" help="Creation Month"/>
</group>
</search>
@@ -247,7 +246,7 @@
<field name="date_deadline"/>
<templates>
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip oe_semantic_html_override">
<ul class="oe_kanban_tooltip">
<li><b>Project:</b> <field name="project_id"/></li>
<li><b>Category:</b> <field name="categ_ids"/></li>
</ul>
@@ -67,7 +67,6 @@
<filter string="Version" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'version_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}" help="Creation Date"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" help="Creation Date"/>
+3 -26
View File
@@ -14,26 +14,6 @@
</field>
</record>
<record id="action_incoming_product_board" model="ir.actions.act_window">
<field name="name">Incoming Shipments</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','in',('confirmed','assigned')),'|','&amp;',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','in')]</field>
<field name="view_id" ref="stock.view_move_tree_reception_picking"/>
</record>
<record id="action_outgoing_product_board" model="ir.actions.act_window">
<field name="name">Delivery Orders</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','in',('confirmed','assigned')),'|','&amp;',('picking_id','=',False),('location_dest_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','out')]</field>
<field name="view_id" ref="stock.view_move_tree_reception_picking"/>
</record>
<record model="ir.actions.act_window" id="action_stock_incoming_product_delay">
<field name="name">Incoming Products</field>
<field name="res_model">report.stock.move</field>
@@ -57,14 +37,11 @@
<field name="model">board.board</field>
<field name="arch" type="xml">
<form string="Warehouse board" version="7.0">
<board style="2-1">
<column>
<action name="%(action_incoming_product_board)d" string="Incoming Shipments" creatable="true"/>
<action name="%(action_outgoing_product_board)d" string="Delivery Orders" creatable="true"/>
</column>
<board style="1-1">
<column>
<action name="%(action_stock_incoming_product_delay)d" string="Incoming Products"/>
</column>
<column>
<action name="%(action_stock_outgoing_product_delay)d" string="Outgoing Products"/>
</column>
</board>
+1 -1
View File
@@ -44,7 +44,7 @@ class product_product(osv.osv):
], ['product_id'], ['product_id'])
for move in moves:
product_id = move['product_id'][0]
res[product_id]['reception_count'] = move['product_id_count']
res[product_id]['delivery_count'] = move['product_id_count']
return res
def get_product_accounts(self, cr, uid, product_id, context=None):
+1 -1
View File
@@ -200,7 +200,7 @@
<t t-esc="record.delivery_count.value"/> Deliveries
</a>
</xpath>
<ul position="inside" class="oe_semantic_html_override">
<ul position="inside">
<li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
<li t-if="record.type.raw_value != 'service'">Available: <field name="virtual_available"/> <field name="uom_id"/></li>
</ul>
+2 -1
View File
@@ -22,6 +22,7 @@ from pychart import *
import pychart.legend
import time
from report.misc import choice_colors
import tools
#
# Draw a graph for stocks
@@ -41,7 +42,7 @@ class stock_graph(object):
product_name=product_name.replace('/', '//')
if product_id not in self._datas:
self._datas[product_id] = {}
self._names[product_id] = product_name
self._names[product_id] = tools.ustr(product_name)
for (dt,stock) in datas:
if not dt in self._datas[product_id]:
self._datas[product_id][dt]=0
+1 -1
View File
@@ -298,7 +298,7 @@
<field name="color"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_semantic_html_override">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">i</span>
<ul class="oe_dropdown_menu">
@@ -3,7 +3,7 @@
-->
<templates id="template" xml:space="preserve">
<t t-name="Systray.Shortcuts">
<div class="oe_systray_shortcuts oe_topbar_item oe_dropdown_toggle oe_semantic_html_override">
<div class="oe_systray_shortcuts oe_topbar_item oe_dropdown_toggle">
<span class="oe_e oe_star_off">7</span>
<ul class="oe_systray_shortcuts_items oe_dropdown_menu"/>
</div>