[MERGE]: Merge with lp:openobject-trunk-dev-addons2
bzr revid: ksa@tinyerp.co.in-20100922050131-u4fduka8kjlcwn5a
This commit is contained in:
@@ -2507,8 +2507,6 @@
|
||||
<field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended" />
|
||||
<field name="amount"/>
|
||||
<field context="{'partner_id': partner_id, 'amount': amount, 'account_id': account_id, 'currency_id': parent.currency, 'journal_id': parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field invisible="1" name="reconcile_amount"/>
|
||||
</tree>
|
||||
<form string="Statement lines">
|
||||
<field name="date"/>
|
||||
@@ -2518,7 +2516,6 @@
|
||||
<field domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended" />
|
||||
<field name="amount"/>
|
||||
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field name="ref"/>
|
||||
<field name="sequence"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
|
||||
@@ -2668,10 +2668,10 @@ msgid ""
|
||||
"partners accounts (for debit/credit computations), closed for deprecated "
|
||||
"accounts."
|
||||
msgstr ""
|
||||
"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\r\n"
|
||||
"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\r\n"
|
||||
"Obveze: Salda konta partnera - dobavljači\r\n"
|
||||
"Potraživanja: Salda konta partnera - kupci\r\n"
|
||||
"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\n"
|
||||
"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\n"
|
||||
"Obveze: Salda konta partnera - dobavljači\n"
|
||||
"Potraživanja: Salda konta partnera - kupci\n"
|
||||
"Zatvoren: Za konta koja se više ne koriste"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
<record id="demo_message1" model="notify.message">
|
||||
<field name="name">OpenERP SA</field>
|
||||
<field name="msg">ERP & CRM Solutions....</field>
|
||||
<field name="msg">ERP & CRM Solutions....</field>
|
||||
</record>
|
||||
<record id="demo_message1" model="notify.message">
|
||||
<field name="name">Tiny sprl</field>
|
||||
<field name="msg">Be Expert with the Experts...</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -388,8 +388,9 @@
|
||||
string="Sold" help="Buy object"
|
||||
domain="[('state','=','sold')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Object Name"/>
|
||||
<field name="lot_type"/>
|
||||
<field name="name"/>
|
||||
<field name="ach_uid"/>
|
||||
<field name="bord_vnd_id"/>
|
||||
<field name="state"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
|
||||
@@ -398,10 +398,13 @@ property or property parameter."),
|
||||
"""
|
||||
res = None
|
||||
def ics_datetime(idate, short=False):
|
||||
if short:
|
||||
return date.fromtimestamp(time.mktime(time.strptime(idate, '%Y-%m-%d')))
|
||||
if idate:
|
||||
if short:
|
||||
return date.fromtimestamp(time.mktime(time.strptime(idate, '%Y-%m-%d')))
|
||||
else:
|
||||
return datetime.strptime(idate, '%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
return datetime.strptime(idate, '%Y-%m-%d %H:%M:%S')
|
||||
return False
|
||||
try:
|
||||
# FIXME: why isn't this in CalDAV?
|
||||
import vobject
|
||||
@@ -482,35 +485,37 @@ property or property parameter."),
|
||||
sign = att.sent_by_uid and att.sent_by_uid.signature or ''
|
||||
sign = '<br>'.join(sign and sign.split('\n') or [])
|
||||
res_obj = att.ref
|
||||
sub = res_obj.name
|
||||
att_infos = []
|
||||
other_invitaion_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))])
|
||||
for att2 in self.browse(cr, uid, other_invitaion_ids):
|
||||
att_infos.append(((att2.user_id and att2.user_id.name) or \
|
||||
(att2.partner_id and att2.partner_id.name) or \
|
||||
att2.email) + ' - Status: ' + att2.state.title())
|
||||
body_vals = {'name': res_obj.name,
|
||||
'start_date': res_obj.date,
|
||||
'end_date': res_obj.date_deadline or False,
|
||||
'description': res_obj.description or '-',
|
||||
'location': res_obj.location or '-',
|
||||
'attendees': '<br>'.join(att_infos),
|
||||
'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
|
||||
'sign': sign,
|
||||
'company': company
|
||||
}
|
||||
body = html_invitation % body_vals
|
||||
if mail_to and email_from:
|
||||
attach = self.get_ics_file(cr, uid, res_obj, context=context)
|
||||
tools.email_send(
|
||||
email_from,
|
||||
mail_to,
|
||||
sub,
|
||||
body,
|
||||
attach=attach and [('invitation.ics', attach)] or None,
|
||||
subtype='html',
|
||||
reply_to=email_from
|
||||
)
|
||||
if res_obj:
|
||||
att_infos = []
|
||||
sub = res_obj.name
|
||||
other_invitation_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))])
|
||||
|
||||
for att2 in self.browse(cr, uid, other_invitation_ids):
|
||||
att_infos.append(((att2.user_id and att2.user_id.name) or \
|
||||
(att2.partner_id and att2.partner_id.name) or \
|
||||
att2.email) + ' - Status: ' + att2.state.title())
|
||||
body_vals = {'name': res_obj.name,
|
||||
'start_date': res_obj.date,
|
||||
'end_date': res_obj.date_deadline or False,
|
||||
'description': res_obj.description or '-',
|
||||
'location': res_obj.location or '-',
|
||||
'attendees': '<br>'.join(att_infos),
|
||||
'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
|
||||
'sign': sign,
|
||||
'company': company
|
||||
}
|
||||
body = html_invitation % body_vals
|
||||
if mail_to and email_from:
|
||||
attach = self.get_ics_file(cr, uid, res_obj, context=context)
|
||||
tools.email_send(
|
||||
email_from,
|
||||
mail_to,
|
||||
sub,
|
||||
body,
|
||||
attach=attach and [('invitation.ics', attach)] or None,
|
||||
subtype='html',
|
||||
reply_to=email_from
|
||||
)
|
||||
return True
|
||||
|
||||
def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
|
||||
|
||||
@@ -128,8 +128,9 @@ send an Email to Invited Person')
|
||||
att = att_obj.browse(cr, uid, context_id)
|
||||
att_val.update({
|
||||
'parent_ids': [(4, att.id)],
|
||||
'ref': att.ref._name + ',' +str(att.ref.id)
|
||||
'ref': att.ref and (att.ref._name + ',' +str(att.ref.id)) or False
|
||||
})
|
||||
|
||||
attendees.append(att_obj.create(cr, uid, att_val))
|
||||
if model_field:
|
||||
for attendee in attendees:
|
||||
|
||||
@@ -54,9 +54,8 @@ class quality_test(base_module_quality.abstract_quality_check):
|
||||
flag = True
|
||||
file_path = os.path.join(module_path, file_py)
|
||||
try:
|
||||
import pylint
|
||||
res = os.popen('pylint --rcfile=' + config_file_path + ' ' + file_path).read()
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
self.error = True
|
||||
self.log.exception("Cannot run pylint test for %s", file_path)
|
||||
self.result += _("Error. Is pylint correctly installed? (http://pypi.python.org/pypi/pylint)")+"\n"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
from osv import fields, osv
|
||||
import netsvc
|
||||
|
||||
class base_setup_installer(osv.osv_memory):
|
||||
_name = 'base.setup.installer'
|
||||
@@ -59,7 +58,7 @@ class base_setup_installer(osv.osv_memory):
|
||||
help="Helps you manage your purchase-related processes such as "
|
||||
"requests for quotations, supplier invoices, etc..."),
|
||||
'hr':fields.boolean('Human Resources',
|
||||
help="Helps you manage your human resources by encoding your employees structure, generating work sheets, tracking attendance and more"),
|
||||
help="Helps you manage your human resources by encoding your employees structure, generating work sheets, tracking attendance and more."),
|
||||
'point_of_sale':fields.boolean('Point of Sales',
|
||||
help="Helps you get the most out of your points of sales with "
|
||||
"fast sale encoding, simplified payment mode encoding, "
|
||||
@@ -75,7 +74,7 @@ class base_setup_installer(osv.osv_memory):
|
||||
# Vertical modules
|
||||
'product_expiry':fields.boolean('Food Industry',
|
||||
help="Installs a preselected set of OpenERP applications "
|
||||
"which will help you manage your industry"),
|
||||
"which will help you manage your industry."),
|
||||
'association':fields.boolean('Associations',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications which will help you manage your association "
|
||||
|
||||
@@ -85,7 +85,6 @@ Create dashboard for CRM that includes:
|
||||
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_add_note_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_merge_opportunities_view.xml',
|
||||
|
||||
'crm_view.xml',
|
||||
|
||||
@@ -38,10 +38,10 @@ class crm_installer(osv.osv_memory):
|
||||
'crm_claim': fields.boolean('Claims', help="Manages the suppliers and customers claims, including your corrective or preventive actions."),
|
||||
'crm_caldav': fields.boolean('Calendar Synchronizing', help="Helps you to synchronize the meetings with other calendar clients and mobiles."),
|
||||
'sale_crm': fields.boolean('Opportunity to Quotation', help="This module relates sale from opportunity cases in the CRM."),
|
||||
'fetchmail': fields.boolean('Fetch Emails', help="Allows you to receive E-Mails from POP / IMAP server"),
|
||||
'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one"),
|
||||
'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one"),
|
||||
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Helps you manage wiki pages for Frequently Asked Questions on Sales Application"),
|
||||
'fetchmail': fields.boolean('Fetch Emails', help="Allows you to receive E-Mails from POP/IMAP server."),
|
||||
'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
|
||||
'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
|
||||
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Helps you manage wiki pages for Frequently Asked Questions on Sales Application."),
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
|
||||
@@ -150,8 +150,6 @@ class crm_lead(crm_case, osv.osv):
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
|
||||
'partner_assigned_id': fields.many2one('res.partner', 'Assigned Partner', help="Partner this case has been forwarded/assigned to.", select=True),
|
||||
'date_assign': fields.date('Assignation Date', help="Last date this case was forwarded/assigned to a partner"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
@@ -221,9 +221,6 @@
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'crm.lead'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
<button string="Forward"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
@@ -26,19 +26,17 @@
|
||||
<form string="Meetings">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
required="1" colspan="2" />
|
||||
required="1" />
|
||||
<field name="categ_id" widget="selection"
|
||||
string="Meeting Type"
|
||||
groups="base.group_extended"
|
||||
string="Meeting Type" groups="base.group_extended"
|
||||
domain="[('object_id.model', '=', 'crm.meeting')]" />
|
||||
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
|
||||
<field name="allday" on_change="onchange_allday(allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="date_deadline" string="End Date"
|
||||
required="1"
|
||||
<field name="date_deadline" string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)" />
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder"
|
||||
|
||||
@@ -152,19 +152,6 @@ class crm_opportunity(osv.osv):
|
||||
return {'value':{}}
|
||||
return {'value':{'probability': stage.probability}}
|
||||
|
||||
def onchange_assign_id(self, cr, uid, ids, partner_assigned_id, context={}):
|
||||
"""This function updates the "assignation date" automatically, when manually assign a partner in the geo assign tab
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of stage’s IDs
|
||||
@stage_id: change state id on run time """
|
||||
|
||||
if not partner_assigned_id:
|
||||
return {'value':{'date_assign': False}}
|
||||
else:
|
||||
return {'value':{'date_assign': time.strftime('%Y-%m-%d')}}
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
|
||||
'priority': crm.AVAILABLE_PRIORITIES[2][0],
|
||||
|
||||
@@ -174,9 +174,6 @@
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'crm.lead'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
<button string="Forward"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action" />
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
<group col="2" colspan="2">
|
||||
@@ -197,21 +194,6 @@
|
||||
<field name="ref"/>
|
||||
<field name="ref2"/>
|
||||
</page>
|
||||
<page string="Assignation" groups="base.group_extended">
|
||||
<group name="partner_assign_group" col="5" colspan="4">
|
||||
<separator string="Partner Assignation" colspan="5"/>
|
||||
<field name="partner_assigned_id" on_change="onchange_assign_id(partner_assigned_id)"/>
|
||||
<field name="date_assign"/>
|
||||
<group colspan="1" col="1">
|
||||
<button string="Forward"
|
||||
attrs="{'invisible':[('partner_assigned_id','=',False)]}"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action"
|
||||
context="{'default_name': 'partner', 'default_partner_id': partner_assigned_id}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -50,11 +50,11 @@ class crm_phonecall(crm_case, osv.osv):
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'description': fields.text('Description'),
|
||||
'state': fields.selection([
|
||||
('draft', 'Draft'),
|
||||
('draft', 'Todo'),
|
||||
('open', 'Todo'),
|
||||
('cancel', 'Cancelled'),
|
||||
('done', 'Done'),
|
||||
('pending', 'Pending'),
|
||||
('done', 'Held'),
|
||||
('pending', 'Not Held'),
|
||||
], 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
|
||||
@@ -576,9 +576,6 @@
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'crm.case.custom'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
<button string="Forward to Partner"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Leads Analysis">
|
||||
<tree string="Leads Analysis">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
@@ -21,12 +21,12 @@
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="nbr" sum="# Leads"/>
|
||||
<field name="email" sum="# Mails"/>
|
||||
<field name="delay_open"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="avg_answers"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -69,31 +69,35 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leads Analysis">
|
||||
<group col="20" colspan="8">
|
||||
<filter string="Last 365 Days" icon="terp-go-year"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Leads/Opportunities created in last 365 days"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Leads/Opportunities created in last 30 days"/>
|
||||
<filter icon="terp-go-week" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Leads/Opportunities created in the previous month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-check"
|
||||
<filter icon="gtk-media-pause"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter icon="terp-check"
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Closed"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
help="My team" />
|
||||
</field>
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
@@ -101,20 +105,19 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="user" icon="terp-personal"
|
||||
<filter string="Salesman" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
|
||||
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
@@ -124,11 +127,11 @@
|
||||
context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}" help="Day on which lead/opportunity is created"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}" help="Month in which lead/opportunity is created"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}" help="Year in which lead/opportunity is created"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
|
||||
@@ -24,11 +24,11 @@ import tools
|
||||
from crm import crm
|
||||
|
||||
AVAILABLE_STATES = [
|
||||
('draft','Draft'),
|
||||
('open','Open'),
|
||||
('draft','Todo'),
|
||||
('open','Todo'),
|
||||
('cancel', 'Cancelled'),
|
||||
('done', 'Closed'),
|
||||
('pending','Pending')
|
||||
('done', 'Held'),
|
||||
('pending','Not Held')
|
||||
]
|
||||
|
||||
|
||||
@@ -119,9 +119,9 @@ class crm_phonecall_report(osv.osv):
|
||||
create or replace view crm_phonecall_report as (
|
||||
select
|
||||
id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
|
||||
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="model">crm.phonecall.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Phone calls">
|
||||
<tree string="Phone calls">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
@@ -75,55 +75,53 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"/>
|
||||
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"/>
|
||||
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','oprn'))]"/>
|
||||
<filter icon="terp-hr"
|
||||
string="To Do"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="gtk-media-pause"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter icon="terp-sale"
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
</field>
|
||||
<field name="user_id" select="1">
|
||||
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
<filter string="Salesman" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-sale"
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Type" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
@@ -133,11 +131,11 @@
|
||||
context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}" help="Date of call"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}" help="Month of call"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}" help="Year of call"/>
|
||||
</group>
|
||||
|
||||
<newline/>
|
||||
@@ -145,7 +143,7 @@
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<field string="Type" name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
@@ -160,7 +158,7 @@
|
||||
<!-- Phone calls by user and section Action -->
|
||||
|
||||
<record id="action_report_crm_phonecall" model="ir.actions.act_window">
|
||||
<field name="name">Phone Calls</field>
|
||||
<field name="name">Phone Calls Analysis</field>
|
||||
<field name="res_model">crm.phonecall.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
||||
@@ -83,12 +83,12 @@ class report_custom(report_int):
|
||||
if benefit < minbenef:
|
||||
minbenef = benefit
|
||||
|
||||
tuple = (proba * 100, benefit)
|
||||
tuple_benefit = (proba * 100, benefit)
|
||||
responsible_data.setdefault(userid, [])
|
||||
responsible_data[userid].append(tuple)
|
||||
responsible_data[userid].append(tuple_benefit)
|
||||
|
||||
tuple = (proba * 100, cost, benefit)
|
||||
data.append(tuple)
|
||||
tuple_benefit = (proba * 100, cost, benefit)
|
||||
data.append(tuple_benefit)
|
||||
|
||||
responsible_names[userid] = (row['name'] or '/').replace('/','//')
|
||||
|
||||
|
||||
@@ -31,8 +31,6 @@ class res_partner(osv.osv):
|
||||
'Meetings'),
|
||||
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
|
||||
'Phonecalls'),
|
||||
'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\
|
||||
'Assigned Opportunities'),
|
||||
}
|
||||
res_partner()
|
||||
|
||||
|
||||
@@ -44,39 +44,6 @@
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
<field name="opportunity_assigned_ids" colspan="4" nolabel="1">
|
||||
<tree string="Assigned Opportunities" colors="blue:state=='pending';gray:state=='cancel'">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_close" string="Close"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-close" />
|
||||
<button string="Convert to Opportunity"
|
||||
name="convert_opportunity"
|
||||
states="draft,open,pending" icon="gtk-index"
|
||||
type="object" attrs="{'invisible':[('type','=','opportunity')]}" />
|
||||
<button name="case_escalate" string="Escalate"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-go-up" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" >
|
||||
<tree string="Meetings" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="user_id" string="Responsible"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"access_crm_phonecall_system","crm.phonecall.system","model_crm_phonecall","base.group_system",1,0,0,0
|
||||
"access_crm_phonecall_manager","crm.phonecall.manager","model_crm_phonecall","base.group_sale_manager",1,0,0,0
|
||||
"access_crm_case_categ","crm.case.categ","model_crm_case_categ","base.group_user",1,0,0,0
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","base.group_sale_salesman",1,1,1,0
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","base.group_sale_salesman",1,0,0,0
|
||||
"access_crm_meeting_all","crm.meeting_allll","model_crm_meeting","base.group_user",1,0,0,0
|
||||
"access_crm_lead","crm.lead","model_crm_lead","base.group_sale_salesman",1,1,1,1
|
||||
"access_crm_lead.all","crm.lead.all","model_crm_lead","base.group_user",1,0,0,0
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
import crm_send_email
|
||||
import crm_forward_to_partner
|
||||
import crm_add_note
|
||||
|
||||
import crm_lead_to_partner
|
||||
|
||||
@@ -73,6 +73,8 @@ class crm_claim_report(osv.osv):
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]"),
|
||||
'date_closed': fields.date('Closed', readonly=True),
|
||||
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -86,9 +88,10 @@ class crm_claim_report(osv.osv):
|
||||
create or replace view crm_claim_report as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.date_closed, 'YYYY-MM-DD') as date_closed,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.stage_id,
|
||||
@@ -100,13 +103,14 @@ class crm_claim_report(osv.osv):
|
||||
c.priority as priority,
|
||||
c.type_id as type_id,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected
|
||||
from
|
||||
crm_claim c
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
|
||||
group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),to_char(c.date, 'YYYY-MM-DD'),\
|
||||
c.state, c.user_id,c.section_id, c.stage_id,\
|
||||
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
|
||||
,c.priority,c.type_id
|
||||
c.categ_id,c.partner_id,c.company_id,c.create_date,
|
||||
c.priority,c.type_id,c.date_deadline,c.date_closed
|
||||
)""")
|
||||
|
||||
crm_claim_report()
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="nbr" string="#Claim" sum="#Claim"/>
|
||||
<field name="delay_close" avg="Avg Closing Delay"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
@@ -42,6 +43,7 @@
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="nbr" select="1"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="amount_costs"/>
|
||||
<field name="amount_revenue_prob"/>
|
||||
@@ -75,14 +77,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Year " icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
|
||||
help="Claims created in last 365 days"/>
|
||||
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string=" Month " icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-%%m-01'))]"
|
||||
help="Claims created in last 30 days"/>
|
||||
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string=" Month-1 " separator="1"
|
||||
domain="[('create_date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Claims created in the previous month"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-document-new"
|
||||
@@ -98,7 +103,6 @@
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
@@ -107,58 +111,58 @@
|
||||
help="My section" />
|
||||
|
||||
</field>
|
||||
<field name="company_id" widget="selection">
|
||||
<field name="company_id">
|
||||
<filter icon="terp-go-home"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id.company_id','=',uid)]"
|
||||
help="My company"/>
|
||||
</field>
|
||||
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<field name="user_id" select="1">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
<filter string="Salesman" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
|
||||
<filter string="Stage" icon="terp-stage" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]"
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'type_id'}" />
|
||||
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
domain="[]" context="{'group_by':'day'}"
|
||||
help="Date of claim"/>
|
||||
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
domain="[]" context="{'group_by':'month'}"
|
||||
help="Month of claim"/>
|
||||
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
domain="[]" context="{'group_by':'name'}"
|
||||
help="Year of claim"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
@@ -166,15 +170,16 @@
|
||||
<filter icon="gtk-cancel"
|
||||
string="Cancel"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
|
||||
<group>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
</group>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<newline/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -183,7 +188,7 @@
|
||||
<!-- CRM Claim Report Action -->
|
||||
|
||||
<record id="action_report_crm_claim" model="ir.actions.act_window">
|
||||
<field name="name">Claims</field>
|
||||
<field name="name">Claims Analysis</field>
|
||||
<field name="res_model">crm.claim.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
||||
@@ -20,3 +20,5 @@
|
||||
##############################################################################
|
||||
|
||||
import partner_geo_assign
|
||||
import wizard
|
||||
import report
|
||||
@@ -30,9 +30,11 @@ based on geolocalization.
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['crm'],
|
||||
'data': [
|
||||
'update_xml': [
|
||||
'res_partner_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
'report/crm_lead_report_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_crm_opportunity_geo_assign_form" model="ir.ui.view">
|
||||
<field name="name">crm.lead.geo_assign.inherit</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//notebook[last()]" position="inside">
|
||||
<page string="Assignation" groups="base.group_extended">
|
||||
<group name="partner_assign_group" col="5" colspan="4">
|
||||
<separator string="Partner Assignation" colspan="5"/>
|
||||
<field name="partner_assigned_id" on_change="onchange_assign_id(partner_assigned_id)" domain="[('grade_id','<>',False)]"/>
|
||||
<field name="date_assign"/>
|
||||
<group colspan="1" col="1">
|
||||
<button string="Forward"
|
||||
attrs="{'invisible':[('partner_assigned_id','=',False)]}"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action"
|
||||
context="{'default_name': 'partner', 'default_partner_id': partner_assigned_id}"
|
||||
/>
|
||||
</group>
|
||||
<group name="geo_assign_group" col="5" colspan="4">
|
||||
<separator string="Geo Assignation" colspan="5"/>
|
||||
<field name="partner_latitude"/>
|
||||
<field name="partner_longitude"/>
|
||||
<group colspan="1" col="1">
|
||||
<button string="Geo Assign" name="assign_partner" type="object" colspan="1"
|
||||
icon="gtk-apply"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
+31
@@ -41,6 +41,20 @@ def geo_find(addr):
|
||||
_('Could not contact geolocation servers, please make sure you have a working internet connection (%s)') % e)
|
||||
|
||||
|
||||
class res_partner_grade(osv.osv):
|
||||
_order = 'sequence'
|
||||
_name = 'res.partner.grade'
|
||||
_columns = {
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'active': fields.boolean('Active'),
|
||||
'name': fields.char('Grade Name', size=32)
|
||||
}
|
||||
_defaults = {
|
||||
'active': lambda *args: 1
|
||||
}
|
||||
res_partner_grade()
|
||||
|
||||
|
||||
class res_partner(osv.osv):
|
||||
_inherit = "res.partner"
|
||||
_columns = {
|
||||
@@ -49,6 +63,9 @@ class res_partner(osv.osv):
|
||||
'date_localization': fields.date('Geo Localization Date'),
|
||||
'partner_weight': fields.integer('Weight',
|
||||
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
|
||||
'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\
|
||||
'Assigned Opportunities'),
|
||||
'grade_id': fields.many2one('res.partner.grade', 'Partner Grade')
|
||||
}
|
||||
_defaults = {
|
||||
'partner_weight': lambda *args: 0
|
||||
@@ -74,7 +91,21 @@ class crm_lead(osv.osv):
|
||||
_columns = {
|
||||
'partner_latitude': fields.float('Geo Latitude'),
|
||||
'partner_longitude': fields.float('Geo Longitude'),
|
||||
'partner_assigned_id': fields.many2one('res.partner', 'Assigned Partner', help="Partner this case has been forwarded/assigned to.", select=True),
|
||||
'date_assign': fields.date('Assignation Date', help="Last date this case was forwarded/assigned to a partner"),
|
||||
}
|
||||
def onchange_assign_id(self, cr, uid, ids, partner_assigned_id, context={}):
|
||||
"""This function updates the "assignation date" automatically, when manually assign a partner in the geo assign tab
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of stage’s IDs
|
||||
@stage_id: change state id on run time """
|
||||
|
||||
if not partner_assigned_id:
|
||||
return {'value':{'date_assign': False}}
|
||||
else:
|
||||
return {'value':{'date_assign': time.strftime('%Y-%m-%d')}}
|
||||
|
||||
def assign_partner(self, cr, uid, ids, context=None):
|
||||
ok = False
|
||||
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import crm_lead_report
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
import tools
|
||||
from crm import crm
|
||||
|
||||
AVAILABLE_STATES = [
|
||||
('draft','Draft'),
|
||||
('open','Open'),
|
||||
('cancel', 'Cancelled'),
|
||||
('done', 'Closed'),
|
||||
('pending','Pending')
|
||||
]
|
||||
|
||||
class crm_lead_report_assign(osv.osv):
|
||||
""" CRM Lead Report """
|
||||
_name = "crm.lead.report.assign"
|
||||
_auto = False
|
||||
_description = "CRM Lead Report"
|
||||
_columns = {
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||
'partner_assigned_id':fields.many2one('res.partner', 'Partner', readonly=True),
|
||||
'grade_id':fields.many2one('res.partner.grade', 'Grade', readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
'country_id':fields.many2one('res.country', 'Country', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'month':fields.selection([('01', 'January'), ('02', 'February'), \
|
||||
('03', 'March'), ('04', 'April'),\
|
||||
('05', 'May'), ('06', 'June'), \
|
||||
('07', 'July'), ('08', 'August'),\
|
||||
('09', 'September'), ('10', 'October'),\
|
||||
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'partner_date': fields.date('Partner Date', readonly=True),
|
||||
'create_date': fields.datetime('Create Date', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'delay_open': fields.float('Delay to Open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
|
||||
'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'probability': fields.float('Avg Probability',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'probability_max': fields.float('Max Probability',digits=(16,2),readonly=True, group_operator="max"),
|
||||
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
|
||||
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]" , readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]", readonly=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer' , readonly=True),
|
||||
'opening_date': fields.date('Opening Date', readonly=True),
|
||||
'creation_date': fields.date('Creation Date', readonly=True),
|
||||
'date_closed': fields.date('Close Date', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'type':fields.selection([
|
||||
('lead','Lead'),
|
||||
('opportunity','Opportunity'),
|
||||
],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
}
|
||||
def init(self, cr):
|
||||
|
||||
"""
|
||||
CRM Lead Report
|
||||
@param cr: the current row, from the database cursor
|
||||
"""
|
||||
tools.drop_view_if_exists(cr, 'crm_lead_report')
|
||||
cr.execute("""
|
||||
CREATE OR REPLACE VIEW crm_lead_report_assign AS (
|
||||
SELECT
|
||||
c.id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
|
||||
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.probability,
|
||||
c.probability as probability_max,
|
||||
c.stage_id,
|
||||
c.type,
|
||||
c.company_id,
|
||||
c.priority,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
c.partner_id,
|
||||
c.country_id,
|
||||
c.planned_revenue,
|
||||
c.partner_assigned_id,
|
||||
p.grade_id,
|
||||
p.date as partner_date,
|
||||
c.planned_revenue*(c.probability/100) as probable_revenue,
|
||||
1 as nbr,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected,
|
||||
extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open
|
||||
FROM
|
||||
crm_lead c
|
||||
left join res_partner p on (c.partner_assigned_id=p.id)
|
||||
)""")
|
||||
|
||||
crm_lead_report_assign()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Opportunity tree view -->
|
||||
<record id="view_report_crm_lead_assign_filter" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.assign.select</field>
|
||||
<field name="model">crm.lead.report.assign</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leads Analysis">
|
||||
<group col="20" colspan="8">
|
||||
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-check"
|
||||
string="Closed"
|
||||
domain="[('state','=','done')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}"/>
|
||||
<field name="grade_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_assigned_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_assigned_id'}" />
|
||||
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Grade" name="group_grade" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'grade_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Partner Date" icon="terp-go-today"
|
||||
domain="[]"
|
||||
name="group_partner_date"
|
||||
context="{'group_by':'partner_date'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="view_report_crm_opportunity_assign_tree" model="ir.ui.view">
|
||||
<field name="name">crm.lead.assign.report.tree</field>
|
||||
<field name="model">crm.lead.report.assign</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Opportunities Assignment Analysis">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="partner_date" invisible="1"/>
|
||||
<field name="section_id" invisible="1" groups="base.group_extended"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="grade_id" invisible="1" widget="selection"/>
|
||||
<field name="partner_assigned_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="nbr" string="#Opportunities" sum="#Opportunities"/>
|
||||
<field name="planned_revenue" sum="Planned Revenues"/>
|
||||
<field name="delay_open" sum='Delay to open'/>
|
||||
<field name="delay_close" sum='Delay to close'/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="probability" widget="progressbar"/>
|
||||
<field name="probability_max" widget="progressbar"/>
|
||||
<field name="probable_revenue"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Leads by user and section Action -->
|
||||
|
||||
<record id="action_report_crm_opportunity_assign" model="ir.actions.act_window">
|
||||
<field name="name">Opp. Assignment Analysis</field>
|
||||
<field name="res_model">crm.lead.report.assign</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_group_partner_date": 1, "search_default_group_grade":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_assign_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_crm_opportunity_assign_tree"/>
|
||||
<field name="act_window_id" ref="action_report_crm_opportunity_assign"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_report_crm_opportunities_assign_tree"
|
||||
groups="base.group_extended"
|
||||
parent="base.next_id_64" action="action_report_crm_opportunity_assign" sequence="5"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!--Partner Grade -->
|
||||
|
||||
|
||||
<record id="view_partner_grade_tree" model="ir.ui.view">
|
||||
<field name="name">res.partner.grade.tree</field>
|
||||
<field name="model">res.partner.grade</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Partner Grade">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_partner_grade_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.grade.form</field>
|
||||
<field name="model">res.partner.grade</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partner Grade">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="res_partner_grade_action" model="ir.actions.act_window">
|
||||
<field name="name">Partner Grade</field>
|
||||
<field name="res_model">res.partner.grade</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem action="res_partner_grade_action" id="menu_res_partner_grade_action"
|
||||
groups="base.group_extended"
|
||||
parent="base.menu_crm_config_lead" />
|
||||
|
||||
<!-- Partner form -->
|
||||
<record id="view_res_partner_filter_assign_tree" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit.tree</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.view_partner_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="after">
|
||||
<field name="grade_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_partner_filter_assign" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit.search</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">search</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="category_id" position="after">
|
||||
<field name="grade_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_partner_geo_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="inside">
|
||||
<page string="Geo Localization">
|
||||
<field name="grade_id" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="partner_weight"/>
|
||||
<label string="" colspan="1"/>
|
||||
<button
|
||||
string="Geo Localize"
|
||||
name="geo_localize"
|
||||
icon="gtk-apply"
|
||||
type="object"/>
|
||||
<newline/>
|
||||
<field name="partner_latitude"/>
|
||||
<field name="partner_longitude"/>
|
||||
<field name="date_localization"/>
|
||||
|
||||
<field name="opportunity_assigned_ids" colspan="4" nolabel="1">
|
||||
<tree string="Assigned Opportunities" colors="blue:state=='pending';gray:state=='cancel'">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_close" string="Close"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-close" />
|
||||
<button string="Convert to Opportunity"
|
||||
name="convert_opportunity"
|
||||
states="draft,open,pending" icon="gtk-index"
|
||||
type="object" attrs="{'invisible':[('type','=','opportunity')]}" />
|
||||
<button name="case_escalate" string="Escalate"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-go-up" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import crm_forward_to_partner
|
||||
+20
-20
@@ -87,7 +87,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Mail’s IDs
|
||||
@param user: Changed User id
|
||||
@param partner: Changed Partner id
|
||||
@param partner: Changed Partner id
|
||||
"""
|
||||
if not user:
|
||||
return {'value': {'email_to': False}}
|
||||
@@ -146,7 +146,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Mail’s IDs
|
||||
@param user: Changed User id
|
||||
@param partner: Changed Partner id
|
||||
@param partner: Changed Partner id
|
||||
"""
|
||||
if not partner_id:
|
||||
return {'value' : {'email_to' : False, 'address_id': False}}
|
||||
@@ -155,7 +155,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
data = {'address_id': addr['contact']}
|
||||
data.update(self.on_change_address(cr, uid, ids, addr['contact'])['value'])
|
||||
return {
|
||||
'value' : data,
|
||||
'value' : data,
|
||||
'domain' : {'address_id' : partner_id and "[('partner_id', '=', partner_id)]" or "[]"}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"""
|
||||
Forward the lead to a partner
|
||||
"""
|
||||
|
||||
|
||||
this = self.browse(cr, uid, ids[0], context=context)
|
||||
case_pool = self.pool.get(context.get('active_model'))
|
||||
res_id = context and context.get('active_id', False) or False
|
||||
@@ -230,22 +230,22 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
elif lead.type == 'opportunity':
|
||||
pa = lead.partner_address_id
|
||||
body = [
|
||||
"Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
|
||||
"Contact: %s" % (pa.name or ''),
|
||||
"Title: %s" % (pa.title or ''),
|
||||
"Function: %s" % (pa.function or ''),
|
||||
"Street: %s" % (pa.street or ''),
|
||||
"Street2: %s" % (pa.street2 or ''),
|
||||
"Zip: %s" % (pa.zip or ''),
|
||||
"City: %s" % (pa.city or ''),
|
||||
"Country: %s" % (pa.country_id and pa.country_id.name_get()[0][1] or ''),
|
||||
"State: %s" % (pa.state_id and pa.state_id.name_get()[0][1] or ''),
|
||||
"Email: %s" % (pa.email or ''),
|
||||
"Phone: %s" % (pa.phone or ''),
|
||||
"Fax: %s" % (pa.fax or ''),
|
||||
"Mobile: %s" % (pa.mobile or ''),
|
||||
"Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
|
||||
"Details: %s" % (lead.description or ''),
|
||||
"Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
|
||||
"Contact: %s" % (pa.name or ''),
|
||||
"Title: %s" % (pa.title or ''),
|
||||
"Function: %s" % (pa.function or ''),
|
||||
"Street: %s" % (pa.street or ''),
|
||||
"Street2: %s" % (pa.street2 or ''),
|
||||
"Zip: %s" % (pa.zip or ''),
|
||||
"City: %s" % (pa.city or ''),
|
||||
"Country: %s" % (pa.country_id and pa.country_id.name_get()[0][1] or ''),
|
||||
"State: %s" % (pa.state_id and pa.state_id.name_get()[0][1] or ''),
|
||||
"Email: %s" % (pa.email or ''),
|
||||
"Phone: %s" % (pa.phone or ''),
|
||||
"Fax: %s" % (pa.fax or ''),
|
||||
"Mobile: %s" % (pa.mobile or ''),
|
||||
"Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
|
||||
"Details: %s" % (lead.description or ''),
|
||||
]
|
||||
return "\n".join(body + ['---'])
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
<field name="name">crm_lead_forward_to_partner</field>
|
||||
<field name="model">crm.lead.forward.to.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="crm_send_new_mail_view"/>
|
||||
<field name="inherit_id" ref="crm.crm_send_new_mail_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="email_from" position="before">
|
||||
<separator string="Forward to Partner" colspan="4" />
|
||||
@@ -31,7 +31,7 @@
|
||||
<field name="name">crm_lead_forward_to_partner1</field>
|
||||
<field name="model">crm.lead.forward.to.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="crm_send_new_mail_view"/>
|
||||
<field name="inherit_id" ref="crm.crm_send_new_mail_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_send" position="replace">
|
||||
<button name="action_forward" string="Forward" icon="gtk-go-forward" type="object" />
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
|
||||
from osv import fields,osv
|
||||
import time
|
||||
import tools
|
||||
|
||||
class report_document_user(osv.osv):
|
||||
|
||||
@@ -154,7 +154,7 @@ class email_server(osv.osv):
|
||||
for num in range(1, numMsgs + 1):
|
||||
(header, msges, octets) = pop_server.retr(num)
|
||||
msg = '\n'.join(msges)
|
||||
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
|
||||
res_id = email_tool.process_email(cr, uid, server.object_id.model, msg, attach=server.attach, context=context)
|
||||
if res_id and server.action_id:
|
||||
action_pool = self.pool.get('ir.actions.server')
|
||||
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
|
||||
|
||||
@@ -65,12 +65,14 @@
|
||||
<record id="employee2" model="hr.employee">
|
||||
<field name="name">Quentin Paolino</field>
|
||||
<field name="calendar_id" ref="resource.timesheet_group1"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="category_ids" eval="[(6, 0, [ref('category_jr_exec'),ref('category_managers')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="employee3" model="hr.employee">
|
||||
<field name="name">Antoine Philippe</field>
|
||||
<field name="calendar_id" ref="resource.timesheet_group1"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="category_ids" eval="[(6, 0, [ref('category_trainee')])]"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class hr_installer(osv.osv_memory):
|
||||
'hr_attendance': fields.boolean('Attendances',
|
||||
help="Simplifies the management of employee's attendances."),
|
||||
'hr_payroll': fields.boolean('Payroll',
|
||||
help="Generic Payroll system"),
|
||||
help="Generic Payroll system."),
|
||||
'hr_payroll_account': fields.boolean('Payroll Accounting',
|
||||
help="Generic Payroll system Integrated with Accountings."),
|
||||
}
|
||||
|
||||
@@ -220,8 +220,8 @@ msgid ""
|
||||
"managers can obtain an easy view on best ideas from all the users. Once "
|
||||
"installed, check the menu 'Ideas' in the 'Tools' main menu."
|
||||
msgstr ""
|
||||
"这模块允许你在企业创新里简单和有效地使用.\r\n"
|
||||
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\r\n"
|
||||
"这模块允许你在企业创新里简单和有效地使用.\n"
|
||||
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\n"
|
||||
"管理人员可以很容易得到所有用户对构想的评价."
|
||||
|
||||
#. module: idea
|
||||
|
||||
@@ -283,7 +283,7 @@ class mailgate_tool(osv.osv_memory):
|
||||
'description': msg.get('body', msg.get('from')),
|
||||
'history': True,
|
||||
'partner_id': partner_id,
|
||||
'res_model': model,
|
||||
'model': model,
|
||||
'email_cc': msg.get('cc'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_to': msg.get('to'),
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" string="Subject" required="1" select="1" widget="char" size="512"/>
|
||||
<field name="date" required="1" select="1"/>
|
||||
<field name="user_id" string="Responsible" select="1"/>
|
||||
<field name="user_id" string="Owner" select="1"/>
|
||||
<field name="partner_id" readonly="1" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Email Details" colspan="4"/>
|
||||
<separator string="Email Followers" colspan="4"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to" widget="char" size="512"/>
|
||||
<field name="email_cc" widget="char" size="512"/>
|
||||
@@ -50,7 +50,9 @@
|
||||
<field name="date" />
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="email_from" string="From"/>
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="user_id" string="Owner"/>
|
||||
<field name="message_id" string="Message" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -63,13 +65,21 @@
|
||||
<search string="Email Search">
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="date" />
|
||||
<field name="user_id" />
|
||||
<field name="message_id" />
|
||||
<field name="user_id" string="Owner" default="uid"/>
|
||||
<field name="description" />
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." groups="base.group_extended">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Owner" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Thread" icon="terp-mail-" domain="[]" context="{'group_by':'message_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" help="Creation Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_mailgate_thread_form">
|
||||
<field name="name">mailgate.thread.form</field>
|
||||
<field name="model">mailgate.thread</field>
|
||||
@@ -127,6 +137,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('history', '=', True)]</field>
|
||||
<field name="view_id" ref="view_mailgate_message_tree"/>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_view_mailgate_thread">
|
||||
@@ -173,10 +184,6 @@
|
||||
<field name="act_window_id" ref="action_view_mailgate_thread"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="base.menu_base_config_mail" name="Mail" parent="base.menu_base_config" sequence="4"/>
|
||||
<menuitem id="menu_mailgate_message" name="Emails" action="action_view_mailgate_message"
|
||||
parent="base.menu_base_config_mail" sequence="5" groups="base.group_system"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('history', '=', True)]"
|
||||
id="act_res_partner_emails" name="Emails"
|
||||
res_model="mailgate.message"
|
||||
@@ -184,5 +191,16 @@
|
||||
view_id="view_mailgate_message_tree"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<menuitem name="Emails" id="menu_base_config_mail"
|
||||
parent="base.menu_base_partner" sequence="5" />
|
||||
|
||||
<menuitem name="Emails" id="menu_mailgate_message"
|
||||
parent="menu_base_config_mail"
|
||||
action="mail_gateway.action_view_mailgate_message"
|
||||
/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -28,7 +28,7 @@ class mrp_installer(osv.osv_memory):
|
||||
# Manufacturing Resource Planning
|
||||
'stock_location': fields.boolean('Advanced Routes',
|
||||
help="Manages product routes and paths within and between "
|
||||
"locations (e.g. warehouses)"),
|
||||
"locations (e.g. warehouses)."),
|
||||
'mrp_jit': fields.boolean('Just In Time Scheduling',
|
||||
help="Enables Just In Time computation of procurement orders."
|
||||
"\n\nWhile it's more resource intensive than the default "
|
||||
|
||||
+22
-22
@@ -19,11 +19,11 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from mx import DateTime
|
||||
from datetime import datetime, timedelta
|
||||
from itertools import groupby
|
||||
from operator import itemgetter
|
||||
from datetime import datetime
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
import ir
|
||||
import netsvc
|
||||
import time
|
||||
|
||||
@@ -178,8 +178,8 @@ class mrp_bom(osv.osv):
|
||||
'code': fields.char('Reference', size=16),
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the bills of material without removing it."),
|
||||
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True,
|
||||
help= "If a sub-product is used in several products, it can be useful to create its own BoM."\
|
||||
"Though if you don't want separated production orders for this sub-product, select Set/Phantom as BoM type."\
|
||||
help= "If a sub-product is used in several products, it can be useful to create its own BoM. "\
|
||||
"Though if you don't want separated production orders for this sub-product, select Set/Phantom as BoM type. "\
|
||||
"If a Phantom BoM is used for a root product, it will be sold and shipped as a set of components, instead of being produced."),
|
||||
'method': fields.function(_compute_type, string='Method', method=True, type='selection', selection=[('',''),('stock','On Stock'),('order','On Order'),('set','Set / Pack')]),
|
||||
'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."),
|
||||
@@ -250,7 +250,6 @@ class mrp_bom(osv.osv):
|
||||
@param properties: List of related properties.
|
||||
@return: False or BoM id.
|
||||
"""
|
||||
bom_result = False
|
||||
cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
|
||||
ids = map(lambda x: x[0], cr.fetchall())
|
||||
max_prop = 0
|
||||
@@ -356,14 +355,16 @@ class many2many_domain(fields.many2many):
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
|
||||
if not context:
|
||||
context = {}
|
||||
res = {}
|
||||
|
||||
move_obj = obj.pool.get('stock.move')
|
||||
for prod in obj.browse(cr, user, ids, context=context):
|
||||
cr.execute("SELECT move_id from mrp_production_move_ids where\
|
||||
production_id=%s" % (prod.id))
|
||||
m_ids = map(lambda x: x[0], cr.fetchall())
|
||||
final = move_obj.search(cr, user, self._domain + [('id', 'in', tuple(m_ids))])
|
||||
res[prod.id] = final
|
||||
res = {}.fromkeys(ids, [])
|
||||
valid_move_ids = move_obj.search(cr, user, self._domain) # move ids relative to domain argument
|
||||
cr.execute("SELECT production_id, move_id from mrp_production_move_ids where production_id in %s and move_id in %s",
|
||||
[tuple(ids), tuple(valid_move_ids)])
|
||||
related_move_map = cr.fetchall()
|
||||
related_move_dict = dict((k, list(set([v[1] for v in itr]))) for k, itr in groupby(related_move_map, itemgetter(0)))
|
||||
res.update(related_move_dict)
|
||||
|
||||
return res
|
||||
|
||||
class one2many_domain(fields.one2many):
|
||||
@@ -374,13 +375,14 @@ class one2many_domain(fields.one2many):
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
|
||||
if not context:
|
||||
context = {}
|
||||
res = {}
|
||||
|
||||
move_obj = obj.pool.get('stock.move')
|
||||
for prod in obj.browse(cr, user, ids, context=context):
|
||||
cr.execute("SELECT id from stock_move where production_id=%s" % (prod.id))
|
||||
m_ids = map(lambda x: x[0], cr.fetchall())
|
||||
final = move_obj.search(cr, user, self._domain + [('id', 'in', tuple(m_ids))])
|
||||
res[prod.id] = final
|
||||
res = {}.fromkeys(ids, [])
|
||||
key = operator.itemgetter(0)
|
||||
move_ids = move_obj.search(cr, user, self._domain+[('production_id', 'in', tuple(ids))], context=context)
|
||||
related_move_dict = dict([(o.production_id.id, [o.id]) for o in move_obj.browse(cr, user, move_ids, context=context)])
|
||||
res.update(related_move_dict)
|
||||
|
||||
return res
|
||||
|
||||
class mrp_production(osv.osv):
|
||||
@@ -479,7 +481,7 @@ class mrp_production(osv.osv):
|
||||
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
|
||||
}
|
||||
_order = 'date_planned asc, priority desc';
|
||||
_order = 'priority desc, date_planned asc';
|
||||
|
||||
def _check_qty(self, cr, uid, ids):
|
||||
orders = self.browse(cr, uid, ids)
|
||||
@@ -681,7 +683,6 @@ class mrp_production(osv.osv):
|
||||
stock_mov_obj = self.pool.get('stock.move')
|
||||
production = self.browse(cr, uid, production_id)
|
||||
|
||||
raw_product_todo = []
|
||||
final_product_todo = []
|
||||
|
||||
produced_qty = 0
|
||||
@@ -800,7 +801,6 @@ class mrp_production(osv.osv):
|
||||
""" Changes state to In Production and writes starting date.
|
||||
@return: True
|
||||
"""
|
||||
move_ids = []
|
||||
self.write(cr, uid, ids, {'state': 'in_production', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return True
|
||||
|
||||
|
||||
+47
-31
@@ -33,7 +33,7 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrp_property_group_action" model="ir.actions.act_window">
|
||||
<field name="name">Property Categories</field>
|
||||
<field name="name">Property Groups</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.property.group</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -64,7 +64,6 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Properties">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="group_id" select="1"/>
|
||||
<field name="composition" select="1"/>
|
||||
@@ -82,8 +81,8 @@
|
||||
<search string="Search">
|
||||
<group col='15' colspan='4'>
|
||||
<field name="name"/>
|
||||
<field name="group_id" widget="selection" />
|
||||
<field name="composition"/>
|
||||
<field name="group_id" widget="selection" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
@@ -132,7 +131,7 @@
|
||||
<field name="name"/>
|
||||
<field name="resource_id"/>
|
||||
<field name="resource_type"/>
|
||||
<field name="company_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -192,9 +191,11 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20" groups="base.group_extended">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'resource_type'}"/>
|
||||
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
|
||||
<filter string="Resource" icon="terp-personal" domain="[]" context="{'group_by':'resource_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'resource_type'}"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -252,15 +253,18 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Routing">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="active" select="1" groups="base.group_extended"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="location_id"/>
|
||||
<separator colspan="4" string="Description"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
<separator colspan="4" string="Work Center Operations"/>
|
||||
<field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
|
||||
<field name="active" groups="base.group_extended"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Work Center Operations">
|
||||
<field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -276,12 +280,25 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrp_routing_search_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.search</field>
|
||||
<field name="model">mrp.routing</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Routing">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="location_id"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrp_routing_action" model="ir.actions.act_window">
|
||||
<field name="name">Routings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.routing</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="mrp_routing_tree_view"/>
|
||||
<field name="search_view_id" ref="mrp_routing_search_view"/>
|
||||
<field name="help">Routings define the assembly operations to be done in work centers for manufacturing a certain product. They are usually attached to bills of materials which will define the assembly of products required for manufacture or for finished products.</field>
|
||||
</record>
|
||||
<menuitem action="mrp_workcenter_action" id="menu_mrp_workcenter_action" parent="mrp.menu_mrp_property" groups="base.group_extended" sequence="40" />
|
||||
@@ -358,16 +375,14 @@
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By" colspan="4" col="8" groups="base.group_extended">
|
||||
<group expand="0" string="Group By..." colspan="4" col="8" groups="base.group_extended">
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string='Default UOM' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
|
||||
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
|
||||
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Starting Date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -497,10 +512,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft','confirmed');red:date_planned<current_date and state not in ('done','cancel');black:date_planned>=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
|
||||
<field name="name"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" sum="Total Qty"/>
|
||||
<field name="product_uom"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="routing_id" groups="base.group_extended"/>
|
||||
<field name="hour_total" sum="Total Hours" groups="base.group_extended"/>
|
||||
<field name="cycle_total" sum="Total Cycles" groups="base.group_extended"/>
|
||||
@@ -625,16 +640,16 @@
|
||||
states="done,cancel"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
<separator colspan="4"/>
|
||||
<group col="9" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="action_compute" states="draft" string="Compute Data" type="object" icon="gtk-execute"/>
|
||||
<button name="action_compute" states="draft" string="Compute Data" type="object" icon="terp-stock_format-scientific"/>
|
||||
<button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
|
||||
<button name="button_produce" states="ready" string="Start Production" icon="gtk-execute"/>
|
||||
<button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
|
||||
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/>
|
||||
<button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="button_recreate" states="picking_except" string="Recreate Picking" icon="gtk-convert"/>
|
||||
<button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
|
||||
<button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Finished Products">
|
||||
@@ -736,12 +751,13 @@
|
||||
<field name="origin"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By" colspan="10" col="8">
|
||||
<group expand="0" string="Group By..." colspan="10" col="8">
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}" groups="base.group_extended"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
|
||||
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}" groups="base.group_extended"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -761,12 +777,12 @@
|
||||
</record>
|
||||
<menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" groups="base.group_system,mrp.group_mrp_user,mrp.group_mrp_manager" sequence="1"/>
|
||||
|
||||
<record id="mrp_production_action2_gantt" model="ir.actions.act_window">
|
||||
<record id="mrp_production_action_planning" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders Planning</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">gantt,tree,form,calendar,graph</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
|
||||
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, OpenERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
|
||||
</record>
|
||||
|
||||
@@ -40,6 +40,7 @@ class bom_structure(report_sxw.rml_parse):
|
||||
res = {}
|
||||
res['name'] = l.name
|
||||
res['pname'] = l.product_id.name
|
||||
res['pcode'] = l.product_id.default_code
|
||||
res['pqty'] = l.product_qty
|
||||
res['uname'] = l.product_uom.name
|
||||
res['code'] = l.code
|
||||
|
||||
@@ -67,7 +67,9 @@
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Centre_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -82,7 +84,7 @@
|
||||
<blockTable colWidths="166.0,208.0,79.0,55.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">BOM</para>
|
||||
<para style="terp_tblheader_General">BOM Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Product Name</para>
|
||||
@@ -91,23 +93,23 @@
|
||||
<para style="terp_tblheader_General_Right">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Code</para>
|
||||
<para style="terp_tblheader_General_Centre">BOM Ref</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="166.0,208.0,79.0,55.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.name ]]</para>
|
||||
<para style="terp_default_Bold_9">[[ o.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.product_id.name ]]</para>
|
||||
<para style="terp_default_Bold_9"><font> [ [[ (o.product_id.default_code) or removeParentNode('font') ]] ] </font> <font> [[ o.product_id.name ]] </font> </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.product_qty ]] [[ o.product_uom.name ]]</para>
|
||||
<para style="terp_default_Bold_Right_9">[[ o.product_qty ]] [[ o.product_uom.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.code ]]</para>
|
||||
<para style="terp_default_Bold_Centre_9">[[ o.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -116,10 +118,10 @@
|
||||
<blockTable colWidths="166.0,208.0,79.0,55.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1"><font color="white">[[ '... '*(l['level']) ]]</font>-[[ l['name'] ]]</para>
|
||||
<para style="P1"><font color="white">[[ '... '*2*(l['level']) ]]</font>-[[ l['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ l['pname'] ]]</para>
|
||||
<para style="P1"><font> [ [[ (l['pcode']) or removeParentNode('font') ]] ] </font> <font> [[ l['pname'] ]] </font> </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ l['pqty'] ]] [[ l['uname'] ]]</para>
|
||||
|
||||
@@ -48,18 +48,18 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="6">
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')),('date_start','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Production performed in last 365 Days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
<filter icon="terp-go-year" string="Year"
|
||||
domain="[('year','=',time.strftime('%%Y'))]"
|
||||
help="Production performed during current year"/>
|
||||
<filter icon="terp-go-month" string="Month"
|
||||
name="month"
|
||||
domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')), ('date_start','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Production performed in last 30 days"/>
|
||||
domain="[('month','=',time.strftime('%%m'))]"
|
||||
help="Production performed during current month"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
string="Month -1"
|
||||
separator="1"
|
||||
domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')), ('date_start','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Production during last 7 days"/>
|
||||
domain="[('date_start','<=', time.strftime('%%Y-%%m-%%d')), ('date_start','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Production during last month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Current" icon="terp-check" domain="[('state','in',('open','draft'))]"/>
|
||||
<filter icon="terp-check" string="In Production" domain="[('state','=','in_production')]"/>
|
||||
@@ -79,10 +79,12 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" name="terp-go-month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<field name="model">report.workcenter.load</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Work Ccenters load">
|
||||
<field name="name" select="1"/>
|
||||
<field name="workcenter_id" select="1"/>
|
||||
<tree string="Work Centers load">
|
||||
<field name="name"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="cycle"/>
|
||||
<field name="hour"/>
|
||||
</tree>
|
||||
@@ -22,26 +22,23 @@
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Work Center load" type="bar">
|
||||
<field name="name"/>
|
||||
<field group="True" name="name"/>
|
||||
<field name="cycle" operator="+"/>
|
||||
<field name="hour" operator="+"/>
|
||||
<field group="True" name="workcenter_id"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_workcenter_load_form" model="ir.ui.view">
|
||||
<field name="name">report.workcenter.load.form</field>
|
||||
|
||||
<record id="view_workcenter_load_search" model="ir.ui.view">
|
||||
<field name="name">report.workcenter.load.search</field>
|
||||
<field name="model">report.workcenter.load</field>
|
||||
<field name="type">form</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Work Center load" type="bar">
|
||||
<field name="name" select="1"/>
|
||||
<field name="workcenter_id" select="1"/>
|
||||
<field name="cycle"/>
|
||||
<field name="hour"/>
|
||||
</form>
|
||||
<search string="Work Center load">
|
||||
<field name="name"/>
|
||||
<field name="workcenter_id" widget="selection"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_report_workcenter_load_tree" model="ir.actions.act_window">
|
||||
@@ -49,6 +46,7 @@
|
||||
<field name="res_model">report.workcenter.load</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="search_view_id" ref="view_workcenter_load_search"/>
|
||||
<field name="help">Work Center Load is a projection of load in a work center given a period. The load is express in hour and cycle (for machines).</field>
|
||||
</record>
|
||||
<menuitem id="next_id_77" name="Reporting"
|
||||
|
||||
@@ -147,6 +147,7 @@ class report_custom(report_int):
|
||||
FROM mrp_production_workcenter_line, mrp_production, mrp_workcenter, resource_resource \
|
||||
WHERE (mrp_production_workcenter_line.production_id=mrp_production.id) \
|
||||
AND (mrp_production_workcenter_line.workcenter_id=mrp_workcenter.id) \
|
||||
AND (mrp_workcenter.resource_id=resource_resource.id) \
|
||||
AND (mrp_workcenter.id=%s) \
|
||||
AND (mrp_production.date_planned BETWEEN %s AND %s) \
|
||||
GROUP BY mrp_production_workcenter_line.workcenter_id, resource_resource.name, mrp_workcenter.id \
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
|
||||
-
|
||||
I am checking Procurement orders.
|
||||
I am checking Procurement orders for components of PC1.
|
||||
-
|
||||
!python {model: procurement.order}: |
|
||||
from tools.translate import _
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
<button icon='gtk-stop' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="change_prod_qty" string="Approve"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</group>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
<button icon='gtk-stop' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="print_report" string="Print"
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<label string="" colspan="2" />
|
||||
<group col="2" colspan="1">
|
||||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
<button icon='gtk-stop' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="do_produce" string="Confirm"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</group>
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
<field name="measure_unit"/>
|
||||
<newline/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
<button icon='gtk-stop' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="print_report" string="Print"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
import ir
|
||||
import datetime
|
||||
import netsvc
|
||||
import time
|
||||
@@ -135,8 +134,6 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
result = super(mrp_production_workcenter_line, self).write(cr, uid, ids, vals, context=context)
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
if vals.get('date_planned', False) and update:
|
||||
pids = {}
|
||||
pids2 = {}
|
||||
for prod in self.browse(cr, uid, ids, context=context):
|
||||
if prod.production_id.workcenter_lines:
|
||||
dstart = min(vals['date_planned'], prod.production_id.workcenter_lines[0]['date_planned'])
|
||||
@@ -496,25 +493,25 @@ class mrp_operations_operation(osv.osv):
|
||||
production_obj=self.pool.get('mrp.production').browse(cr,uid,vals['production_id'])
|
||||
wc_op_id.append(self.pool.get('mrp.production.workcenter.line').create(cr,uid,{'production_id':vals['production_id'],'name':production_obj.product_id.name,'workcenter_id':vals['workcenter_id']}))
|
||||
if code.start_stop=='start':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
|
||||
self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_start_working', cr)
|
||||
|
||||
|
||||
if code.start_stop=='done':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
|
||||
self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
|
||||
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
|
||||
|
||||
if code.start_stop=='pause':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
|
||||
self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_pause', cr)
|
||||
|
||||
if code.start_stop=='resume':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_resume(cr,uid,wc_op_id)
|
||||
self.pool.get('mrp.production.workcenter.line').action_resume(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_resume', cr)
|
||||
|
||||
if code.start_stop=='cancel':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,wc_op_id)
|
||||
self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_cancel', cr)
|
||||
|
||||
if not self.check_operation(cr, uid, vals):
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/form/field[@name='hour']" position="after">
|
||||
<group colspan="8" col="8">
|
||||
<field name="state"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close" help="Finish Order"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
@@ -32,12 +32,12 @@
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/tree/field[@name='hour']" position="after">
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close"/>
|
||||
<field name="state"/>
|
||||
</xpath>
|
||||
</field>
|
||||
@@ -49,7 +49,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" eval="False"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Work Orders" colors="gray:state in ('done','cancel');black:state in ('draft','startworking');red: state=='pause'">
|
||||
<tree string="Work Orders" colors="gray:state in ('done','cancel');black:state in ('draft','startworking') and date_planned>=current_date;red:date_planned<current_date and state not in ('done','cancel')">
|
||||
<field name="production_id"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="product"/>
|
||||
@@ -61,11 +61,11 @@
|
||||
<field name="hour"/>
|
||||
<field name="state" />
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward" help="Start Working"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel" help="Cancel Order"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok" help="Finish Order"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close" help="Finish Order"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -111,15 +111,15 @@
|
||||
<field name="uom"/>
|
||||
</group>
|
||||
|
||||
<separator string="State" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="8" col="8">
|
||||
<field name="state"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
|
||||
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop"/>
|
||||
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
|
||||
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -153,9 +153,9 @@
|
||||
<field name="date_planned" widget="date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By" colspan="10" col="8" groups="base.group_extended">
|
||||
<filter string="Workcenter" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'workcenter_id'}"/>
|
||||
<filter string="Production" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'production_id'}"/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="8" groups="base.group_extended">
|
||||
<filter string="Workcenter" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/>
|
||||
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
@@ -249,7 +249,7 @@
|
||||
|
||||
</record>
|
||||
|
||||
<menuitem action="mrp.mrp_production_action"
|
||||
<menuitem action="mrp.mrp_production_action_planning"
|
||||
id="menu_mrp_production_order_action"
|
||||
parent="menu_mrp_planning" sequence="1"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
@@ -109,7 +109,7 @@ class mrp_repair(osv.osv):
|
||||
('invoice_except','Invoice Exception'),
|
||||
('done','Done'),
|
||||
('cancel','Cancel')
|
||||
], 'Repair State', readonly=True,
|
||||
], 'State', readonly=True,
|
||||
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed repair order. \
|
||||
\n* The \'Confirmed\' state is used when a user confirms the repair order. \
|
||||
\n* The \'Ready to Repair\' state is used to start to repairing, user can start repairing only after repair order is confirmed. \
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
<field name="model">mrp.repair</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Repairs order">
|
||||
<field name="name" select="1" />
|
||||
<tree string="Repairs order" colors="gray:state in ('done','cancel');black:state not in ('done','cancel');blue:state=='draft'">
|
||||
<field name="name" select="1" />
|
||||
<field name="product_id" select="1" />
|
||||
<field name="prodlot_id"/>
|
||||
<field name="move_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="address_id"/>
|
||||
<field name="location_id"/>
|
||||
<field name="move_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="guarantee_limit"/>
|
||||
<field name="state"/>
|
||||
@@ -94,22 +93,22 @@
|
||||
<field name="amount_untaxed" sum="Untaxed amount"/>
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total" sum="Total amount"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" type="object"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="13" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="gtk-apply"/>
|
||||
<button name="repair_ready" states="confirmed" string="Start Repair" icon="gtk-go-forward"/>
|
||||
<button name="action_repair_start" states="ready" string="Start Repair" icon="gtk-go-forward"/>
|
||||
<button name="action_repair_end" states="under_repair" string="End Repair" icon="gtk-ok"/>
|
||||
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-convert"/>
|
||||
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="gtk-apply"/>
|
||||
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="gtk-ok"/>
|
||||
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-cancel"/>
|
||||
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="terp-camera_test"/>
|
||||
<button name="repair_ready" states="confirmed" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="action_repair_start" states="ready" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="action_repair_end" states="under_repair" string="End Repair" icon="terp-dialog-close"/>
|
||||
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="terp-dolar"/>
|
||||
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="terp-emblem-important"/>
|
||||
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="terp-dolar"/>
|
||||
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-stop"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-cancel"/>
|
||||
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-cancel"/>
|
||||
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-stop"/>
|
||||
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-stop"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Invoicing">
|
||||
@@ -153,18 +152,18 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Quality">
|
||||
<separator colspan="4" string="Internal Notes"/>
|
||||
<field colspan="4" name="internal_notes" nolabel="1"/>
|
||||
<separator colspan="4" string="Quotation Notes"/>
|
||||
<field colspan="4" name="quotation_notes" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
<field name="invoice_id"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<separator colspan="4" string="Internal Notes"/>
|
||||
<field colspan="4" name="internal_notes" nolabel="1"/>
|
||||
<separator colspan="4" string="Quotation Notes"/>
|
||||
<field colspan="4" name="quotation_notes" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
@@ -183,7 +182,7 @@
|
||||
<filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
|
||||
<filter icon="terp-emblem-important" string="Ready To Repair" domain="[('state','=','ready')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-dolar" string="invoiced" domain="[('state','=','2binvoiced')]"/>
|
||||
<filter icon="terp-dolar" string="invoiced" domain="[('invoiced','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
@@ -192,10 +191,11 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="8" groups="base.group_extended">
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
||||
@@ -69,8 +69,8 @@ class repair_cancel(osv.osv_memory):
|
||||
<group col="2" colspan="2">
|
||||
<label string="Do you want to continue?" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="No" readonly="0"/>
|
||||
<button name="cancel_repair" string="Yes" type="object" icon="gtk-ok"/>
|
||||
<button icon="gtk-stop" special="cancel" string="_No" readonly="0"/>
|
||||
<button name="cancel_repair" string="_Yes" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
"""
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<label string="This operation will cancel the Repair process, but will not cancel it's Invoice. Do you want to continue?" colspan="4"/>
|
||||
<newline/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="No" />
|
||||
<button name="cancel_repair" string="Yes"
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="_No" />
|
||||
<button name="cancel_repair" string="_Yes"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<field name="group"/>
|
||||
<newline/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
<button name="make_invoices" string="Create Invoice"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="_Cancel" />
|
||||
<button name="make_invoices" string="Create _Invoice"
|
||||
colspan="1" type="object" icon="terp-dolar" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -31,8 +31,7 @@ class outlook_installer(osv.osv_memory):
|
||||
|
||||
def default_get(self, cr, uid, fields, context={}):
|
||||
data = super(outlook_installer, self).default_get(cr, uid, fields, context)
|
||||
doc_file = open(config['addons_path'] + "/outlook/doc/Installation Guide to OpenERP Outlook Plug-in.doc", 'r')
|
||||
data['doc_file'] = base64.encodestring(doc_file.read())
|
||||
data['doc_file'] = 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_outlook.html'
|
||||
file = open(config['addons_path'] + "/outlook/plugin/openerp-outlook-plugin.zip", 'r')
|
||||
data['plugin_file'] = base64.encodestring(file.read())
|
||||
return data
|
||||
@@ -42,7 +41,7 @@ class outlook_installer(osv.osv_memory):
|
||||
'doc_name':fields.char('File name', size=64),
|
||||
'outlook':fields.boolean('Outlook Plug-in ', help="Allows you to select an object that you’d like to add to your email and its attachments."),
|
||||
'plugin_file':fields.binary('Outlook Plug-in', readonly=True, help="outlook plug-in file. Save as this file and install this plug-in in outlook."),
|
||||
'doc_file':fields.binary('Installation Manual', help="The documentation file :- how to install Outlook Plug-in.", readonly=True),
|
||||
'doc_file':fields.char('Installation Manual',size="264",help="The documentation file :- how to install Outlook Plug-in.", readonly=True),
|
||||
'description':fields.text('Description', readonly=True)
|
||||
}
|
||||
|
||||
@@ -63,7 +62,7 @@ How to install openerp-outlook plug-in?
|
||||
3. Run “Register-plugin.bat” file.
|
||||
4. Run Outlook and Check addon has been registered.
|
||||
5. Tools->OpenERP Configuration and test your connection.
|
||||
6. See User Guide for more information.
|
||||
6. See User Guide for more information.
|
||||
7. Keep All extratced files in some safe places
|
||||
(e.g. python installation Directory "C:\pythonXX\" or Windows installation Directory "C:\Program Files\" ).
|
||||
"""
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<newline/>
|
||||
<field name="plugin_file" filename="name"/>
|
||||
<newline/>
|
||||
<field name="doc_file" filename="doc_name"/>
|
||||
<field name="doc_file" filename="doc_name" widget="url"/>
|
||||
<newline/>
|
||||
<separator string="Installation and Configuration Steps" colspan="4"/>
|
||||
<field name="description" nolabel="1" colspan="8"/>
|
||||
@@ -74,20 +74,15 @@
|
||||
<field name="context">{'menu':True}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="base.menu_base_config_mail"
|
||||
name="Mail"
|
||||
parent="base.menu_base_config"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="base.menu_base_config_plugins"
|
||||
name="Plugins"
|
||||
parent="base.menu_base_config_mail"
|
||||
<menuitem id="base.menu_base_config_plugins"
|
||||
name="Plugins"
|
||||
parent="base.menu_base_config"
|
||||
sequence="10" />
|
||||
|
||||
<menuitem id="menu_base_config_plugins_outlook"
|
||||
action="action_outlook_wizard"
|
||||
name="Outlook Plug-In"
|
||||
parent="base.menu_base_config_plugins"
|
||||
|
||||
<menuitem id="menu_base_config_plugins_outlook"
|
||||
action="action_outlook_wizard"
|
||||
name="Outlook Plug-In"
|
||||
parent="base.menu_base_config_plugins"
|
||||
sequence="10" />
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -86,7 +86,7 @@ EXSTYLE WS_EX_CONTEXTHELP
|
||||
CAPTION "About"
|
||||
FONT 8, "Tahoma", 400, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "About Plugin",IDC_STATIC,7,3,422,200
|
||||
GROUPBOX "About OpenERP Outlook Plugin",IDC_STATIC,7,3,422,200
|
||||
CONTROL 1062,IDB_OPENERPLOGO,"Static",SS_BITMAP | SS_REALSIZEIMAGE,60,30,20,20
|
||||
LTEXT "",IDC_ABOUT,80,90,250,100
|
||||
END
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_crm_opportunity_geo_assign_form" model="ir.ui.view">
|
||||
<field name="name">crm.lead.geo_assign.inherit</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//notebook[last()]/page[@string='Assignation']/group[@name='partner_assign_group']" position="after">
|
||||
<group name="geo_assign_group" col="5" colspan="4">
|
||||
<separator string="Geo Assignation" colspan="5"/>
|
||||
<field name="partner_latitude"/>
|
||||
<field name="partner_longitude"/>
|
||||
<group colspan="1" col="1">
|
||||
<button string="Geo Assign" name="assign_partner" type="object" colspan="1"
|
||||
icon="gtk-apply"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//notebook[last()]/page[@string='Assignation']/group[@name='partner_assign_group']/field[@name='partner_assigned_id']" position="attributes">
|
||||
<attribute name="domain">[('partner_weight','>',0)]</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_crm_partner_geo_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="inside">
|
||||
<page string="Geo Localization">
|
||||
<field name="partner_weight"/>
|
||||
<label string="" colspan="1"/>
|
||||
<button
|
||||
string="Geo Localize"
|
||||
name="geo_localize"
|
||||
icon="gtk-apply"
|
||||
type="object"/>
|
||||
<newline/>
|
||||
<field name="partner_latitude"/>
|
||||
<field name="partner_longitude"/>
|
||||
<field name="date_localization"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -280,8 +280,8 @@ class pos_order(osv.osv):
|
||||
'date_validation': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True),
|
||||
'date_payment': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True),
|
||||
'date_validity': fields.date('Validity Date', required=True),
|
||||
'user_id': fields.many2one('res.users', 'Connected Salesman'),
|
||||
'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True),
|
||||
'user_id': fields.many2one('res.users', 'Connected Salesman', help="Person who uses the the register. It could be a reliever, a student or an interim employee."),
|
||||
'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True, help="User who is logged into the system."),
|
||||
'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
|
||||
'amount_tax': fields.function(_amount_all, method=True, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
|
||||
'amount_total': fields.function(_amount_total, method=True, string='Total'),
|
||||
@@ -295,7 +295,7 @@ class pos_order(osv.osv):
|
||||
'payments': fields.one2many('pos.payment', 'order_id', 'Order Payments', states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'partner_id': fields.many2one( 'res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
|
||||
'state': fields.selection([('draft', 'Draft'), ('payment', 'Payment'),
|
||||
'state': fields.selection([('draft', 'Quotation'), ('payment', 'Payment'),
|
||||
('advance','Advance'),
|
||||
('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
|
||||
'State', readonly=True, ),
|
||||
@@ -358,7 +358,7 @@ class pos_order(osv.osv):
|
||||
|
||||
|
||||
def test_order_lines(self, cr, uid, order, context=None):
|
||||
""" Test order line is created or not for the order "
|
||||
""" Test order line is created or not for the order "
|
||||
@param name: Names of fields.
|
||||
@return: True
|
||||
"""
|
||||
@@ -581,7 +581,7 @@ class pos_order(osv.osv):
|
||||
account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context)
|
||||
args['account_id'] = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def.id or curr_c.account_receivable.id
|
||||
if data.get('is_acc',False):
|
||||
args['is_acc']=data['is_acc']
|
||||
args['is_acc'] = data['is_acc']
|
||||
args['account_id']= prod_obj.browse(cr,uid, data['product_id']).property_account_income and prod_obj.browse(cr,uid, data['product_id']).property_account_income.id
|
||||
if not args['account_id']:
|
||||
raise osv.except_osv(_('Error'), _('Please provide an account for the product: %s')%(prod_obj.browse(cr,uid, data['product_id']).name))
|
||||
@@ -631,7 +631,7 @@ class pos_order(osv.osv):
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_write(uid, 'pos.order', order_id, cr)
|
||||
|
||||
return order_line_id
|
||||
return order_line_id, price
|
||||
|
||||
def refund(self, cr, uid, ids, context=None):
|
||||
"""Create a copy of order for refund order"""
|
||||
@@ -1270,9 +1270,9 @@ pos_payment()
|
||||
class product_product(osv.osv):
|
||||
_inherit = 'product.product'
|
||||
_columns = {
|
||||
'income_pdt': fields.boolean('Product for Incoming'),
|
||||
'income_pdt': fields.boolean('Product for Input'),
|
||||
'expense_pdt': fields.boolean('Product for expenses'),
|
||||
'am_out': fields.boolean('Controle for Outgoing Operations'),
|
||||
'am_out': fields.boolean('Controle for Output Operations'),
|
||||
'disc_controle': fields.boolean('Discount Controle '),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order POS">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="date_order"/>
|
||||
<field name="shop_id" widget="selection"/>
|
||||
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
|
||||
<field name="contract_number" groups="base.group_extended"/>
|
||||
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Sale Order ">
|
||||
<notebook colspan="4">
|
||||
<page string="Sale Order">
|
||||
<field name="lines" colspan="4" nolabel="1">
|
||||
<tree string="Order lines" editable="bottom">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275" />
|
||||
@@ -29,7 +31,7 @@
|
||||
<field name="price_subtotal" />
|
||||
<field name="price_subtotal_incl" sum="Subtotal"/>
|
||||
</tree>
|
||||
<form string="Order lines" >
|
||||
<form string="Order lines">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275"/>
|
||||
<field name="qty"/>
|
||||
<field name="qty_rfd" groups="base.group_extended"/>
|
||||
@@ -39,46 +41,23 @@
|
||||
<field name="notice"/>
|
||||
<field name="serial_number"/>
|
||||
</form>
|
||||
|
||||
</field>
|
||||
<group colspan="4" col="7">
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Actions"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="state" />
|
||||
<button name="%(action_pos_payment)d" string="Ma_ke Payment" icon="gtk-ok" type="action" states="draft,advance" />
|
||||
<button name="%(action_report_pos_receipt)d" string="_Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
|
||||
<button name="%(action_pos_payment)d" string="Make Payment" icon="terp-dolar" type="action" states="draft,advance" />
|
||||
<button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
|
||||
<button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" />
|
||||
<button name="%(action_view_pos_return)d" string="Return Picking" type="action" icon="gtk-ok" states="paid"
|
||||
attrs="{'invisible':[('state','!=','paid'),('state','!=','invoiced')]}" context="{'return':'return'}" />
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Order and Payment">
|
||||
<group colspan="2" col="2" name="Type">
|
||||
<separator string="Order Information" colspan="4"/>
|
||||
<field name="name"/>
|
||||
<field name="shop_id" widget="selection"/>
|
||||
<field name="user_salesman_id" />
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="price_type" />
|
||||
<field name="user_id" string="Salesman" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="Type">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_order"/>
|
||||
<field name="date_validation" />
|
||||
<field name="date_payment" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)" invisible="1"/>
|
||||
<field name="sale_journal" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
|
||||
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
|
||||
</group>
|
||||
|
||||
<page string="Payment">
|
||||
<field name="statement_ids" colspan="4" nolabel="1">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<field name="amount"/>
|
||||
@@ -92,12 +71,28 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="Extra Info">
|
||||
<group colspan="2" col="2" name="Type">
|
||||
<separator string="Other Information" colspan="4"/>
|
||||
<field name="user_salesman_id" />
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="price_type" />
|
||||
<field name="user_id" string="Salesman" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="Type">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_validation" />
|
||||
<field name="date_payment" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<field name="sale_journal" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
|
||||
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Notes" >
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -114,16 +109,17 @@
|
||||
<field name="model">pos.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS Orders">
|
||||
<tree string="POS Orders" colors="blue:state == 'draft';gray:state in ('done','cancel');black:state not in('done','cancel')">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="date_order"/>
|
||||
<field name="date_validation"/>
|
||||
<field name="date_payment"/>
|
||||
<field name="user_id"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="state" />
|
||||
<field name="amount_total" sum="Amount total"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -136,16 +132,18 @@
|
||||
<filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-check" string="Running" domain="[('state','in',('payment','advance'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date_order" select="1" string="Order date" />
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date_order" string="Order date"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="11" col="11" groups="base.group_extended">
|
||||
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator string="" orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator string="" orientation="vertical"/>
|
||||
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -788,33 +786,6 @@
|
||||
action="action_box_out"
|
||||
id="menu_wizard_enter_jrnl2" sequence="3" />
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_order_tree_all_sales">
|
||||
<field name="name">POS Sales</field>
|
||||
<field name="model">pos.order</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="POS Orders">
|
||||
<field name="name"/>
|
||||
<field name="date_order" select="1"/>
|
||||
<field name="partner_id" />
|
||||
<field name="date_validation"/>
|
||||
<field name="date_payment"/>
|
||||
<field name="user_id"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="note" select="1" />
|
||||
<field name="state" select="1"/>
|
||||
<field name="amount_total" sum="Amount total"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_pos_all_sales">
|
||||
<field name="name">All sales</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_pos_order_tree_all_sales" />
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_pos_order_tree_all_sales_lines">
|
||||
<field name="name">POS Sales Lines</field>
|
||||
<field name="model">pos.order.line</field>
|
||||
|
||||
@@ -37,12 +37,20 @@ class pos_payment_report_date(report_sxw.rml_parse):
|
||||
dt1 = form['date_start'] + ' 00:00:00'
|
||||
dt2 = form['date_end'] + ' 23:59:59'
|
||||
data={}
|
||||
self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
|
||||
"(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \
|
||||
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
|
||||
,(dt1,dt2,tuple(form['user_id'])))
|
||||
if form['user_id']:
|
||||
self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
|
||||
"(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \
|
||||
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
|
||||
,(dt1,dt2,tuple(form['user_id'])))
|
||||
else:
|
||||
self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
|
||||
"(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) as total " \
|
||||
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s" \
|
||||
,(dt1,dt2))
|
||||
data=self.cr.dictfetchall()
|
||||
return data
|
||||
|
||||
@@ -50,11 +58,18 @@ class pos_payment_report_date(report_sxw.rml_parse):
|
||||
dt1 = form['date_start'] + ' 00:00:00'
|
||||
dt2 = form['date_end'] + ' 23:59:59'
|
||||
res=[]
|
||||
self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
|
||||
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
|
||||
,(dt1,dt2,tuple(form['user_id'])))
|
||||
if form['user_id']:
|
||||
self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
|
||||
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
|
||||
,(dt1,dt2,tuple(form['user_id'])))
|
||||
else:
|
||||
self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \
|
||||
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \
|
||||
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
|
||||
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s" \
|
||||
,(dt1,dt2))
|
||||
res=self.cr.fetchone()[0] or 0.0
|
||||
return res
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class report_cash_register(osv.osv):
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
'state':fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')],'State'),
|
||||
'state': fields.selection([('draft', 'Quotation'),('open','Open'),('confirm', 'Confirmed')],'State'),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal'),
|
||||
'balance_start': fields.float('Opening Balance'),
|
||||
'balance_end_real': fields.float('Closing Balance'),
|
||||
|
||||
@@ -27,17 +27,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Point of Sale Cash Register Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Cash Analysis created last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Cash Analysis created in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
<filter icon="terp-go-year" string="Year"
|
||||
domain="[('year','=',time.strftime('%%Y'))]"
|
||||
help="Cash Analysis created during this year"/>
|
||||
<filter icon="terp-go-month" string="Month"
|
||||
domain="[('month','=',time.strftime('%%m'))]"
|
||||
help="Cash Analysis created in current month"/>
|
||||
<filter icon="terp-go-month"
|
||||
string="Month -1"
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Cash Analysis created last 7 days"/>
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Cash Analysis created in last month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-today"
|
||||
string=" Today "
|
||||
@@ -67,16 +67,16 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Day from Creation date of register"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Month from Creation date of register"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Year from Creation date of register"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_cash_register_all" model="ir.actions.act_window">
|
||||
<field name="name">Cash Register Analysis</field>
|
||||
<field name="name">Register Analysis</field>
|
||||
<field name="res_model">report.cash.register</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
||||
@@ -88,6 +88,8 @@ class report_pos_order(osv.osv):
|
||||
to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),
|
||||
to_char(s.date_order, 'YYYY-MM-DD'), s.partner_id,s.state,
|
||||
s.user_id,s.shop_id,s.company_id,s.sale_journal,l.product_id,s.date_validation,
|
||||
s.date_payment)""")
|
||||
s.date_payment
|
||||
having
|
||||
sum(l.qty * u.factor) != 0)""")
|
||||
|
||||
report_pos_order()
|
||||
|
||||
@@ -38,20 +38,20 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Point of Sale Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="POS ordered created last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="POS ordered created in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
<filter icon="terp-go-year" string="Year"
|
||||
domain="[('year','=',time.strftime('%%Y'))]"
|
||||
help="POS ordered created during current year"/>
|
||||
<filter icon="terp-go-month" string="Month"
|
||||
domain="[('month','=',time.strftime('%%m'))]"
|
||||
help="POS ordered created during current month"/>
|
||||
<filter icon="terp-go-month"
|
||||
string="Month -1"
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="POS ordered created last 7 days"/>
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="POS ordered created last month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-today"
|
||||
string=" Today "
|
||||
string="Today"
|
||||
name="today"
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d'))]"
|
||||
@@ -79,9 +79,9 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Day of order date"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Month of order date"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Year of order date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"access_report_pos_order_system","report.pos.order.system","model_report_pos_order","base.group_system",1,1,1,1
|
||||
"access_report_pos_order","report.pos.order","model_report_pos_order","group_pos_manager",1,1,1,1
|
||||
"access_account_bank_statement","account.bank.statement","account.model_account_bank_statement","group_pos_user",1,1,1,0
|
||||
"access_account_bank_statement_manager","account.bank.statement manager","account.model_account_bank_statement","group_pos_manager",1,0,0,0
|
||||
"access_account_bank_statement_manager","account.bank.statement manager","account.model_account_bank_statement","group_pos_manager",1,1,1,1
|
||||
"access_account_bank_statement_system","account.bank.statement system","account.model_account_bank_statement","base.group_system",1,0,0,0
|
||||
"access_account_bank_statement_line","account.bank.statement.line","account.model_account_bank_statement_line","group_pos_user",1,1,1,0
|
||||
"access_account_period_pos","account.period pos user","account.model_account_period","group_pos_user",1,1,1,0
|
||||
@@ -35,11 +35,13 @@
|
||||
"access_account_fiscalyear_pos_manager","account.fiscalyear manager","account.model_account_fiscalyear","group_pos_manager",1,0,0,0
|
||||
"access_account_fiscalyear_pos_system","account.fiscalyear user","account.model_account_fiscalyear","base.group_system",1,0,0,0
|
||||
"access_account_cashbox_line","account.cashbox.line","account.model_account_cashbox_line","group_pos_user",1,1,1,0
|
||||
"access_account_cashbox_line_manager","account.cashbox.line manager","account.model_account_cashbox_line","group_pos_manager",1,1,1,1
|
||||
"access_product_product","product.product","product.model_product_product","group_pos_user",1,0,0,0
|
||||
"access_product_template_pos_user","product.template pos user","product.model_product_template","group_pos_user",1,0,0,0
|
||||
"access_product_product_pos_manager","product.product.pos manager","product.model_product_product","group_pos_manager",1,0,0,0
|
||||
"access_product_template_pos_manager","product.template pos manager","product.model_product_template","group_pos_manager",1,0,0,0
|
||||
"access_account_move_line","account.move.line","account.model_account_move_line","group_pos_user",1,1,1,0
|
||||
"access_account_move_line_manager","account.move.line manager","account.model_account_move_line","group_pos_manager",1,1,1,1
|
||||
"access_account_move","account.move","account.model_account_move","group_pos_user",1,1,1,0
|
||||
"access_account_journal","account.journal","account.model_account_journal","group_pos_user",1,1,1,0
|
||||
"access_account_journal_manager","account.journal manager","account.model_account_journal","group_pos_manager",1,0,0,0
|
||||
@@ -57,7 +59,7 @@
|
||||
"access_product_template_pos","product.template pos","product.model_product_template","base.group_system",1,1,1,1
|
||||
"access_pos_order_system","pos.order system","model_pos_order","base.group_system",1,0,0,0
|
||||
"access_pos_order_line_system","pos.order.line system","model_pos_order_line","base.group_system",1,0,0,0
|
||||
"access_account_bank_statement_line_manager","account.bank.statement.line manager","account.model_account_bank_statement_line","group_pos_manager",1,0,0,0
|
||||
"access_account_bank_statement_line_manager","account.bank.statement.line manager","account.model_account_bank_statement_line","group_pos_manager",1,1,1,1
|
||||
"access_account_invoice_manager","account.invoice manager","account.model_account_invoice","group_pos_manager",1,1,1,1
|
||||
"access_pos_payment_manager","pos.payment manager","model_pos_payment","group_pos_manager",1,0,0,0
|
||||
"access_report_transaction_pos_system","report.transaction.pos system","model_report_transaction_pos","base.group_system",1,1,1,1
|
||||
|
||||
|
@@ -32,6 +32,57 @@
|
||||
id="menu_all_menu_cash_register"
|
||||
sequence="4"
|
||||
/>-->
|
||||
|
||||
<record id="view_pos_open_cash_statement_filter" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Cash Statements">
|
||||
<group col="8" colspan="4">
|
||||
<filter string="Open" domain="[('state','=','open')]" icon="terp-document-new" name="open"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pos_confirm_cash_statement_filter" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.inherit2</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Cash Statements">
|
||||
<group col="8" colspan="4">
|
||||
<filter string="Open" domain="[('state','=','open')]" icon="terp-document-new" name="open"/>
|
||||
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_new_bank_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cash Register</field>
|
||||
@@ -56,8 +107,20 @@
|
||||
<field name="act_window_id" ref="action_new_bank_statement_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="view_cash_statement_pos_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.tree</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="account.view_cash_statement_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="journal_id" position="after">
|
||||
<field name="user_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_new_bank_statement_all_tree" model="ir.actions.act_window">
|
||||
<field name="name">All Register</field>
|
||||
<field name="name">Registers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -68,7 +131,7 @@
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement_all_register1">
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="account.view_bank_statement_tree"/>
|
||||
<field name="view_id" ref="view_cash_statement_pos_tree"/>
|
||||
<field name="act_window_id" ref="action_new_bank_statement_all_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement_all_register">
|
||||
@@ -79,7 +142,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="All Registers"
|
||||
name="Registers"
|
||||
parent="menu_cash_register"
|
||||
action="action_new_bank_statement_all_tree"
|
||||
id="menu_all_menu_all_register"
|
||||
@@ -89,14 +152,14 @@
|
||||
<menuitem name="Register management" parent="point_of_sale.menu_point_root"
|
||||
id="menu_point_open_config" sequence="1"/>
|
||||
<menuitem
|
||||
name="Open my Cash Registers" parent="menu_point_open_config"
|
||||
string="Open my Cash Register"
|
||||
name="Open Registers" parent="menu_point_open_config"
|
||||
string="Open Registers"
|
||||
action="action_pos_open_statement"
|
||||
id="menu_open_statement" sequence="1" />
|
||||
|
||||
<menuitem
|
||||
name="Close my Cash Register" parent="menu_point_open_config"
|
||||
string="Close my Cash Register"
|
||||
name="Close Registers" parent="menu_point_open_config"
|
||||
string="Close Registers"
|
||||
action="action_pos_close_statement"
|
||||
id="menu_close_statement" sequence="2" />
|
||||
|
||||
|
||||
@@ -1,48 +1,40 @@
|
||||
-
|
||||
In order to test the POS in module, To gives business owners a convenient way of checking out customers and of recording sales.
|
||||
In order to test the POS in module, To give business owners a convenient way of checking out customers and of recording sales.
|
||||
|
||||
-
|
||||
I configure all details for the customer,Salesman and Product ,Account.
|
||||
I configure all details for the Customer, Salesman and Product, Account.
|
||||
-
|
||||
I create View Account Type.
|
||||
I create View Account Type.
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_view0}:
|
||||
close_method: none
|
||||
code: View
|
||||
name: View
|
||||
sign: 1
|
||||
|
||||
|
||||
-
|
||||
I create Income Account Type.
|
||||
I create Income Account Type.
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_income0}:
|
||||
close_method: unreconciled
|
||||
code: Income
|
||||
name: Income
|
||||
sign: 1
|
||||
|
||||
|
||||
-
|
||||
I create Expense Account Type.
|
||||
I create Expense Account Type.
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_expense0}:
|
||||
close_method: unreconciled
|
||||
code: Expense
|
||||
name: Expense
|
||||
sign: 1
|
||||
|
||||
|
||||
-
|
||||
I create Cash Account Type.
|
||||
I create Cash Account Type.
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_cash0}:
|
||||
close_method: balance
|
||||
code: Cash
|
||||
name: Cash
|
||||
sign: 1
|
||||
|
||||
|
||||
-
|
||||
I create Minimal Chart Account.
|
||||
-
|
||||
@@ -69,8 +61,6 @@
|
||||
reconcile: true
|
||||
type: payable
|
||||
user_type: account_account_type_expense0
|
||||
|
||||
|
||||
-
|
||||
I create Receivable Account.
|
||||
-
|
||||
@@ -85,8 +75,6 @@
|
||||
reconcile: true
|
||||
type: receivable
|
||||
user_type: account_account_type_income0
|
||||
|
||||
|
||||
-
|
||||
I create Cash Account.
|
||||
-
|
||||
@@ -100,8 +88,6 @@
|
||||
parent_right: 7
|
||||
type: other
|
||||
user_type: account_account_type_cash0
|
||||
|
||||
|
||||
-
|
||||
I create Purchases Account.
|
||||
-
|
||||
@@ -116,7 +102,7 @@
|
||||
type: other
|
||||
user_type: account_account_type_expense0
|
||||
-
|
||||
I create Sales Account.
|
||||
I create Sales Account.
|
||||
-
|
||||
!record {model: account.account, id: account_account_sales0}:
|
||||
code: Sale
|
||||
@@ -128,7 +114,6 @@
|
||||
parent_right: 11
|
||||
type: other
|
||||
user_type: account_account_type_income0
|
||||
|
||||
-
|
||||
I create Purchase Journal.
|
||||
-
|
||||
@@ -141,10 +126,8 @@
|
||||
sequence_id: account.sequence_purchase_journal
|
||||
type: purchase
|
||||
view_id: account.account_journal_view
|
||||
|
||||
|
||||
-
|
||||
I create Sale Journal.
|
||||
I create Sale Journal.
|
||||
-
|
||||
!record {model: account.journal, id: account_journal_salejournal0}:
|
||||
code: SAJ
|
||||
@@ -155,10 +138,8 @@
|
||||
sequence_id: account.sequence_sale_journal
|
||||
type: sale
|
||||
view_id: account.account_journal_view
|
||||
|
||||
|
||||
-
|
||||
I create Bank Journal.
|
||||
I create Bank Journal.
|
||||
-
|
||||
!record {model: account.journal, id: account_journal_bankjournal0}:
|
||||
code: BNK
|
||||
@@ -169,7 +150,6 @@
|
||||
sequence_id: account.sequence_journal
|
||||
type: cash
|
||||
view_id: account.account_journal_bank_view
|
||||
|
||||
-
|
||||
I create property for account payable.
|
||||
-
|
||||
@@ -178,10 +158,8 @@
|
||||
fields_id: account.field_res_partner_property_account_payable
|
||||
name: property_account_expense_categ
|
||||
value_reference: account.account,5
|
||||
|
||||
|
||||
-
|
||||
I create property for account receivable.
|
||||
I create property for account receivable.
|
||||
-
|
||||
!record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
|
||||
company_id: base.main_company
|
||||
@@ -200,25 +178,19 @@
|
||||
category_id:
|
||||
- res_partner_category_customers0
|
||||
name: Cleartrail
|
||||
|
||||
|
||||
-
|
||||
I create partner address.
|
||||
I create partner address.
|
||||
-
|
||||
!record {model: res.partner.address, id: res_partner_address_1}:
|
||||
partner_id: res_partner_cleartrail0
|
||||
street: onam plaza, 14 B palasia A B Road
|
||||
type: contact
|
||||
|
||||
|
||||
-
|
||||
I create partner invoice address.
|
||||
-
|
||||
!record {model: res.partner.address, id: res_partner_address_2}:
|
||||
partner_id: res_partner_cleartrail0
|
||||
type: invoice
|
||||
|
||||
|
||||
-
|
||||
I create partner delivery address.
|
||||
-
|
||||
@@ -241,7 +213,6 @@
|
||||
property_account_payable: account_account_payable1
|
||||
property_account_receivable: account_account_receivable0
|
||||
supplier: true
|
||||
|
||||
-
|
||||
I create partner address .
|
||||
-
|
||||
@@ -270,7 +241,6 @@
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
|
||||
-
|
||||
I create product LG Viewty Smart.
|
||||
-
|
||||
@@ -294,7 +264,6 @@
|
||||
-
|
||||
!record {model: product.category, id: product_category_computer0}:
|
||||
name: Computer
|
||||
|
||||
-
|
||||
I create product HP Pavilion Desktop PCs
|
||||
-
|
||||
@@ -315,11 +284,9 @@
|
||||
uom_po_id: product.product_uom_unit
|
||||
property_account_expense: account_account_payable1
|
||||
property_account_income: account_account_receivable0
|
||||
|
||||
-
|
||||
I create New Order by adding the details of Salesman and "Product" as LG Viewty Smart Quantity as 10.
|
||||
-
|
||||
|
||||
!record {model: pos.order, id: pos_order_pos0}:
|
||||
company_id: base.main_company
|
||||
date_order: '2010-05-13 15:02:48'
|
||||
@@ -351,13 +318,11 @@
|
||||
self.apply_discount(cr, uid, [ref("pos_discount_0")], {"lang": "en_US", "active_model":
|
||||
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id":
|
||||
ref("pos_order_pos0"), })
|
||||
|
||||
-
|
||||
I open the register.
|
||||
-
|
||||
!record {model: pos.open.statement, id: pos_open_statement_0}:
|
||||
{}
|
||||
|
||||
-
|
||||
I open the statement.
|
||||
-
|
||||
@@ -365,19 +330,17 @@
|
||||
self.open_statement(cr, uid, [ref("pos_open_statement_0")], {"lang": "en_US", "active_model":
|
||||
"ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
|
||||
False, "active_id": ref("point_of_sale.menu_open_statement"), })
|
||||
|
||||
-
|
||||
I click on the "Make Payment" wizard.
|
||||
-
|
||||
!record {model: pos.make.payment, id: pos_make_payment_0}:
|
||||
amount: 1615.0
|
||||
journal: 7
|
||||
payment_date: 2010-05-13
|
||||
payment_date: "2010-05-13"
|
||||
payment_name: Payment
|
||||
product_id: product_product_hppaviliondesktoppcs0
|
||||
pricelist_id: product.list0
|
||||
partner_id: base.res_partner_agrolait
|
||||
|
||||
-
|
||||
I make the payment.
|
||||
-
|
||||
@@ -391,7 +354,6 @@
|
||||
!python {model: pos.order}: |
|
||||
order=self.browse(cr,uid,ref("pos_order_pos0"))
|
||||
assert(order.statement_ids!=[]), "Statement lines not created"
|
||||
|
||||
-
|
||||
When I click on Return picking button , I get three option.
|
||||
-
|
||||
@@ -412,8 +374,6 @@
|
||||
self.create_returns(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model":
|
||||
"pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz":
|
||||
False, "active_id": ref("point_of_sale.pos_order_pos0"), })
|
||||
|
||||
|
||||
-
|
||||
Then it allows me to define the quantity of products, which will return to the stock.
|
||||
-
|
||||
@@ -432,19 +392,17 @@
|
||||
self.close_action(cr, uid, [ref("pos_add_product_0")], {"lang": "en_US", "active_model":
|
||||
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"),
|
||||
})
|
||||
|
||||
-
|
||||
I create payment.
|
||||
-
|
||||
!record {model: pos.make.payment, id: pos_make_payment_1}:
|
||||
amount: 680.0
|
||||
journal: 7
|
||||
payment_date: 2010-05-13
|
||||
payment_date: "2010-05-13"
|
||||
payment_name: Payment
|
||||
product_id: product_product_hppaviliondesktoppcs0
|
||||
pricelist_id: product.list0
|
||||
partner_id: base.res_partner_agrolait
|
||||
|
||||
-
|
||||
For payment, I click on Make Payment.
|
||||
-
|
||||
@@ -452,7 +410,6 @@
|
||||
self.check(cr, uid, [ref("pos_make_payment_1")], {"lang": "en_US", "active_model":
|
||||
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz":
|
||||
False, "active_id": ref("pos_order_pos0"), })
|
||||
|
||||
-
|
||||
To check the Return without Refund . I click button "Return without Refund ".
|
||||
-
|
||||
|
||||
@@ -36,8 +36,9 @@ def get_journal(self, cr, uid, context):
|
||||
|
||||
obj = self.pool.get('account.journal')
|
||||
statement_obj = self.pool.get('account.bank.statement')
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
ids = obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', user.company_id.id)])
|
||||
cr.execute("""select DISTINCT journal_id from pos_journal_users where user_id=%d order by journal_id"""%(uid))
|
||||
j_ids = map(lambda x1: x1[0], cr.fetchall())
|
||||
ids = obj.search(cr, uid, [('type', '=', 'cash'), ('id', 'in', j_ids)])
|
||||
obj_ids= statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', 'in', ids)])
|
||||
res_obj = obj.read(cr, uid, ids, ['journal_id'], context)
|
||||
res_obj = [(r1['id'])for r1 in res_obj]
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
<field name="journal_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="amount"/>
|
||||
<group colspan="4" col="2">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="get_in" string="Take Money"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
<group col="2" colspan="2"/>
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="get_in" string="Put Money"
|
||||
colspan="1" type="object" icon="terp-dolar_ok!" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -14,12 +14,14 @@
|
||||
<field name="journal_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="amount"/>
|
||||
<group colspan="4" col="2">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="get_out" string="Put Money"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
<group col="2" colspan="2"/>
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="get_out" string="Take Money"
|
||||
colspan="1" type="object" icon="terp-dolar" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -43,28 +43,29 @@ class pos_close_statement(osv.osv_memory):
|
||||
cr.execute("""select DISTINCT journal_id from pos_journal_users where user_id=%d order by journal_id"""%(uid))
|
||||
j_ids = map(lambda x1: x1[0], cr.fetchall())
|
||||
journal_ids = journal_obj.search(cr, uid, [('auto_cash', '=', True), ('type', '=', 'cash'), ('id', 'in', j_ids)])
|
||||
|
||||
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', 'in', journal_ids)])
|
||||
for journal in journal_obj.browse(cr, uid, journal_ids):
|
||||
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
|
||||
if not ids:
|
||||
raise osv.except_osv(_('Message'), _('Journals are already closed'))
|
||||
raise osv.except_osv(_('Message'), _('Registers are already closed.'))
|
||||
else:
|
||||
list_statement.append(ids[0])
|
||||
if not journal.check_dtls:
|
||||
statement_obj.button_confirm_cash(cr, uid, ids, context)
|
||||
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
id2 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_tree')
|
||||
id3 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_form2')
|
||||
result = data_obj._get_id(cr, uid, 'point_of_sale', 'view_pos_confirm_cash_statement_filter')
|
||||
search_id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
if id2:
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if id3:
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
return {
|
||||
'domain': "[('id','in'," + str(list_statement) + ")]",
|
||||
'domain': "[('id','in'," + str(ids) + ")]",
|
||||
'name': 'Close Statements',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'search_view_id': search_id['res_id'],
|
||||
'res_model': 'account.bank.statement',
|
||||
'views': [(id2, 'tree'),(id3, 'form')],
|
||||
'type': 'ir.actions.act_window'
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Close Statements">
|
||||
<separator string="Are you sure you want to close the statements ?" colspan="4"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="No" colspan="1" />
|
||||
<button name="close_statement" string="Yes"
|
||||
colspan="1" type="object" icon="gtk-ok"/>
|
||||
<label string="Are you sure you want to close the statements ?"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<group col="2" colspan="2"/>
|
||||
<button icon='gtk-stop' special="cancel"
|
||||
string="No" />
|
||||
<button name="close_statement" string="Yes"
|
||||
type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<group col="2" colspan="4">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
|
||||
@@ -49,7 +49,7 @@ class pos_open_statement(osv.osv_memory):
|
||||
for journal in journal_obj.browse(cr, uid, journal_ids):
|
||||
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
|
||||
if len(ids):
|
||||
raise osv.except_osv(_('Message'), _('You can not open a Cashbox for "%s". \n Please close the cashbox related to. ' %(journal.name)))
|
||||
raise osv.except_osv(_('Message'), _('You can not open a Cashbox for "%s".\nPlease close its related Register.' %(journal.name)))
|
||||
|
||||
statement_ids = sorted(statement_obj.search(cr, uid, [('state', '=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)]))
|
||||
if statement_ids:
|
||||
@@ -83,18 +83,22 @@ class pos_open_statement(osv.osv_memory):
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
id2 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_tree')
|
||||
id3 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_form2')
|
||||
result = data_obj._get_id(cr, uid, 'point_of_sale', 'view_pos_open_cash_statement_filter')
|
||||
search_id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
if id2:
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if id3:
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
|
||||
return {
|
||||
'domain': "[('state','=','open')]",
|
||||
'domain': "[('state','=','open'),('user_id','=',"+ str(uid) +")]",
|
||||
'name': 'Open Statement',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'search_view_id': search_id['res_id'],
|
||||
'res_model': 'account.bank.statement',
|
||||
'views': [(id2, 'tree'),(id3, 'form')],
|
||||
'context': {'search_default_open': 1},
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
pos_open_statement()
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Open Statements">
|
||||
<separator string="Are you sure you want to open the statements ?" colspan="4"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="No" />
|
||||
<button name="open_statement" string="Yes"
|
||||
type="object" icon="gtk-ok"/>
|
||||
<label string="Are you sure you want to open the statements ?"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<group col="2" colspan="2"/>
|
||||
<button icon='gtk-stop' special="cancel"
|
||||
string="No" />
|
||||
<button name="open_statement" string="Yes"
|
||||
type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -47,8 +47,9 @@ class pos_make_payment(osv.osv_memory):
|
||||
active_id = context and context.get('active_id',False)
|
||||
if active_id:
|
||||
j_obj = self.pool.get('account.journal')
|
||||
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
|
||||
journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)])
|
||||
cr.execute("""select DISTINCT journal_id from pos_journal_users where user_id=%d order by journal_id"""%(uid))
|
||||
j_ids = map(lambda x1: x1[0], cr.fetchall())
|
||||
journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('id', 'in', j_ids)])
|
||||
|
||||
if journal:
|
||||
journal = journal[0]
|
||||
@@ -79,6 +80,10 @@ class pos_make_payment(osv.osv_memory):
|
||||
res.update({'payment_date':current_date})
|
||||
if 'payment_name' in fields:
|
||||
res.update({'payment_name':'Payment'})
|
||||
if 'partner_id' in fields:
|
||||
res.update({'partner_id': order.partner_id.id or False})
|
||||
if 'pricelist_id' in fields:
|
||||
res.update({'pricelist_id': order.pricelist_id.id or False})
|
||||
return res
|
||||
|
||||
def view_init(self, cr, uid, fields_list, context=None):
|
||||
@@ -123,6 +128,18 @@ class pos_make_payment(osv.osv_memory):
|
||||
"""
|
||||
return result
|
||||
|
||||
def onchange_product_id(self, cr, uid, ids, product_id, amount):
|
||||
""" Changes amount if product_id changes.
|
||||
@param product_id: Changed product_id
|
||||
@param amount: Amount to be paid
|
||||
@return: Dictionary of changed values
|
||||
"""
|
||||
prod_obj = self.pool.get('product.product')
|
||||
if product_id:
|
||||
product = prod_obj.browse(cr, uid, product_id)
|
||||
amount = amount - product.list_price
|
||||
return {'value': {'amount': amount}}
|
||||
|
||||
def check(self, cr, uid, ids, context):
|
||||
|
||||
"""Check the order:
|
||||
@@ -135,8 +152,12 @@ class pos_make_payment(osv.osv_memory):
|
||||
amount = order.amount_total - order.amount_paid
|
||||
data = self.read(cr, uid, ids)[0]
|
||||
invoice_wanted = data['invoice_wanted']
|
||||
is_accompte = data['is_acc']
|
||||
# Todo need to check ...
|
||||
|
||||
if is_accompte:
|
||||
line_id, price = order_obj.add_product(cr, uid, order.id, data['product_id'], -1.0, context)
|
||||
amount = order.amount_total - order.amount_paid - price
|
||||
|
||||
if amount != 0.0:
|
||||
order_obj.write(cr, uid, [active_id], {'invoice_wanted': invoice_wanted, 'partner_id': data['partner_id']})
|
||||
order_obj.add_payment(cr, uid, active_id, data, context=context)
|
||||
@@ -205,11 +226,11 @@ class pos_make_payment(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'journal':fields.selection(pos_box_entries.get_journal, "Cash Register",required=True),
|
||||
'product_id': fields.many2one('product.product', "Acompte"),
|
||||
'product_id': fields.many2one('product.product', "Advance"),
|
||||
'amount':fields.float('Amount', digits=(16,2) ,required= True),
|
||||
'payment_name': fields.char('Payment name', size=32, required=True),
|
||||
'payment_date': fields.date('Payment date', required=True),
|
||||
'is_acc': fields.boolean('Accompte'),
|
||||
'is_acc': fields.boolean('Advance'),
|
||||
'invoice_wanted': fields.boolean('Invoice'),
|
||||
'num_sale':fields.char('Num.File', size=32),
|
||||
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist'),
|
||||
|
||||
@@ -12,26 +12,28 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Add payment :">
|
||||
<group colspan="4" width="600" height="200">
|
||||
<group colspan="4" width="600" height="220">
|
||||
<field name="journal"/>
|
||||
<field name="amount" />
|
||||
<field name="payment_date" />
|
||||
<!--field name="payment_name" /-->
|
||||
<field name="invoice_wanted" />
|
||||
<field name="num_sale" />
|
||||
<field name="is_acc" />
|
||||
<field name="is_acc"/>
|
||||
<group attrs="{'invisible':[('is_acc','=',False)]}" colspan="4" col="2">
|
||||
<field name="product_id" attrs="{'required':[('is_acc', '=', True)]}" domain="[('type','=','service')]"/>
|
||||
<field name="product_id" attrs="{'required':[('is_acc', '=', True)]}" domain="[('type','=','service')]"
|
||||
on_change="onchange_product_id(product_id, amount)"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('invoice_wanted','=',False)]}" colspan="4">
|
||||
<field name="partner_id" attrs="{'required':[('invoice_wanted', '=', True)]}" colspan="2"/>
|
||||
<field name="pricelist_id" attrs="{'required':[('invoice_wanted', '=', True)]}" colspan="2"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-cancel' special="cancel" string="Cancel" />
|
||||
<button name="check" string="Make Payment" colspan="1" type="object" icon="gtk-ok"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<group col="2" colspan="2"/>
|
||||
<button icon='gtk-stop' special="cancel" string="Cancel" />
|
||||
<button name="check" string="Make Payment" colspan="1" type="object" icon="terp-dolar"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -7,15 +7,21 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sale by Date and User">
|
||||
<group col="2" colspan="4">
|
||||
<group col="4" colspan="4">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="user_id"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
<separator string="User" colspan="4"/>
|
||||
<field name="user_id" nolabel="1" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group colspan="2" col="2">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<form string="Receipt :">
|
||||
<separator string="Print the receipt of the sale" colspan="4"/>
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print Report"
|
||||
string="Cancel" />
|
||||
<button name="print_report" string="Print Receipt"
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from mx import DateTime
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
help="Procurement started late" />
|
||||
<filter icon="terp-gtk-go-back-rtl" string="To Fix" domain="[('state', '=', 'exception'),('message','=','')]" help="Procurement Orders with exceptions and without message"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
<field name="product_id" />
|
||||
<field name="date_planned" widget="date"/>
|
||||
|
||||
@@ -421,7 +421,7 @@ msgid ""
|
||||
"reception of products."
|
||||
msgstr ""
|
||||
"Preço Padrão: o preço é fixo e recalculado periodicamente (geralmente no "
|
||||
"final do ano).\r\n"
|
||||
"final do ano).\n"
|
||||
"Preço Médio: o preço de custo é recalculado a cada recepção de produtos."
|
||||
|
||||
#. module: product
|
||||
|
||||
@@ -399,7 +399,7 @@ msgid ""
|
||||
"at the end of the year), Average Price: the cost price is recomputed at each "
|
||||
"reception of products."
|
||||
msgstr ""
|
||||
"标准价格: 成本价格是定期重新计算(通常在年底).\r\n"
|
||||
"标准价格: 成本价格是定期重新计算(通常在年底).\n"
|
||||
"平均价格: 成本价格是在每次接收产品时重新计算."
|
||||
|
||||
#. module: product
|
||||
@@ -557,7 +557,7 @@ msgid ""
|
||||
"and the reception of goods for this product and for the default supplier. It "
|
||||
"is used by the scheduler to order requests based on reordering delays."
|
||||
msgstr ""
|
||||
"产品供应在确认采购订单到接收产品之间的默认平均延迟. \r\n"
|
||||
"产品供应在确认采购订单到接收产品之间的默认平均延迟. \n"
|
||||
"用于在调度订单请求时要考虑的重订货延迟."
|
||||
|
||||
#. module: product
|
||||
@@ -671,7 +671,7 @@ msgid ""
|
||||
"supplying. 'Make to Order': When needed, purchase or produce for the "
|
||||
"procurement request."
|
||||
msgstr ""
|
||||
"按库存生产: 在仓库或等待重新供应时得到需求.\r\n"
|
||||
"按库存生产: 在仓库或等待重新供应时得到需求.\n"
|
||||
" 按订单生产: 在采购或产品获得请求时得到需求."
|
||||
|
||||
#. module: product
|
||||
@@ -1214,7 +1214,7 @@ msgid ""
|
||||
"The computed quantity will be a multiple of this value. Use 1.0 for products "
|
||||
"that can not be split."
|
||||
msgstr ""
|
||||
"这数量计算将乘于一个数值.\r\n"
|
||||
"这数量计算将乘于一个数值.\n"
|
||||
"产品使用1.0表示不能拆分."
|
||||
|
||||
#. module: product
|
||||
@@ -1444,7 +1444,7 @@ msgid ""
|
||||
"the delivery of the finished products. It's the time you promise to your "
|
||||
"customers."
|
||||
msgstr ""
|
||||
"这是确认客户订单和交付的平均时间.\r\n"
|
||||
"这是确认客户订单和交付的平均时间.\n"
|
||||
"是承诺客户的时间."
|
||||
|
||||
#. module: product
|
||||
@@ -1668,7 +1668,7 @@ msgid ""
|
||||
"reception of the products in your warehouse. Used by the scheduler for "
|
||||
"automatic computation of the purchase order planning."
|
||||
msgstr ""
|
||||
"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\r\n"
|
||||
"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\n"
|
||||
"用于制定采购订单计划时调度程序自动计算."
|
||||
|
||||
#. module: product
|
||||
|
||||
@@ -21,13 +21,10 @@
|
||||
|
||||
from osv import osv, fields
|
||||
import decimal_precision as dp
|
||||
import pooler
|
||||
|
||||
import math
|
||||
import logging
|
||||
from _common import rounding
|
||||
|
||||
from tools import config
|
||||
from tools.translate import _
|
||||
|
||||
def is_pair(x):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user