[MERGE]: Merge with lp:openobject-addons

bzr revid: rpa@tinyerp.com-20100407051420-w2wmp5tsterf5nk4
This commit is contained in:
rpa (Open ERP) 2010-04-07 10:44:20 +05:30
commit 667e0e5827
61 changed files with 3476 additions and 3894 deletions

View File

@ -58,6 +58,9 @@
<filter icon="terp-account"
string="Invoices"
domain="[('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"/>
<filter icon="terp-account"
string="Paid"
domain="[('state','=','paid')]"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
@ -71,17 +74,19 @@
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<filter icon="terp-account"
string="Customer Invoices"
domain="[('type','=','out_invoice')]"/>
string="Customer Invoices"
domain="[('type','=','out_invoice')]"
default="1"/>
<filter icon="terp-account"
string="Supplier Invoices"
domain="[('type','=','in_invoice')]"/>
string="Customer Refunds"
domain="[('type','=','out_refund')]"/>
<separator orientation="vertical"/>
<filter icon="terp-account"
string="Customer Refunds"
domain="[('type','=','out_refund')]"/>
string="Supplier Invoices"
domain="[('type','=','in_invoice')]"/>
<filter icon="terp-account"
string="Supplier Refunds"
domain="[('type','=','in_refund')]"/>
string="Supplier Refunds"
domain="[('type','=','in_refund')]"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
@ -90,6 +95,7 @@
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>

View File

@ -204,7 +204,7 @@ class account_analytic_account(osv.osv):
'date': fields.date('Date End'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'),
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Close'),('template', 'Template')], 'State', required=True,readonly=True,
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,readonly=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_able" model="ir.ui.view">
<field name="name">auction.lots.able.form</field>
<field name="model">auction.lots.able</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm">
<group colspan="4" >
<separator string="Confirmation set taken away" colspan="4"/>
<newline/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-goto-last" string="Able Taken away" name="confirm_able" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Mark as taken away"
res_model="auction.lots.able"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_able"/>
</data>
</openerp>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_auction_move" model="ir.ui.view">
<field name="name">auction.lots.auction.move.form</field>
<field name="model">auction.lots.auction.move</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Change Auction Date">
<group colspan="4" >
<label string="Warning, this will erase the object adjudication price and its buyer !" colspan="2"/>
<newline/>
<field name="auction_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-redo" string="Move to Auction date" name="auction_move_set" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Change Auction Date"
res_model="auction.lots.auction.move"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_auction_move"/>
</data>
</openerp>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_enable" model="ir.ui.view">
<field name="name">auction.lots.enable.form</field>
<field name="model">auction.lots.enable</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm">
<group colspan="4" >
<separator string="Confirmation enable taken away" colspan="4"/>
<newline/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-goto-last" string="Enable Taken away" name="confirm_enable" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Unmark as taken away"
res_model="auction.lots.enable"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_enable"/>
</data>
</openerp>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_make_invoice_buyer" model="ir.ui.view">
<field name="name">auction.lots.make.invoice.buyer.form</field>
<field name="model">auction.lots.make.invoice.buyer</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Paid">
<group colspan="4" >
<field name="amount"/>
<field name="objects"/>
<field name="number"/>
<label string="(Keep empty for automatic number)" colspan="2"/>
<field name="buyer_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Invoice Buyer objects"
res_model="auction.lots.make.invoice.buyer"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_make_invoice_buyer"/>
</data>
</openerp>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_make_invoice" model="ir.ui.view">
<field name="name">auction.lots.make.invoice.form</field>
<field name="model">auction.lots.make.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Paid">
<group colspan="4" >
<field name="amount"/>
<field name="objects"/>
<field name="number" colspan="3"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Invoice Seller objects"
res_model="auction.lots.make.invoice"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_make_invoice"/>
</data>
</openerp>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_sms_send" model="ir.ui.view">
<field name="name">auction.lots.sms.send.form</field>
<field name="model">auction.lots.sms.send</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="SMS - Gateway: clickatell','Bulk SMS send">
<group colspan="4" >
<separator string="SMS - Gateway: clickatell','Bulk SMS send" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="3"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-go-back" string="Send SMS" name="sms_send" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="SMS Send"
res_model="auction.lots.sms.send"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_sms_send"/>
</data>
</openerp>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_pay_buy" model="ir.ui.view">
<field name="name">auction.pay.buy.form</field>
<field name="model">auction.pay.buy</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Pay objects">
<group colspan="4" >
<field name="amount"/>
<field name="statement_id1" domain="[('state','=','draft')]"/>
<field name="amount2"/>
<field name="statement_id2" domain="[('state','=','draft')]"/>
<field name="amount3"/>
<field name="statement_id3" domain="[('state','=','draft')]"/>
<newline/>
<field name="buyer_id"/>
<field name="total"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Pay objects of the buyer"
res_model="auction.pay.buy"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_pay_buy"/>
</data>
</openerp>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_pay_sel" model="ir.ui.view">
<field name="name">auction.pay.sel.form</field>
<field name="model">auction.pay.sel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Pay invoice">
<group colspan="4" >
<field name="amount"/>
<field name="dest_account_id"/>
<field name="journal_id"/>
<field name="period_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_pay_sel" model="ir.actions.act_window">
<field name="name">Pay objects of the seller</field>
<field name="res_model">auction.pay.sel</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_pay_sel"/>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_payer" model="ir.ui.view">
<field name="name">auction.payer.form</field>
<field name="model">auction.payer</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Check payment for buyer">
<separator string="" colspan="4" />
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon = "gtk-yes" string="Pay" name="payer" type="object"/>
</group>
</form>
</field>
</record>
<record id="view_auction_payer_sel" model="ir.ui.view">
<field name="name">auction.payer.sel.form</field>
<field name="model">auction.payer.sel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Check payment for seller">
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-yes" string="Pay" name="payer_sel" type="object"/>
</group>
</form>
</field>
</record>
<act_window name="Mark as paid for seller"
res_model="auction.payer.sel"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_payer_sel"/>
</data>
</openerp>

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_taken" model="ir.ui.view">
<field name="name">auction.taken.form</field>
<field name="model">auction.taken</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Mark Lots">
<group colspan="4" >
<label string="Select lots which are Sold" colspan="4"/>
<field name="lot_ids" nolabel="1" colspan="4" domain="[('state','=','sold')]"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-ok" string="OK" name="process" type="object" />
</group>
</form>
</field>
</record>
<record id="action_auction_taken" model="ir.actions.act_window">
<field name="name">Gestion emporte</field>
<field name="res_model">auction.taken</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_taken"/>
<field name="target">new</field>
</record>
<!-- <menuitem name="Tools Bar Codes"
id="auction_outils_menu"
parent="auction_menu_root" sequence="5"
/>
<menuitem name="Deliveries Management"
action="action_auction_taken"
id="menu_wizard_emporte"
parent="auction_outils_menu"
/> -->
</data>
</openerp>

View File

@ -31,9 +31,10 @@ import time
import tools
months = {
1: "January", 2: "February", 3: "March", 4: "April", \
5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \
10: "October", 11: "November", 12: "December"}
1: "January", 2: "February", 3: "March", 4: "April", \
5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \
10: "October", 11: "November", 12: "December"
}
def get_recurrent_dates(rrulestring, exdate, startdate=None):
"""
@ -94,7 +95,6 @@ def real_id2base_calendar_id(real_id, recurrent_date):
return '%d-%s' % (real_id, recurrent_date)
return real_id
def _links_get(self, cr, uid, context={}):
"""
Get request link.
@ -386,9 +386,11 @@ property or property parameter."),
response_re = re.compile("Are you coming\?.*\n*.*(YES|NO|MAYBE).*", re.UNICODE)
def msg_new(self, cr, uid, msg):
""" @param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks, """
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
"""
return False
def msg_act_get(self, msg):
@ -508,7 +510,6 @@ property or property parameter."),
for vals in self.browse(cr, uid, ids, context=context):
user = vals.user_id
if user:
mod_obj = self.pool.get(vals.ref._name)
if vals.ref:
if vals.ref.user_id.id != user.id:
@ -567,9 +568,7 @@ class res_alarm(osv.osv):
are both optional, but if one occurs, so MUST the other"""),
'repeat': fields.integer('Repeat'),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it."),
true, it will allow you to hide the event alarm information without removing it.")
}
_defaults = {
'trigger_interval': lambda *x: 'minutes',
@ -595,10 +594,10 @@ are both optional, but if one occurs, so MUST the other"""),
model_id = ir_obj.search(cr, uid, [('model', '=', model)])[0]
model_obj = self.pool.get(model)
for data in model_obj.browse(cr, uid, ids):
for data in model_obj.browse(cr, uid, ids, context):
basic_alarm = data.alarm_id
if not context.get('alarm_id'):
if not context.get('alarm_id', False):
self.do_alarm_unlink(cr, uid, [data.id], model)
return True
self.do_alarm_unlink(cr, uid, [data.id], model)
@ -641,7 +640,7 @@ are both optional, but if one occurs, so MUST the other"""),
ir_obj = self.pool.get('ir.model')
model_id = ir_obj.search(cr, uid, [('model', '=', model)])[0]
model_obj = self.pool.get(model)
for datas in model_obj.browse(cr, uid, ids):
for datas in model_obj.browse(cr, uid, ids, context):
alarm_ids = alarm_obj.search(cr, uid, [('model_id', '=', model_id), ('res_id', '=', datas.id)])
if alarm_ids:
alarm_obj.unlink(cr, uid, alarm_ids)
@ -682,18 +681,17 @@ class calendar_alarm(osv.osv):
'event_date': fields.datetime('Event Date'),
'event_end_date': fields.datetime('Event End Date'),
'trigger_date': fields.datetime('Trigger Date', readonly="True"),
'state':fields.selection([
('draft', 'Draft'),
('run', 'Run'),
('stop', 'Stop'),
('done', 'Done'),
], 'State', select=True, readonly=True),
}
'state':fields.selection([('draft', 'Draft'),
('run', 'Run'),
('stop', 'Stop'),
('done', 'Done'),
], 'State', select=True, readonly=True),
}
_defaults = {
'action': lambda *x: 'email',
'state': lambda *x: 'run',
}
'action': lambda *x: 'email',
'state': lambda *x: 'run',
}
def create(self, cr, uid, vals, context={}):
"""
@ -722,15 +720,14 @@ class calendar_alarm(osv.osv):
def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, \
context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of calendar alarms IDs.
@param use_new_cursor: False or the dbname
@param context: A standard dictionary for contextual values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of calendar alarms IDs.
@param use_new_cursor: False or the dbname
@param context: A standard dictionary for contextual values
"""
if not context:
context = {}
current_datetime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
@ -798,7 +795,6 @@ class calendar_event(osv.osv):
def _tz_get(self, cr, uid, context={}):
return [(x.lower(), x) for x in pytz.all_timezones]
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, context={}):
"""
@param self: The object pointer
@ -904,10 +900,10 @@ class calendar_event(osv.osv):
whr = " where id=%(id)s"
qry = qry + whr
val.update({
'table': self._table,
'rule_type': rrule_type,
'id': id,
})
'table': self._table,
'rule_type': rrule_type,
'id': id,
})
cr.execute(qry % val)
return True
@ -921,9 +917,7 @@ class calendar_event(osv.osv):
@return: dictionary of rrule value.
"""
result = {}
for event in ids:
datas = self.read(cr, uid, event)
for datas in self.read(cr, uid, ids):
if datas.get('rrule_type'):
if datas.get('rrule_type') == 'none':
result[event] = False
@ -947,14 +941,13 @@ class calendar_event(osv.osv):
'duration': fields.float('Duration'),
'description': fields.text('Your action'),
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
('confidential', 'Confidential')], 'Mark as'),
'location': fields.char('Location', size=264, help="Location of Event"),
'show_as': fields.selection([('free', 'Free'), \
('busy', 'Busy')],
'Show as'),
('confidential', 'Confidential')], 'Mark as'),
'location': fields.char('Location', size=264, help="Location of Event"),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
'Show as'),
'base_calendar_url': fields.char('Caldav URL', size=264),
'exdate': fields.text('Exception Date/Times', help="This property \
defines the list of date/time exceptions for arecurring calendar component."),
defines the list of date/time exceptions for arecurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="defines a \
rule or repeating pattern for anexception to a recurrence set"),
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, \
@ -974,13 +967,13 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
string='Timezone', store=True),
'user_id': fields.many2one('res.users', 'Responsible'),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
('hourly', 'Hourly'), \
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
('yearly', 'Yearly')], 'Frequency'),
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
('hourly', 'Hourly'), \
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
('yearly', 'Yearly')], 'Frequency'),
'interval': fields.integer('Interval'),
'count': fields.integer('Count'),
'mo': fields.boolean('Mon'),
@ -991,7 +984,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'sa': fields.boolean('Sat'),
'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
('day', 'Day of month')], 'Option'),
('day', 'Day of month')], 'Option'),
'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
('WE', 'Wednesday'), ('TH', 'Thursday'), \
@ -1003,7 +996,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'month_list': fields.selection(months.items(), 'Month'),
'end_date': fields.date('Repeat Until')
}
_defaults = {
'class': lambda *a: 'public',
'show_as': lambda *a: 'busy',
@ -1047,7 +1039,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param event_ids: List of crm meetings IDs.
@return: True
"""
#start Loop
for event_id in event_ids:
event_id = base_calendar_id2real_id(event_id)
@ -1062,7 +1054,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
qry += ", location = '%(location)s'"
qry += "WHERE id = %s" % (event_id)
cr.execute(qry %(defaults))
#End Loop
return True
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
@ -1159,7 +1151,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
weekstring = ''
monthstring = ''
yearstring = ''
# logic for computing rrule string
freq = datas.get('freq')
if freq == 'None':
return ''
@ -1198,7 +1190,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
rrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
+ enddate + monthstring + yearstring
# End logic
return rrule_string
@ -1390,13 +1381,14 @@ class calendar_todo(osv.osv):
_description = "Calendar Task"
def _get_date(self, cr, uid, ids, name, arg, context):
""" Get Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of calendar todo's IDs.
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
Get Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of calendar todo's IDs.
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
res = {}
@ -1405,14 +1397,15 @@ class calendar_todo(osv.osv):
return res
def _set_date(self, cr, uid, id, name, value, arg, context):
""" Set Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param id: calendar's ID.
@param value: Get Value
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
Set Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param id: calendar's ID.
@param value: Get Value
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
event = self.browse(cr, uid, id, context=context)
@ -1436,11 +1429,12 @@ class ir_attachment(osv.osv):
_inherit = 'ir.attachment'
def search_count(self, cr, user, args, context=None):
""" @param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current users ID for security checks,
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current users ID for security checks,
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
args1 = []
@ -1450,14 +1444,14 @@ class ir_attachment(osv.osv):
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
""" @param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param offset: The Number of Results to pass,
@param limit: The Number of Results to Return,
@param context: A standard dictionary for contextual values
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param offset: The Number of Results to pass,
@param limit: The Number of Results to Return,
@param context: A standard dictionary for contextual values
"""
new_args = args
@ -1474,12 +1468,13 @@ class ir_values(osv.osv):
def set(self, cr, uid, key, key2, name, models, value, replace=True, \
isobject=False, meta=False, preserve_user=False, company=False):
""" set IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param model: Get The Model """
"""
Set IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param model: Get The Model
"""
new_model = []
for data in models:
@ -1492,12 +1487,13 @@ class ir_values(osv.osv):
def get(self, cr, uid, key, key2, models, meta=False, context={}, \
res_id_req=False, without_user=True, key2_req=True):
""" Get IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param model: Get The Model """
"""
Get IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param model: Get The Model
"""
new_model = []
for data in models:
@ -1516,14 +1512,14 @@ class ir_model(osv.osv):
def read(self, cr, uid, ids, fields=None, context={},
load='_classic_read'):
""" Read IR Model
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of IR Models IDs.
@param context: A standard dictionary for contextual values """
"""
Read IR Model
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of IR Models IDs.
@param context: A standard dictionary for contextual values
"""
data = super(ir_model, self).read(cr, uid, ids, fields=fields, \
context=context, load=load)
@ -1537,13 +1533,13 @@ ir_model()
class virtual_report_spool(web_services.report_spool):
def exp_report(self, db, uid, object, ids, datas=None, context=None):
""" Export Report
@param self: The object pointer
@param db: get the current database,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values """
"""
Export Report
@param self: The object pointer
@param db: get the current database,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if object == 'printscreen.list':
return super(virtual_report_spool, self).exp_report(db, uid, \
@ -1561,13 +1557,14 @@ class res_users(osv.osv):
_inherit = 'res.users'
def _get_user_avail(self, cr, uid, ids, context=None):
""" Get USer Availability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of res users IDs.
@param context: A standard dictionary for contextual values """
"""
Get USer Availability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of res users IDs.
@param context: A standard dictionary for contextual values
"""
current_datetime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
res = {}
@ -1591,13 +1588,14 @@ class res_users(osv.osv):
return res
def _get_user_avail_fun(self, cr, uid, ids, name, args, context=None):
""" Get USer Availability Function
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of res users IDs.
@param context: A standard dictionary for contextual values """
"""
Get USer Availability Function
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of res users IDs.
@param context: A standard dictionary for contextual values
"""
return self._get_user_avail(cr, uid, ids, context=context)

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-05 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact

View File

@ -134,7 +134,6 @@ class crm_case_categ(osv.osv):
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model', 'Object Name'),
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@ -167,7 +166,6 @@ class crm_case_resource_type(osv.osv):
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model', 'Object Name'),
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@param self: The object pointer
@ -205,7 +203,6 @@ class crm_case_stage(osv.osv):
help="Change Probability on next and previous stages."),
'requirements': fields.text('Requirements')
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@param self: The object pointer
@ -350,7 +347,6 @@ class crm_case(osv.osv):
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'company_id': fields.many2one('res.company', 'Company'),
}
def _get_default_partner_address(self, cr, uid, context):
"""Gives id of default address for current user
@param self: The object pointer

View File

@ -14,7 +14,7 @@
</record>
<menuitem action="crm_claim_categ_action"
id="menu_crm_case_claim-act" parent="crm.menu_crm_case_categ" />
id="menu_crm_case_claim-act" parent="crm.menu_crm_case_categ" />
<!-- Claim Stages -->
@ -28,7 +28,7 @@
</record>
<menuitem action="crm_claim_stage_act"
id="menu_crm_claim_stage_act" parent="crm.menu_crm_case_stage" />
id="menu_crm_claim_stage_act" parent="crm.menu_crm_case_stage" />
<!-- Claim Resource Type -->
@ -42,8 +42,8 @@
</record>
<menuitem action="crm_claim_resource_act"
id="menu_crm_claim_stage_act"
parent="crm.menu_crm_case_resource_type" />
id="menu_crm_claim_stage_act"
parent="crm.menu_crm_case_resource_type" />
<!-- Claims -->
@ -57,26 +57,26 @@
<field name="name"/>
<field name="partner_id"/>
<field name="user_id" />
<field name="section_id" string="Section" />
<field name="section_id"/>
<field name="date" string="Claim Date"/>
<field name="date_deadline" string="Deadline"/>
<field name="date_closed" string="Closure Date"/>
<field name="categ_id" string="Type" select="1"/>
<field name="state"/>
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object" icon="gtk-convert" />
states="done,cancel" type="object" icon="gtk-convert" />
</tree>
</field>
</record>
@ -132,20 +132,20 @@
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-jump-to" />
states="open,draft,pending" type="object"
icon="gtk-jump-to" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
</group>
</page>
<page string="History" groups="base.group_extended">
@ -183,10 +183,10 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.claim'}"
icon="gtk-undo" type="action" />
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.claim'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
@ -195,9 +195,9 @@
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.claim'}"
icon="gtk-go-forward" type="action" />
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.claim'}"
icon="gtk-go-forward" type="action" />
</page>
</notebook>
@ -206,7 +206,7 @@
</field>
</record>
<!-- Claim Calendar view -->
<!-- Claim Calendar view -->
<record model="ir.ui.view" id="crm_case_claims_calendar_view">
<field name="name">CRM - Claims Calendar</field>
@ -222,7 +222,7 @@
</field>
</record>
<!-- Claim Graph view -->
<!-- Claim Graph view -->
<record model="ir.ui.view" id="crm_case_graph_view_stage_cost">
<field name="name">CRM -Graph</field>
@ -237,7 +237,7 @@
</field>
</record>
<!-- Crm claim Search view -->
<!-- Crm claim Search view -->
<record id="view_crm_case_claims_filter" model="ir.ui.view">
<field name="name">CRM - Claims Search</field>
@ -263,28 +263,28 @@
<field name="name" select='1'/>
<field name="partner_id" select="1"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Claims"
default="1" />
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Claims" />
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Claims"
default="1" />
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Claims" />
</field>
<field name="section_id" select="1"
widget="selection" string="Section"
default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
widget="selection"
default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
</field>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="20">
<filter string="Deadline" icon="terp-crm"
domain="[]"
context="{'group_by':'date_deadline'}" />
<filter string="Closure" icon="terp-crm"
domain="[]"
context="{'group_by':'date_closed'}" />
<filter string="Deadline" icon="terp-crm"
domain="[]"
context="{'group_by':'date_deadline'}" />
<filter string="Closure" icon="terp-crm"
domain="[]"
context="{'group_by':'date_closed'}" />
</group>
</search>
</field>

View File

@ -8,29 +8,29 @@
<field name="name">Fundraising Categories</field>
<field name="res_model">crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
</record>
<menuitem action="crm_fund_categ_action"
id="menu_crm_case_fundraising-act"
parent="crm.menu_crm_case_categ" />
id="menu_crm_case_fundraising-act"
parent="crm.menu_crm_case_categ" />
<!-- Fund Stage Form View -->
<record id="crm_fundraising_stage_act" model="ir.actions.act_window">
<field name="name">Fundraising Stages</field>
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
</record>
<record id="crm_fundraising_stage_act" model="ir.actions.act_window">
<field name="name">Fundraising Stages</field>
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
</record>
<menuitem action="crm_fundraising_stage_act"
id="menu_crm_fundraising_stage_act"
parent="crm.menu_crm_case_stage" />
<menuitem action="crm_fundraising_stage_act"
id="menu_crm_fundraising_stage_act"
parent="crm.menu_crm_case_stage" />
<!-- Fund Resource Type Form View -->
@ -39,13 +39,13 @@
<field name="res_model">crm.case.resource.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
</record>
<menuitem action="crm_fundraising_resource_act"
id="menu_crm_fundraising_resource_act"
parent="crm.menu_crm_case_resource_type" />
id="menu_crm_fundraising_resource_act"
parent="crm.menu_crm_case_resource_type" />
<!-- Fund Raising Tree View -->
@ -56,31 +56,31 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Funds Tree"
colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id" />
<field name="name" string="Fund Description" />
<field name="categ_id" />
<field name="type_id" string="Payment Mode" />
<field name="planned_cost" string="Amount" />
<field name="probability" />
<field name="user_id" />
<field name="state" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object" icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object" icon="gtk-convert" />
colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id" />
<field name="name" string="Fund Description" />
<field name="categ_id" />
<field name="type_id" string="Payment Mode" />
<field name="planned_cost" string="Amount" />
<field name="probability" />
<field name="user_id" />
<field name="state" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object" icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object" icon="gtk-convert" />
</tree>
</field>
</record>
@ -96,20 +96,20 @@
<group colspan="4" col="4">
<field name="name" select="1" string="Name"/>
<field name="type_id" string="Payment Mode" select="1" widget="selection"
domain="[('object_id.model', '=', 'crm.fundraising')]" />
domain="[('object_id.model', '=', 'crm.fundraising')]" />
</group>
<notebook colspan="4">
<page string="Funds">
<separator colspan="4" string="Communication"/>
<group colspan="4" col="4">
<field name="partner_id" select="1"
on_change="onchange_partner_id(partner_id, email_from)"
colspan="2" />
<field name="partner_address_id"
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
<field name="email_from" colspan="2"/>
<separator colspan="4" string="Communication"/>
<group colspan="4" col="4">
<field name="partner_id" select="1"
on_change="onchange_partner_id(partner_id, email_from)"
colspan="2" />
<field name="partner_address_id"
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
<field name="email_from" colspan="2"/>
</group>
<separator colspan="4" string="Estimates"/>
<field name="planned_cost"/>
@ -117,13 +117,13 @@
<field name="probability"/>
<separator colspan="4" string="Categorization"/>
<group colspan="4" col="6">
<field name="user_id" select="2" string="Responsible"/>
<field name="user_id" select="2" string="Responsible"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="categ_id" select="1"
widget="selection"
domain="[('object_id.model', '=', 'crm.fundraising')]" />
<field name="date"/>
<field name="duration"/>
<field name="categ_id" select="1"
widget="selection"
domain="[('object_id.model', '=', 'crm.fundraising')]" />
<field name="date"/>
<field name="duration"/>
</group>
<separator colspan="4" string="Details"/>
<field name="description" nolabel="1" colspan="4"/>
@ -131,23 +131,23 @@
<group col="8" colspan="4">
<field name="state" select="2"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
</group>
</page>
<page string="History" groups="base.group_extended">
@ -191,10 +191,10 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.fundraising'}"
icon="gtk-undo" type="action" />
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.fundraising'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
@ -203,9 +203,9 @@
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.fundraising'}"
icon="gtk-go-forward" type="action" />
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.fundraising'}"
icon="gtk-go-forward" type="action" />
</page>
</notebook>
</form>
@ -256,32 +256,33 @@
separator="1"
help="Funds Related to Current User"
/>
<separator orientation="vertical" />
<filter icon="gtk-new" string="Current Funds"
domain="[('state','in',('draft', 'open'))]"
help="Current Funds" />
domain="[('state','in',('draft', 'open'))]"
help="Current Funds" />
<filter icon="gtk-yes" string="Open Funds"
domain="[('state','=','open')]"
help="Open Funds" />
domain="[('state','=','open')]"
help="Open Funds" />
<filter icon="gtk-media-pause"
string="Pending Funds"
domain="[('state','=','pending')]"
help="Pending Funds" />
string="Pending Funds"
domain="[('state','=','pending')]"
help="Pending Funds" />
<separator orientation="vertical" />
<field name="state" select="1" />
<field name="name" select='1'
string="Fund Description" />
string="Fund Description" />
<field name="user_id" select="1"
widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned" />
widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned" />
</field>
<field name="section_id" select="1"
widget="selection" string="Section"
default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
widget="selection"
default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
</field>
</group>
</search>

View File

@ -8,13 +8,13 @@
<field name="name">Helpdesk Categories</field>
<field name="res_model">crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="domain">[('object_id.model', '=', 'crm.helpdesk')]</field>
<field name="context">{'object_id':'crm.helpdesk'}</field>
<field name="context">{'object_id':'crm.helpdesk'}</field>
</record>
<menuitem action="crm_helpdesk_categ_action"
id="menu_crm_case_helpdesk-act" parent="crm.menu_crm_case_categ" />
id="menu_crm_case_helpdesk-act" parent="crm.menu_crm_case_categ" />
<!-- Helpdesk Support Form View -->
@ -31,20 +31,20 @@
</group>
<notebook colspan="4">
<page string="General">
<separator colspan="4" string="Communication"/>
<separator colspan="4" string="Communication"/>
<group col="7" colspan="4">
<field name="partner_id"
on_change="onchange_partner_id(partner_id, email_from)"
select="1" />
on_change="onchange_partner_id(partner_id, email_from)"
select="1" />
<field name="partner_address_id"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
select="2" />
on_change="onchange_partner_address_id(partner_address_id, email_from)"
select="2" />
<field name="email_from" select="2" />
<button name="remind_partner"
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
</group>
<separator colspan="4" string="Categorization"/>
@ -53,37 +53,37 @@
<field name="section_id" widget="selection"/>
<field name="user_id" select="1"/>
<button name="remind_user"
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
</group>
<separator colspan="4" string="Details"/>
<field name="description" colspan="4"
nolabel="1" widget="text_tag" readonly="1" />
nolabel="1" widget="text_tag" readonly="1" />
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close"
states="open,draft,pending" string="Close"
type="object" icon="gtk-close" />
states="open,draft,pending" string="Close"
type="object" icon="gtk-close" />
<button name="case_open"
states="draft,pending" string="Open"
type="object" icon="gtk-go-forward" />
states="draft,pending" string="Open"
type="object" icon="gtk-go-forward" />
<button name="case_cancel"
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
<button name="case_pending"
states="draft,open" string="Pending"
type="object" icon="gtk-media-pause" />
states="draft,open" string="Pending"
type="object" icon="gtk-media-pause" />
<button name="case_escalate"
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
<button name="case_reset"
states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
</group>
</page>
<page string="History" groups="base.group_extended">
@ -126,10 +126,10 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.helpdesk'}"
icon="gtk-undo" type="action" />
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.helpdesk'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
@ -138,9 +138,9 @@
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.helpdesk'}"
icon="gtk-go-forward" type="action" />
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.helpdesk'}"
icon="gtk-go-forward" type="action" />
</page>
</notebook>
</form>
@ -162,25 +162,25 @@
<field name="date" string="Date"/>
<field name="date_deadline"/>
<field name="user_id"/>
<field name="section_id" string="Section" />
<field name="section_id"/>
<field name="state"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object" icon="gtk-convert" />
states="done,cancel" type="object" icon="gtk-convert" />
</tree>
</field>
</record>
@ -224,24 +224,24 @@
<field name="partner_id" />
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Helpdesk Requests" default="1" />
domain="[('user_id','=',uid)]"
help="My Helpdesk Requests" default="1" />
</field>
<field name="section_id"
default="context.get('section_id', False)" select="1"
widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
default="context.get('section_id', False)" select="1"
widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
</field>
<newline/>
<group expand="1" string="Group By..." colspan="12" col="20">
<filter string="Customer" icon="terp-crm"
domain="[]" context="{'group_by':'partner_id'}" />
domain="[]" context="{'group_by':'partner_id'}" />
<filter string="State" icon="terp-crm" domain="[]"
context="{'group_by':'state'}" />
context="{'group_by':'state'}" />
<filter string="Priority" icon="terp-crm"
domain="[]" context="{'group_by':'priority'}" />
domain="[]" context="{'group_by':'priority'}" />
</group>
</search>
</field>

View File

@ -13,7 +13,7 @@
<field name="context">{'object_id':'crm.lead'}</field>
</record>
<menuitem action="crm_lead_stage_act" id="menu_crm_lead_stage_act"
parent="crm.menu_crm_case_stage" />
parent="crm.menu_crm_case_stage" />
<!-- Resource Type Form View -->
@ -22,12 +22,12 @@
<field name="res_model">crm.case.resource.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
<field name="context">{'object_id':'crm.lead'}</field>
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
<field name="context">{'object_id':'crm.lead'}</field>
</record>
<menuitem action="crm_lead_resource_act"
id="menu_crm_lead_resource_act"
parent="crm.menu_crm_case_resource_type" />
id="menu_crm_lead_resource_act"
parent="crm.menu_crm_case_resource_type" />
<!-- CRM Lead Form View -->
@ -45,23 +45,23 @@
name="convert_opportunity"
string="Convert"
help="Convert into Opportunity"
icon="gtk-index"
type="object"
icon="gtk-index"
type="object"
attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<newline />
<field name="section_id" colspan="1"
widget="selection" />
widget="selection" />
<field name="user_id" />
<field name="stage_id" widget="selection"
readonly="1"
domain="[('object_id.model', '=', 'crm.lead')]" />
readonly="1"
domain="[('object_id.model', '=', 'crm.lead')]" />
<group col="2" colspan="1">
<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" />
<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" />
</group>
</group>
<notebook colspan="4">
@ -104,23 +104,47 @@
<group col="8" colspan="4">
<field name="state" select="2"/>
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
</group>
</page>
<page string="Extra Info" groups="base.group_extended">
<group colspan="2" col="2">
<separator string="Categories" colspan="2" col="2"/>
<field name="company_id"
groups="base.group_multi_company"
widget="selection" colspan="2" />
<field name="categ_id"
widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
<field name="type_id" string="Campaign" select="1"/>
<field name="referred"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2" col="2"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
</group>
<group colspan="2" col="2">
<separator string="Statistics" colspan="2" col="2"/>
<field name="day_open"/>
<field name="day_close"/>
</group>
</page>
<page string="Emails" groups="base.group_extended">
@ -135,53 +159,29 @@
<field name="email_from"/>
<button
string="Add a CC"
name="%(crm.action_view_crm_email_add_cc_wizard)d"
icon="gtk-add" type="action"/>
</group>
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.lead'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email_to"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="gtk-go-forward" type="action" />
</page>
<page string="Extra Info" groups="base.group_extended">
<group colspan="2" col="2">
<separator string="Categories" colspan="2" col="2"/>
<field name="company_id"
groups="base.group_multi_company"
widget="selection" colspan="2" />
<field name="categ_id"
widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
<field name="type_id" string="Campaign" select="1"/>
<field name="referred"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2" col="2"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
<field name="date_open"/>
</group>
<group colspan="2" col="2">
<separator string="Statistics" colspan="2" col="2"/>
<field name="day_open"/>
<field name="day_close"/>
</group>
name="%(crm.action_view_crm_email_add_cc_wizard)d"
icon="gtk-add" type="action"/>
</group>
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.lead'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email_to"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="gtk-go-forward" type="action" />
</page>
</notebook>
</form>
</field>
@ -207,30 +207,30 @@
<field name="stage_id"/>
<button name="stage_previous" string="Previous"
states="open,pending" type="object" icon="gtk-go-back" />
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="section_id"
invisible="context.get('invisible_section', True)" />
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" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button string="Convert to Opportunity"
name="%(action_crm_lead2opportunity)d"
states="draft,open,pending" icon="gtk-index"
type="action" />
name="%(action_crm_lead2opportunity)d"
states="draft,open,pending" icon="gtk-index"
type="action" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
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" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</tree>
</field>
</record>
@ -244,11 +244,11 @@
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Meeting For Leads Generation"
date_start="create_date" color="user_id"
date_delay="duration">
<field name="name" />
<field name="partner_name" />
<field name="partner_contact" />
date_start="create_date" color="user_id"
date_delay="duration">
<field name="name" />
<field name="partner_name" />
<field name="partner_contact" />
</calendar>
</field>
</record>
@ -274,9 +274,9 @@
<separator orientation="vertical"/>
<filter icon="gtk-home" string="Today"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')), \
('create_date','&gt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
help="Todays' Opportunities" />
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')), \
('create_date','&gt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
help="Todays' Opportunities" />
<filter icon="gtk-media-rewind" string="7 Days"
help="Opportunities during last 7 days"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d')),\
@ -290,6 +290,9 @@
domain="[('user_id','=',uid)]"
help="My Leads" default="1"
/>
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Leads" />
</field>
<field name="section_id" default="context.get('section_id', False)" widget="selection"
context="{'invisible_section': False}">
@ -300,7 +303,7 @@
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[]"
help="Show Sections"/>
help="Show Sales Team"/>
</field>
<newline/>
<group expand="1" string="Group By..." colspan="14">
@ -314,7 +317,7 @@
<filter string="Referrer" icon="terp-crm" domain="[]" context="{'group_by':'referred'}"/>
<separator orientation="vertical"/>
<filter string="Creation" icon="terp-project"
domain="[]" context="{'group_by':'create_date'}" />
domain="[]" context="{'group_by':'create_date'}" />
</group>
</search>
</field>

View File

@ -14,8 +14,8 @@
</record>
<menuitem action="crm_opportunity_categ_action"
id="menu_crm_case_opportunity-act"
parent="crm.menu_crm_case_categ" />
id="menu_crm_case_opportunity-act"
parent="crm.menu_crm_case_categ" />
<!-- Opportunity Stages Form View-->
@ -29,8 +29,8 @@
</record>
<menuitem action="crm_opportunity_stage_act"
id="menu_crm_opportunity_stage_act"
parent="crm.menu_crm_case_stage" />
id="menu_crm_opportunity_stage_act"
parent="crm.menu_crm_case_stage" />
<!-- Opportunity Resource Type Form View -->
@ -44,9 +44,8 @@
</record>
<menuitem action="crm_opportunity_resource_act"
id="menu_crm_opportunity_resource_act"
parent="crm.menu_crm_case_resource_type" />
id="menu_crm_opportunity_resource_act"
parent="crm.menu_crm_case_resource_type" />
<!-- Opportunities Form View -->
@ -61,19 +60,19 @@
<label string="Stage:" align="1.0"/>
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
on_change="onchange_stage_id(stage_id)"
widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
<button name="stage_previous"
states="open,pending" type="object"
icon="gtk-go-back" string="" />
states="open,pending" type="object"
icon="gtk-go-back" string="" />
<button name="stage_next" states="open,pending"
type="object" icon="gtk-go-forward" string="" />
type="object" icon="gtk-go-forward" string="" />
</group>
<field name="user_id"/>
<button name="action_makeMeeting" type="object"
string="Schedule Meeting" icon="gtk-redo" />
string="Schedule Meeting" icon="gtk-redo" />
<field name="planned_revenue"/>
<field name="probability"/>
@ -84,14 +83,14 @@
<notebook colspan="4">
<page string="Opportunity">
<group col="3" colspan="2">
<separator colspan="3" string="Contacts"/>
<separator colspan="4" string="Contacts"/>
<field name="partner_id" select="1"
on_change="onchange_partner_id(partner_id, email_from)"
colspan="2" />
on_change="onchange_partner_id(partner_id, email_from)"
colspan="2" />
<field name="partner_address_id"
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
<field name="email_from" string="Email" />
<field name="phone"/>
</group>
@ -101,8 +100,8 @@
<field name="section_id" colspan="1" widget="selection"/>
<field name="priority" string="Priority"/>
<field name="categ_id" select="1"
string="Category" widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
string="Category" widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
</group>
<separator colspan="4" string="Details"/>
@ -112,23 +111,23 @@
<group col="8" colspan="4">
<field name="state" select="2"/>
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_close" string="Mark Won"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_cancel" string="Mark Lost"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset" string="Reset to New"
states="done,cancel" type="object"
icon="gtk-convert" />
states="done,cancel" type="object"
icon="gtk-convert" />
</group>
</page>
@ -145,7 +144,6 @@
<field name="active"/>
<field name="day_open"/>
<field name="day_close"/>
</group>
<separator colspan="4" string="References"/>
<field name="ref"/>
@ -177,10 +175,10 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.opportunity'}"
icon="gtk-undo" type="action" />
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.opportunity'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
@ -189,9 +187,9 @@
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.opportunity'}"
icon="gtk-go-forward" type="action" />
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.opportunity'}"
icon="gtk-go-forward" type="action" />
</page>
</notebook>
</form>
@ -213,10 +211,10 @@
<field name="categ_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<button name="stage_previous" string="Previous"
states="open,pending" type="object" icon="gtk-go-back" />
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="planned_revenue" sum="Total of Planned Revenue"/>
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
<field name="date_deadline" string="Excepted Closing"/>
@ -224,17 +222,17 @@
<field name="user_id"/>
<field name="state"/>
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Won"
states="open,draft,pending" type="object"
icon="gtk-close" />
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_pending" string="Pending"
states="open,draft" type="object"
icon="gtk-media-pause" />
states="open,draft" type="object"
icon="gtk-media-pause" />
<button name="case_cancel" string="Lost"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</tree>
</field>
</record>
@ -262,14 +260,24 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Opportunities">
<filter icon="terp-project"
string="Current"
default="1"
domain="[('state','in',('draft','open'))]"/>
<filter icon="terp-project"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-project"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<filter icon="gtk-home" string="Today"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')), ('create_date','&gt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
help="Todays' Opportunities" />
<filter icon="gtk-media-rewind" string="7 Days"
help="Opportunities during last 7 days"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d')),\
('create_date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
('create_date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
<separator orientation="vertical"/>
<field name="name" string="Opportunity"/>
@ -279,44 +287,37 @@
domain="[('user_id','=',uid)]"
help="My Opportunities" default="1"
/>
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Opportunities" />
</field>
<field name="section_id"
default="context.get('section_id', False)" select="1"
widget="selection">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
</field>
<field name="state">
<filter icon="gtk-media-rewind"
help="New and open opportunities"
default="1"
domain="[('state','in',('draft','open'))]" />
default="context.get('section_id', False)" select="1"
widget="selection">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
</field>
<newline/>
<group expand="1" string="Group By..." colspan="4">
<group expand="1" string="Group By..." colspan="16">
<filter string="Stage" icon="terp-crm" domain="[]"
context="{'group_by':'stage_id'}" />
context="{'group_by':'stage_id'}" />
<filter string="Category" icon="terp-crm"
domain="[]" context="{'group_by':'categ_id'}" />
domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Campaign" icon="terp-crm"
domain="[]" context="{'group_by':'type_id'}" />
domain="[]" context="{'group_by':'type_id'}" />
<separator orientation="vertical" />
<filter string="Partner" icon="terp-crm" domain="[]"
context="{'group_by':'partner_id'}" />
context="{'group_by':'partner_id'}" />
<filter string="Salesman" icon="terp-crm"
domain="[]" context="{'group_by':'user_id'}" />
domain="[]" context="{'group_by':'user_id'}" />
<separator orientation="vertical" />
<filter string="Creation" icon="terp-project"
domain="[]" context="{'group_by':'create_date'}" />
domain="[]" context="{'group_by':'create_date'}" />
<filter string="Exp.Closing" icon="terp-project"
domain="[]" context="{'group_by':'date_deadline'}" />
domain="[]" context="{'group_by':'date_deadline'}" />
</group>
</search>
</field>

View File

@ -14,7 +14,7 @@
</record>
<menuitem action="crm_phonecall_categ_action"
id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ" />
id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ" />
<!-- ResourceType Form View -->
@ -23,13 +23,13 @@
<field name="res_model">crm.case.resource.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
<field name="context">{'object_id':'crm.phonecall'}</field>
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
<field name="context">{'object_id':'crm.phonecall'}</field>
</record>
<menuitem action="crm_phonecall_resource_act"
id="menu_crm_phonecall_resource_act"
parent="crm.menu_crm_case_resource_type" />
id="menu_crm_phonecall_resource_act"
parent="crm.menu_crm_case_resource_type" />
<!-- PhoneCalls Tree View -->
@ -87,9 +87,9 @@
name="%(phonecall2opportunity_act)d"
icon="gtk-index" type="action"
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
<label colspan="6" string=""/>
<button string="Schedule Other Call"
icon="gtk-redo"
<label colspan="6" string=""/>
<button string="Schedule Other Call"
icon="gtk-redo"
name="%(phonecall_to_phonecall_act)d"
type="action" />
@ -97,7 +97,7 @@
<group col="3" colspan="2">
<separator colspan="3" string="Contacts" />
<field name="partner_id"
on_change="onchange_partner_id(partner_id, email_from)" />
on_change="onchange_partner_id(partner_id, email_from)" />
<button string="Create a Partner"
icon="terp-crm"
name="%(action_crm_phonecall2partner)d"
@ -105,7 +105,7 @@
attrs="{'invisible':[('partner_id','!=',False)]}" />
<newline/>
<field name="partner_address_id" string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
<newline/>
<field name="partner_mobile" />
</group>
@ -120,19 +120,19 @@
<group col="8" colspan="4">
<field name="state" select="1" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_pending" string="Not Held"
states="open" type="object" icon="gtk-undo" />
states="open" type="object" icon="gtk-undo" />
<button name="case_close" string="Held"
states="open,draft,pending" type="object"
icon="gtk-jump-to" />
states="open,draft,pending" type="object"
icon="gtk-jump-to" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object"
icon="gtk-convert" />
states="done,cancel" type="object"
icon="gtk-convert" />
</group>
</form>
</field>
@ -177,35 +177,30 @@
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Phonecalls"
default="1" />
domain="[('user_id','=',uid)]" help="My Phonecalls"
default="1" />
<filter icon="terp-partner"
domain="[('user_id','=',False)]"
help="Unassigned Phonecalls" />
</field>
<field name="state">
<filter icon="gtk-index"
domain="[('state','in',('open','draft' ))]"
help="Current" default="1" />
domain="[('user_id','=',False)]"
help="Unassigned Phonecalls" />
</field>
<field name="section_id"
default="context.get('section_id', False)" select="1"
widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
default="context.get('section_id', False)" select="1"
widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />
</field>
<newline/>
<group expand="1" string="Group By..." colspan="4">
<filter string="Partner" icon="terp-crm" domain="[]"
context="{'group_by':'partner_id'}" />
context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-crm"
domain="[]" context="{'group_by':'user_id'}" />
domain="[]" context="{'group_by':'user_id'}" />
<separator orientation="vertical" />
<filter string="Creation" icon="terp-project"
domain="[]" context="{'group_by':'create_date'}" />
domain="[]" context="{'group_by':'create_date'}" />
<filter string="Date" icon="terp-project" domain="[]"
context="{'group_by':'date'}" />
context="{'group_by':'date'}" />
</group>
</search>
</field>

View File

@ -20,7 +20,6 @@
<field name="parent_id" select="2" widget="selection"/>
<field name="allow_unlink" select="2"/>
<field name="reply_to" select="2"/>
<field name="resource_calendar_id"/>
</page>
</notebook>
</form>
@ -142,8 +141,8 @@
<menuitem id="menu_crm_case_categ" name="Categories" parent="crm.menu_crm_configuration"/>
<menuitem action="crm_case_section_act"
id="menu_crm_case_section_act"
parent="crm.menu_crm_configuration" />
id="menu_crm_case_section_act"
parent="crm.menu_crm_configuration" />
<!-- Resource Type of case Tree View -->
@ -185,7 +184,7 @@
<field name="view_id" ref="crm_case_resource_type_tree"/>
</record>
<menuitem id="menu_crm_case_resource_type" name="Resource Type"
parent="crm.menu_crm_configuration" />
parent="crm.menu_crm_configuration" />
<record id="crm_case_section_act_tree" model="ir.actions.act_window">
<field name="name">Cases by section</field>
@ -242,11 +241,11 @@
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar color="user_id" date_start="create_date"
date_stop="date_deadline" day_length="12"
string="Cases">
<field name="name" />
<field name="partner_id" />
<field name="state" />
date_stop="date_deadline" day_length="12"
string="Cases">
<field name="name" />
<field name="partner_id" />
<field name="state" />
</calendar>
</field>
</record>
@ -268,22 +267,22 @@
<field name="user_id"/>
<field name="state"/>
<button name="case_close"
states="open,draft,pending" string="Close"
type="object" icon="gtk-close" />
states="open,draft,pending" string="Close"
type="object" icon="gtk-close" />
<button name="case_open" states="draft,pending"
string="Open" type="object" icon="gtk-go-forward" />
string="Open" type="object" icon="gtk-go-forward" />
<button name="case_cancel"
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
<button name="case_pending" states="draft,open"
string="Pending" type="object"
icon="gtk-media-pause" />
string="Pending" type="object"
icon="gtk-media-pause" />
<button name="case_escalate"
states="open,draft,pending" string="Escalate"
type="object" icon="gtk-go-up" />
states="open,draft,pending" string="Escalate"
type="object" icon="gtk-go-up" />
<button name="case_reset" states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
string="Reset to Draft" type="object"
icon="gtk-convert" />
</tree>
</field>
</record>
@ -306,24 +305,24 @@
<page string="General">
<group col="8" colspan="4">
<field colspan="4" name="partner_id"
on_change="onchange_partner_id(partner_id, email_from)"
select="1" />
on_change="onchange_partner_id(partner_id, email_from)"
select="1" />
<field colspan="3"
name="partner_address_id"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
select="2" />
name="partner_address_id"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
select="2" />
<newline />
<field colspan="3" name="email_from"
select="2" />
select="2" />
<button name="remind_partner"
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
<field name="user_id" select="1" />
<button name="remind_user"
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
states="open,pending"
string="Send Reminder" type="object"
icon="gtk-go-forward" />
</group>
<separator colspan="4" string="Description"/>
<field name="description" colspan="4" nolabel="1"/>
@ -331,27 +330,27 @@
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close"
states="open,draft,pending"
string="Close" type="object"
icon="gtk-close" />
states="open,draft,pending"
string="Close" type="object"
icon="gtk-close" />
<button name="case_open"
states="draft,pending" string="Open"
type="object" icon="gtk-go-forward" />
states="draft,pending" string="Open"
type="object" icon="gtk-go-forward" />
<button name="case_cancel"
states="draft,open,pending"
string="Cancel" type="object"
icon="gtk-cancel" />
states="draft,open,pending"
string="Cancel" type="object"
icon="gtk-cancel" />
<button name="case_pending"
states="draft,open" string="Pending"
type="object" icon="gtk-media-pause" />
states="draft,open" string="Pending"
type="object" icon="gtk-media-pause" />
<button name="case_escalate"
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
<button name="case_reset"
states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
</group>
</page>
<page string="History" groups="base.group_extended">
@ -364,7 +363,7 @@
<separator colspan="4" string="Action Information"/>
<field colspan="4" name="name"/>
<field name="date" select="2"/>
<field name="user_id" select="2"/>
<field name="user_id" select="2"/>
</form>
</field>
</page>
@ -377,7 +376,7 @@
<group col="7" colspan="4">
<field name="date"/>
<field name="email_to"/>
<field name="email_from"/>
<field name="email_from"/>
<button
string="Add a CC"
name="%(crm.action_view_crm_email_add_cc_wizard)d"
@ -386,10 +385,10 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.case'}"
icon="gtk-undo" type="action" />
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.case'}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">
<field name="description"/>
@ -398,9 +397,9 @@
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.case'}"
icon="gtk-go-forward" type="action" />
name="%(action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.case'}"
icon="gtk-go-forward" type="action" />
</page>
</notebook>
</form>
@ -415,28 +414,28 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Case">
<group col='6' colspan='4'>
<filter icon="terp-partner" string="My Cases"
domain="[('user_id','=',uid)]" separator="1"
default="1" help="Cases Related to Current User" />
<field name="state" select="1">
<filter icon="gtk-new"
domain="[('state','in',('draft', 'open'))]"
help="Current Cases" />
<filter icon="gtk-yes"
domain="[('state','=','open')]" help="Open Cases" />
<filter icon="gtk-media-pause"
domain="[('state','=','pending')]"
help="Pending Cases" />
</field>
<separator orientation="vertical" />
<field name="name" select='1' />
<field name="user_id" select="1"
widget="selection" />
</group>
<field name="section_id"
default="context.get('section_id', False)" select="1"
widget="selection" string="Section" />
<group col='6' colspan='4'>
<filter icon="terp-partner" string="My Cases"
domain="[('user_id','=',uid)]" separator="1"
default="1" help="Cases Related to Current User" />
<field name="state" select="1">
<filter icon="gtk-new"
domain="[('state','in',('draft', 'open'))]"
help="Current Cases" />
<filter icon="gtk-yes"
domain="[('state','=','open')]" help="Open Cases" />
<filter icon="gtk-media-pause"
domain="[('state','=','pending')]"
help="Pending Cases" />
</field>
<separator orientation="vertical" />
<field name="name" select='1' />
<field name="user_id" select="1"
widget="selection" />
</group>
<field name="section_id"
default="context.get('section_id', False)" select="1"
widget="selection"/>
</search>
</field>
</record>
@ -454,7 +453,7 @@
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="domain">
[('state','&lt;&gt;','done'),('state','&lt;&gt;','cancel'),('state','&lt;&gt;','pending')]
[('state','&lt;&gt;','done'),('state','&lt;&gt;','cancel'),('state','&lt;&gt;','pending')]
</field>
<field name="search_view_id" ref="view_crm_case_filter"/>
</record>
@ -504,15 +503,15 @@
<field name="arch" type="xml">
<search string="Search Histories">
<filter icon="terp-crm" string="My Histories"
domain="[('user_id','=',uid)]"
help="My Histories" />
domain="[('user_id','=',uid)]"
help="My Histories" />
<separator orientation="vertical"/>
<group col="6" colspan="2">
<field name="date" select="1"/>
<field name="user_id" select="1" widget="selection"/>
<field name="section_id"
default="context.get('section_id', False)"
select="1" widget="selection" string="Section" />
default="context.get('section_id', False)"
select="1" widget="selection"/>
</group>
</search>
</field>
@ -574,11 +573,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partner Segmentation">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="categ_id" select="2"/>
<field name="exclusif"/>
</group>
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="categ_id" select="2"/>
<field name="exclusif"/>
</group>
<notebook colspan="4">
<page string="Sales Purchase">
<field name="sales_purchase_active"/>
@ -591,21 +590,21 @@
<field colspan="4" name="segmentation_line" widget="one2many_list" nolabel="1"/>
</page>
<page string="Description">
<field colspan="4" name="description" select="2" nolabel="1"/>
</page>
<field colspan="4" name="description" select="2" nolabel="1"/>
</page>
</notebook>
<field name="state"/>
<group col="3" colspan="2">
<button name="process_start"
states="not running"
string="Compute Segmentation" type="object"
icon="gtk-execute" />
states="not running"
string="Compute Segmentation" type="object"
icon="gtk-execute" />
<button name="process_stop" states="running"
string="Stop Process" type="object"
icon="gtk-cancel" />
string="Stop Process" type="object"
icon="gtk-cancel" />
<button name="process_continue" states="running"
string="Continue Process" type="object"
icon="gtk-go-forward" />
string="Continue Process" type="object"
icon="gtk-go-forward" />
</group>
</form>
</field>
@ -640,8 +639,8 @@
<field name="view_mode">tree,form</field>
</record>
<menuitem action="crm_segmentation_tree-act"
id="menu_crm_segmentation-act"
parent="crm.menu_crm_configuration" />
id="menu_crm_segmentation-act"
parent="crm.menu_crm_configuration" />
<record model="ir.ui.view" id="view_users_form_simple_modif_inherited1">
<field name="name">view.users.form.crm.modif.inherited1</field>
@ -651,8 +650,8 @@
<field name="arch" type="xml">
<page string="Current Activity" position="inside">
<field name="context_section_id" completion="1"
widget="selection"
context="{'user_prefence':True}" />
widget="selection"
context="{'user_prefence':True}" />
</page>
</field>
</record>
@ -672,7 +671,7 @@
<!-- Inherit View From Partner -->
<record id="view_partners_form_crm1" model="ir.ui.view">
<record id="view_partners_form_crm1" model="ir.ui.view">
<field name="name">view.res.partner.form.crm.inherited1</field>
<field name="model">res.partner</field>
<field name="type">form</field>

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-05 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm

View File

@ -24,12 +24,10 @@ import tools
class crm_opportunity_report(osv.osv):
""" CRM Opportunity Report """
_name = "crm.opportunity.report"
_auto = False
_inherit = "crm.case.report"
_description = "CRM Opportunity Report"
_columns = {
'probability': fields.float('Avg. Probability', readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
@ -47,7 +45,6 @@ class crm_opportunity_report(osv.osv):
}
def init(self, cr):
""" Display Est.Revenue , Average Probability ,Est.Revenue Probability
@param cr: the current row, from the database cursor
"""
@ -88,5 +85,3 @@ class crm_opportunity_report(osv.osv):
)""")
crm_opportunity_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,53 +1,53 @@
<openerp>
<data>
<data>
<!-- Lead to partner confirmation form -->
<!-- Lead to partner confirmation form -->
<record id="view_crm_lead2partner_create" model="ir.ui.view">
<field name="name">crm.lead2partner.view.create</field>
<field name="model">crm.lead2partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create a Partner?">
<label string="Are you sure you want to create a partner based on this lead ?" colspan="4"/>
<label string="You may have to verify that this partner does not exist already." colspan="4"/>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
<button name="open_create_partner" string="Create _Partner" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="view_crm_lead2partner_create" model="ir.ui.view">
<field name="name">crm.lead2partner.view.create</field>
<field name="model">crm.lead2partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create a Partner?">
<label string="Are you sure you want to create a partner based on this lead ?" colspan="4"/>
<label string="You may have to verify that this partner does not exist already." colspan="4"/>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
<button name="open_create_partner" string="Create _Partner" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<!-- Lead to Partner form view -->
<!-- Lead to Partner form view -->
<record id="view_crm_lead2partner" model="ir.ui.view">
<field name="name">crm.lead2partner.view</field>
<field name="model">crm.lead2partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create a Partner">
<field name="action"/>
<group attrs="{'invisible':[('action','!=','exist')]}">
<field name="partner_id" attrs="{'required': [('action', '=', 'exist')]}"/>
</group>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="make_partner" string="Continue" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="view_crm_lead2partner" model="ir.ui.view">
<field name="name">crm.lead2partner.view</field>
<field name="model">crm.lead2partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create a Partner">
<field name="action"/>
<group attrs="{'invisible':[('action','!=','exist')]}">
<field name="partner_id" attrs="{'required': [('action', '=', 'exist')]}"/>
</group>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="make_partner" string="Continue" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<!-- Lead to Partner wizard -->
<!-- Lead to Partner wizard -->
<act_window id="action_crm_lead2partner"
key2="client_action_multi" name="Create a Partner"
res_model="crm.lead2partner" src_model="crm.lead"
view_id="view_crm_lead2partner_create"
view_mode="form" target="new" view_type="form" />
<act_window id="action_crm_lead2partner"
key2="client_action_multi" name="Create a Partner"
res_model="crm.lead2partner" src_model="crm.lead"
view_id="view_crm_lead2partner_create"
view_mode="form" target="new" view_type="form" />
</data>
</data>
</openerp>

View File

@ -38,20 +38,6 @@
</group>
<notebook colspan="4">
<page string="Personal Information">
<group col="2" colspan="2">
<separator colspan="2" string="Social IDs"/>
<field name="ssnid"/>
<field name="sinid" groups="base.group_extended"/>
<field name="otherid"/>
</group>
<group col="2" colspan="2">
<separator string="Status" colspan="2"/>
<field name="gender"/>
<field name="marital"/>
<field name="country_id"/>
<field name="birthday"/>
</group>
<group col="2" colspan="2">
<separator string="Contact Information" colspan="2"/>
<field name="address_home_id" colspan="2"/>
@ -62,6 +48,13 @@
<field name="work_location"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Social IDs"/>
<field name="ssnid"/>
<field name="sinid" groups="base.group_extended"/>
<field name="otherid"/>
</group>
<group col="2" colspan="2">
<separator string="Position" colspan="2"/>
<field name="job_id" widget="selection"/>
@ -70,6 +63,14 @@
<field name="parent_id" select="1"/>
<field name="coach_id" select="1"/>
</group>
<group col="2" colspan="2">
<separator string="Status" colspan="2"/>
<field name="gender"/>
<field name="marital"/>
<field name="country_id"/>
<field name="birthday"/>
</group>
</page>
<page string="Notes">
<field colspan="4" nolabel="1" name="notes"/>
@ -87,10 +88,10 @@
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="job_id"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
</tree>
</field>
@ -101,14 +102,12 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Employees">
<group col='6' colspan='2'>
<field name="name"/>
<field name="job_id" widget="selection"/>
<field name="department_id" widget="selection"/>
<field name="parent_id">
<filter icon="terp-partner" domain="[('parent_id','child_of',uid),('id', '!=', uid)]" help="Employees under me"/>
</field>
</group>
<filter icon="terp-partner" domain="[('parent_id','child_of',uid),('id', '!=', uid)]" string ="My Employees"/>
<separator orientation="vertical" />
<field name="name"/>
<field name="department_id" widget="selection"/>
<field name="job_id" widget="selection"/>
<field name="parent_id" widget="selection" />
<newline />
<group expand="1" string="Group By..." colspan="11" col="11">
@ -154,6 +153,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="view_id" ref="view_employee_tree"/>
<field name="search_view_id" ref="view_employee_filter"/>
</record>
<!--<menuitem
@ -208,6 +208,7 @@
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="ssnid"/>
<field name="user_id"/>
<field name="address_id"/>

View File

@ -46,11 +46,19 @@ def _employee_get(obj,cr,uid,context={}):
class hr_attendance(osv.osv):
_name = "hr.attendance"
_description = "Attendance"
def _day_compute(self, cr, uid, ids, fieldnames, args, context=None):
res = dict.fromkeys(ids, '')
for obj in self.browse(cr, uid, ids, context=context):
res[obj.id] = time.strftime('%Y-%m-%d', time.strptime(obj.name, '%Y-%m-%d %H:%M:%S'))
return res
_columns = {
'name' : fields.datetime('Date', required=True),
'action' : fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'),('action','Action')], 'Action', required=True),
'action_desc' : fields.many2one("hr.action.reason", "Action reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'employee_id' : fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
'day' : fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
}
_defaults = {
'name' : lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),

View File

@ -9,7 +9,7 @@
<field name="arch" type="xml">
<form string="Employee attendance">
<field name="employee_id" select="1"/>
<field colspan="4" name="name" select="1"/>
<field name="name" select="1"/>
<field name="action" select="1"/>
<field name="action_desc" select="1"/>
</form>
@ -48,9 +48,17 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Hr Attendance Search">
<filter icon="terp-sale" string="My Attendances" domain="[('employee_id.user_id.id', '=', uid)]" />
<filter icon="terp-sale" string="Today" domain="[('name::date','=',current_date)]" />
<separator orientation="vertical"/>
<field name="employee_id" select="1" />
<field name="name" select="1" />
<field name="action" select="1" />
<newline/>
<group expand="1" string="Group By..." colspan="11" col="11">
<filter string="Employee" icon="terp-sale" domain="[]" context="{'group_by':'employee_id'}"/>
<filter string="Day" icon="terp-sale" domain="[]" context="{'group_by':'day'}"/>
</group>
</search>
</field>
</record>

View File

@ -26,7 +26,8 @@
<field name="model">hr.expense.expense</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Expenses">
<tree string="Expenses"
colors="blue:state == 'draft'">
<field name="date"/>
<field name="employee_id"/>
<field name="department_id"/>
@ -66,6 +67,7 @@
<field name="arch" type="xml">
<form string="Expenses Sheet">
<group colspan="4" col="6">
<field name="employee_id" select="1"/>
<field name="name" select="1"/>
<field name="employee_id" select="1"/>
<field name="ref" select="2"/>
@ -151,15 +153,20 @@
help="My Expenses"
default="1"
domain="[('user_id','=',uid)]"/>
<filter icon="terp-hr"
domain="[('department_id','=',context.get('department_id',False))]"
string="Expenses of My Department"/>
</field>
<field name="state" select="1"/>
<field name="department_id" widget="selection">
<filter icon="terp-crm"
domain="[('department_id','=',context.get('department_id',False))]"
help="Expenses of My Department"/>
</field>
</group>
</search>
<field name="department_id" widget="selection" />
</group>
<newline />
<group expand="1" string="Group By..." colspan="11" col="11">
<filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Employee" icon="terp-sale" domain="[]" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Date" icon="terp-sale" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>

View File

@ -47,7 +47,7 @@
""",
'author': 'Tiny & Axelor',
'website': 'http://www.openerp.com',
'depends': ['hr', 'crm', 'process'],
'depends': ['hr', 'crm', 'process', 'resource'],
'init_xml': [],
'update_xml': [
'security/ir.model.access.csv',

View File

@ -224,6 +224,16 @@ class hr_holidays(osv.osv):
else:
raise osv.except_osv(_('Warning !'),_('Either there is no Employee defined, or no User attached with it.'))
self.write(cr, uid, ids, vals)
vals= {
'name':record.name,
'date_from':record.date_from,
'date_to':record.date_to,
'calendar_id':record.employee_id.calendar_id.id,
'company_id':record.employee_id.company_id.id,
'resource_id':record.employee_id.resource_id.id
}
self.pool.get('resource.calendar.leaves').create(cr,uid,vals)
return True
def holidays_confirm(self, cr, uid, ids, *args):
@ -246,17 +256,7 @@ class hr_holidays(osv.osv):
'number_of_days': nb,
'user_id': user_id
})
#vals= {
# 'name':record.name,
# 'date_from':record.date_from,
# 'date_to':record.date_to,
# 'calendar_id':record.employee_id.calendar_id.id,
# 'company_id':record.employee_id.company_id.id,
# 'resource_id':record.employee_id.resource_id.id
# }
#self.pool.get('resource.calendar.leaves').create(cr,uid,vals)
return True
return True
def holidays_refuse(self, cr, uid, ids, *args):
vals = {

View File

@ -7,31 +7,27 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Leave">
<group col='8' colspan='4'>
<filter icon="terp-hr" domain="[('state','=','draft')]" string="To Confirm"/>
<filter icon="terp-hr" domain="[('state','=','confirm')]" string="To Validate"/>
<separator orientation="vertical"/>
<field name="name" select='1'/>
<field name="state" select="1">
<filter icon="terp-hr" domain="[('state','=','refuse')]" help="Refused Holidays"/>
<filter icon="terp-hr" domain="[('state','=','validate')]" help="Validated Holidays"/>
</field>
<field name="user_id" select="1" widget="selection">
<filter icon="gtk-execute" help="My Leaves" domain="[('user_id','=',uid)]" />
</field>
<field name="department_id" select="1" widget="selection">
<filter icon="gtk-execute" domain="[('department_id','=',context.get('department_id',False))]"
help="My Departments Leaves"/>
</field>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="2" col="2">
<filter string="Employee" icon="terp-sale" domain="[]" context="{'group_by':'employee_id'}"/>
<group col='8' colspan='4'>
<filter icon="terp-hr" domain="[('state','=','draft')]" string="To Confirm"/>
<filter icon="terp-hr" domain="[('state','=','confirm')]" string="To Validate"/>
<filter icon="terp-hr" domain="[('department_id','=',context.get('department_id',False))]"
string="My Departments Leaves"/>
<filter icon="terp-hr" help="My Leaves" domain="[('user_id','=',uid)]" string="My Leaves"/>
<separator orientation="vertical"/>
<field name="user_id" select="1" widget="selection" />
<field name="department_id" select="1" widget="selection" />
<field name="name" select='1'/>
<field name="state" select="1">
<filter icon="terp-hr" domain="[('state','=','refuse')]" help="Refused Holidays"/>
<filter icon="terp-hr" domain="[('state','=','validate')]" help="Validated Holidays"/>
</field>
</group>
<newline />
<group expand="1" string="Group By..." colspan="11" col="11">
<filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Manager" icon="terp-sale" domain="[]" context="{'group_by':'manager_id'}"/>
</group>
</search>
</search>
</field>
</record>
@ -141,16 +137,17 @@
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leaves">
<field name="name"/>
<tree string="Leaves"
colors="red:state == 'refuse';grey:state == 'cancel'">
<field name="employee_id"/>
<field name="department_id"/>
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
<field name="date_from"/>
<field name="date_to"/>
<field name="name"/>
<field name="holiday_status_id"/>
<field name="state"/>
<field name="type"/>
<field name="state"/>
</tree>
</field>
</record>

View File

@ -77,7 +77,7 @@ class wizard_report(wizard.interface):
states={
'init':{
'actions':[_check],
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel'), ('checkdept', 'Print')]}
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel', 'gtk-cancel'), ('checkdept', 'Print', 'gtk-print')]}
},
'checkdept': {
'actions': [],
@ -85,7 +85,7 @@ class wizard_report(wizard.interface):
},
'notify': {
'actions': [],
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok')]}
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok', 'gtk-ok')]}
},
'report':{
'actions':[],

View File

@ -67,7 +67,7 @@ class wizard_report(wizard.interface):
states={
'init':{
'actions':[_check],
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel', 'gtk-cancel'), ('checkemp', 'Print', 'gtk-ok')]}
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel','gtk-cancel'), ('checkemp', 'Print', 'gtk-print')]}
},
'checkemp': {
'actions': [],
@ -75,7 +75,7 @@ class wizard_report(wizard.interface):
},
'notify': {
'actions': [],
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok')]}
'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok', 'gtk-ok')]}
},
'report':{
'actions':[],

View File

@ -7,7 +7,7 @@
<field name="model">hr.analytic.timesheet</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree editable="bottom" string="Timesheet Line">
<tree editable="bottom" string="Timesheet Lines">
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
<field name="date" on_change="on_change_date(date)"/>
<field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" name="account_id"/>
@ -50,12 +50,12 @@
<field name="arch" type="xml">
<search string="Timesheet">
<group col='8' colspan='4'>
<filter icon="terp-hr" domain="[('date', '=', time.strftime('%%Y-%%m-%%d'))]" string="Today"/>
<filter icon="terp-hr" domain="[('user_id','=',uid)]" string="My Work" help="My Work"/>
<separator orientation="vertical"/>
<field name="user_id" select="1" widget="selection"/>
<field name="account_id" select="1" widget="selection"/>
<field name="date" select="1"/>
<filter icon="terp-hr" domain="[('date', '=', time.strftime('%%Y-%%m-%%d'))]" string="Today"/>
<filter icon="terp-hr" domain="[('user_id','=',uid)]" string="My Work" help="My Work"/>
<separator orientation="vertical"/>
<field name="user_id" select="1" widget="selection"/>
<field name="account_id" select="1" widget="selection"/>
<field name="date" select="1"/>
</group>
</search>
</field>
@ -83,11 +83,6 @@
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="hr_timesheet_line_search"/>
</record>
<!-- <menuitem
action="act_hr_timesheet_line_evry1_all_form"
id="menu_act_hr_timesheet_line_evry1_all_form"
parent="hr_timesheet.menu_act_hr_timesheet_line_today_form"
groups="hr.group_hr_manager"/>-->
<record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
<field name="name">hr.timesheet.employee.extd_form</field>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-22 19:08+0000\n"
"PO-Revision-Date: 2010-04-06 23:02+0000\n"
"Last-Translator: Ferdinand @ ChriCar <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-30 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet
@ -351,7 +351,7 @@ msgstr "März"
#: xsl:hr.analytical.timesheet:0
#: xsl:hr.analytical.timesheet_users:0
msgid "Total"
msgstr "Betrag gesammt"
msgstr "Betrag gesamt"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet,init,month:0

View File

@ -68,16 +68,16 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Timesheet by user">
<group col="10" colspan="4">
<filter icon="terp-hr" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheets"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Timesheet by user in this year"/>
<filter icon="terp-hr" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Timesheet by user in this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="user_id" select="1"/>
</group>
<group col="10" colspan="4">
<filter icon="terp-hr" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheets"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Timesheet by user in this year"/>
<filter icon="terp-hr" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Timesheet by user in this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="user_id" select="1"/>
</group>
</search>
</field>
</record>
@ -124,8 +124,8 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Timesheet by invoice">
<filter icon="terp-hr" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheets to invoice"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheets to invoice"/>
<separator orientation="vertical"/>
<field name="account_id" select="1"/>
<field name="manager_id" select="1"/>
<field name="user_id" select="1"/>
@ -207,17 +207,17 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Daily timesheet by account">
<group col="10" colspan="4">
<filter icon="terp-hr" string="My Daily Timesheets" domain="[('user_id','=',uid)]" help="My Daily Timesheets by account"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Daily Timesheets for this year"/>
<filter icon="terp-hr" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Daily Timesheets of this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="account_id" select="1"/>
<field name="user_id" select="1"/>
</group>
<group col="10" colspan="4">
<filter icon="terp-hr" string="My Daily Timesheets" domain="[('user_id','=',uid)]" help="My Daily Timesheets by account"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Daily Timesheets for this year"/>
<filter icon="terp-hr" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Daily Timesheets of this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="account_id" select="1"/>
<field name="user_id" select="1"/>
</group>
</search>
</field>
</record>
@ -281,17 +281,17 @@
<field name="type">search</field>
<field name="arch" type="xml">
<form string="Timesheet by account">
<group col="10" colspan="4">
<filter icon="terp-hr" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheets by account"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="This Year" domain="[('name','=',time.strftime('%%Y'))]"/>
<filter icon="terp-hr" string="This Month" domain="[('month','=',time.strftime('%%m'))]"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="account_id" select="1"/>
<field name="user_id" select="1"/>
</group>
<group col="10" colspan="4">
<filter icon="terp-hr" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheets by account"/>
<separator orientation="vertical"/>
<filter icon="terp-hr" string="This Year" domain="[('name','=',time.strftime('%%Y'))]"/>
<filter icon="terp-hr" string="This Month" domain="[('month','=',time.strftime('%%m'))]"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="account_id" select="1"/>
<field name="user_id" select="1"/>
</group>
</form>
</field>
</record>
@ -323,15 +323,15 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Random Timesheets">
<field name="analytic_account_id" select="1"/>
<field name="name" select="1"/>
<field name="quantity" select="2" />
<field name="date" select="1"/>
<field name="analytic_account_id" select="1"/>
<field name="name" select="1"/>
<field name="quantity" select="2" />
<field name="date" select="1"/>
</tree>
</field>
</record>
</record>
<record model="ir.actions.act_window" id="action_random_timesheet_board">
<record model="ir.actions.act_window" id="action_random_timesheet_board">
<field name="name">Random Timesheet</field>
<field name="res_model">report.random.timesheet</field>
<field name="view_type">form</field>
@ -347,21 +347,21 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Random Timesheets Lines">
<field name="date" select="1"/>
<field name="user_id" />
<field name="name" select="1"/>
<field name="quantity" />
<field name="product_id" select="1"/>
<field name="analytic_account_id" select="1"/>
<field name="uom_id" />
<field name="amount" />
<field name="to_invoice" select="1"/>
<field name="general_account_id" />
<field name="date" select="1"/>
<field name="user_id" />
<field name="name" select="1"/>
<field name="quantity" />
<field name="product_id" select="1"/>
<field name="analytic_account_id" select="1"/>
<field name="uom_id" />
<field name="amount" />
<field name="to_invoice" select="1"/>
<field name="general_account_id" />
</tree>
</field>
</record>
</record>
<record model="ir.actions.act_window" id="action_random_timesheet_lines_board">
<record model="ir.actions.act_window" id="action_random_timesheet_lines_board">
<field name="type">ir.actions.act_window</field>
<field name="name">Timesheet Lines</field>
<field name="res_model">random.timesheet.lines</field>
@ -376,7 +376,7 @@
name="Time Tracking"
parent="base.menu_main_pm" sequence="3"/>
<menuitem action="action_random_timesheet_lines_board" id="menu_project_management_timesheet_lines_board" parent="base.menu_project_management_time_tracking" sequence="7"/>
<!--<menuitem action="action_random_timesheet_lines_board" id="menu_hr_action_random_timesheet_lines_board"
<!--<menuitem action="action_random_timesheet_lines_board" id="menu_hr_action_random_timesheet_lines_board"
parent="hr_attendance.menu_hr_time_tracking" groups="hr.group_hr_manager"/>-->
<menuitem action="action_random_timesheet_lines_board" id="menu_hr_action_random_timesheet_lines_board" name="Timesheets Lines"
parent="hr_attendance.menu_hr_time_tracking" groups="hr.group_hr_manager"/>

View File

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Editable current timesheet used in dashboard-->
<record id="hr_timesheet_sheet_tree" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.tree</field>
<field name="model">hr_timesheet_sheet.sheet</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Timesheets">
<tree string="Timesheets"
colors="blue:state == 'draft';grey:state == 'done'">
<field name="user_id"/>
<field name="department_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="name"/>
<field name="department_id"/>
<field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
<field name="total_timesheet"/>
<field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
@ -156,9 +156,11 @@
<field name="total_difference" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
</tree>
</field>
<field name="total_attendance" widget="float_time"/>
<field name="total_timesheet" widget="float_time"/>
<field name="total_difference" widget="float_time"/>
<group colspan="4" col="6">
<field name="total_attendance" widget="float_time"/>
<field name="total_timesheet" widget="float_time"/>
<field name="total_difference" widget="float_time"/>
</group>
</page>
</notebook>
<field name="state"/>
@ -179,17 +181,13 @@
<field name="arch" type="xml">
<search string="Search Timesheet">
<group col="10" colspan="4">
<filter icon="terp-crm" string="Unvalidated" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
<filter icon="terp-crm" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Timesheets"/>
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My" default="1"/>
<separator orientation="vertical"/>
<field name="state">
<filter icon="terp-hr" domain="[('state','=','draft')]" help="Draft Timesheets"/>
<filter icon="terp-hr" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
</field>
<field name="name" select="1"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Timesheet"/>
</field>
<filter icon="terp-crm" string="In Progress" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
<filter icon="terp-crm" string="To Validate" domain="[('state','=','confirmed')]" help="Confirmed Timesheets"/>
<separator orientation="vertical"/>
<field name="user_id" select="1" widget="selection"/>
<field name="date_from"/>
<field name="department_id" widget="selection">
<filter icon="terp-crm"
domain="[('department_id','=',context.get('department_id',False))]"
@ -197,10 +195,10 @@
</field>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
<group expand="1" string="Group By..." colspan="4" col="20">
<filter string="Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Department" icon="terp-project" domain="[]" context="{'group_by':'department_id'}"/>
</group>
</group>
</search>
</field>
</record>
@ -308,17 +306,6 @@
</field>
</field>
</record>
<record id="view_attendance_tree_who" model="ir.ui.view">
<field name="name">hr.attendance.tree</field>
<field name="model">hr.attendance</field>
<field name="type">tree</field>
<field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
<field name="arch" type="xml">
<field name="action_desc" position="after">
<field name="sheet_id"/>
</field>
</field>
</record>
<act_window domain="[('sheet_id', '=', active_id)]" id="act_hr_timesheet_sheet_sheet_by_day" name="Timesheet by Account" res_model="hr_timesheet_sheet.sheet.account" src_model="hr_timesheet_sheet.sheet"/>
<!-- <act_window domain="[('sheet_id', '=', active_id)]" id="act_hr_timesheet_sheet_sheet_by_account" name="Timesheet by Day" res_model="hr_timesheet_sheet.sheet.day" src_model="hr_timesheet_sheet.sheet"/> -->

View File

@ -25,7 +25,7 @@ class res_company(osv.osv):
_description = 'res.company'
def _get_default_ad(self, addresses):
city = post_code = address = ""
city = post_code = address = country_code = ""
for ads in addresses:
if ads.type == 'default':
city = ads.city or ""
@ -34,7 +34,9 @@ class res_company(osv.osv):
address = ads.street or ""
if ads.street2:
address += " " + ads.street2
return city, post_code, address
if ads.country_id:
country_code = ads.country_id and ads.country_id.code or ""
return city, post_code, address, country_code
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -32,6 +32,9 @@ class l10n_be_vat_declaration(osv.osv_memory):
'period_id': fields.many2one('account.period','Period', required=True),
'msg': fields.text('File created', size=64, readonly=True),
'file_save': fields.binary('Save File'),
'ask_resitution': {'type': 'boolean', 'string': 'Ask Restitution',},
'ask_payment': {'type': 'boolean', 'string': 'Ask Payment',},
'client_nihil': {'type': 'boolean', 'string': 'Last Declaration of Entreprise', 'help': 'Thick this case only if it concerns only the last statement on the civil or cessation of activity'},
}
_defaults = {
@ -46,7 +49,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
obj_comp = self.pool.get('res.company')
obj_data = self.pool.get('ir.model.data')
list_of_tags=['00','01','02','03','45','46','47','48','49','54','55','56','57','59','61','62','63','64','71','81','82','83','84','85','86','87','91']
list_of_tags=['00','01','02','03','44','45','46','47','48','49','54','55','56','57','59','61','62','63','64','71','81','82','83','84','85','86','87','88','91']
obj_company = obj_user.browse(cr, uid, uid, context=context).company_id
user_cmpny = obj_company.name
vat_no=obj_company.partner_id.vat
@ -59,26 +62,19 @@ class l10n_be_vat_declaration(osv.osv_memory):
ctx['period_id'] = data['period_id'] #added context here
tax_info = obj_tax_code.read(cr, uid, tax_code_ids, ['code','sum_period'], context=ctx)
address = post_code = city = ''
if not obj_company.partner_id.address:
address = post_code = city = ''
city, post_code, address = obj_comp._get_default_ad(obj_company.partner_id.address)
address = post_code = city = country_code = ''
city, post_code, address, country_code = obj_comp._get_default_ad(obj_company.partner_id.address)
year_id = obj_fyear.find(cr, uid)
account_period = obj_acc_period.browse(cr, uid, data['period_id'], context=context)
current_year = account_period.fiscalyear_id.name
period_code = account_period.code
send_ref = user_cmpny
if period_code:
send_ref = send_ref + period_code
send_ref = str(obj_company.partner_id.id) + str(account_period.date_start[5:7]) + str(account_period.date_stop[:4])
data_of_file='<?xml version="1.0"?>\n<VATSENDING xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MultiDeclarationTVA-NoSignature-14.xml">'
data_of_file +='\n\t<DECLARER>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<NAME>'+str(obj_company.name)+'</NAME>\n\t\t<ADDRESS>'+address+'</ADDRESS>'
data_of_file +='\n\t\t<POSTCODE>'+post_code+'</POSTCODE>\n\t\t<CITY>'+city+'</CITY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>'
data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t'
data_of_file +='\n\t\t<POSTCODE>'+post_code+'</POSTCODE>\n\t\t<CITY>'+city+'</CITY>\n\t\t<COUNTRY>'+country_code+'</COUNTRY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>'
data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+str(vat_no[2:])+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t'
starting_month = account_period.date_start[5:7]
ending_month = account_period.date_stop[5:7]
if starting_month != ending_month:
@ -89,14 +85,16 @@ class l10n_be_vat_declaration(osv.osv_memory):
else:
data_of_file += '<MONTH>' + starting_month + '</MONTH>\n\t\t\t'
data_of_file += '<YEAR>' + str(account_period.date_stop[:4]) + '</YEAR>\n\t\t</DPERIODE>\n\t\t<ASK RESTITUTION="NO" PAYMENT="NO"/>'
data_of_file += '\n\t\t<ClientListingNihil>'+ (data['form']['client_nihil'] and 'YES' or 'NO') +'</ClientListingNihil>'
data_of_file +='\n\t\t<DATA>\n\t\t\t<DATA_ELEM>'
for item in tax_info:
if item['code']:
if item['code'] == '71-72':
item['code'] = '71'
if item['code'] in list_of_tags:
data_of_file +='\n\t\t\t\t<D' + str(int(item['code'])) +'>' + str(int(item['sum_period']*100)) + '</D'+str(int(item['code'])) +'>'
data_of_file +='\n\t\t\t\t<D'+str(int(item['code'])) +'>' + str(abs(int(item['sum_period']*100))) + '</D'+str(int(item['code'])) +'>'
data_of_file +='\n\t\t\t</DATA_ELEM>\n\t\t</DATA>\n\t</VATRECORD>\n</VATSENDING>'
data['file_save'] = base64.encodestring(data_of_file)
@ -105,4 +103,4 @@ class l10n_be_vat_declaration(osv.osv_memory):
l10n_be_vat_declaration()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -15,6 +15,9 @@
<form string="Select Period">
<group colspan="4" >
<field name="period_id" select="1" default_focus="1"/>
<field name="ask_resitution"/>
<field name="ask_payment"/>
<field name="client_nihil"/>
<button colspan="1" name="create_xml" string="Create XML" type="object" icon="gtk-execute"/>
</group>
<separator string="XML Flie has been Created." colspan="4"/>
@ -44,4 +47,4 @@
id="l10_be_vat_declaration"/>
</data>
</openerp>
</openerp>

View File

@ -159,7 +159,7 @@ class mrp_bom(osv.osv):
@param arg: User defined argument
@param context: A standard dictionary for contextual values
@return: Dictionary of values
"""
"""
result = {}
for bom in self.browse(cr, uid, ids, context=context):
result[bom.id] = map(lambda x: x.id, bom.bom_lines)
@ -220,7 +220,6 @@ class mrp_bom(osv.osv):
'property_ids': fields.many2many('mrp.property', 'mrp_bom_property_rel', 'bom_id','property_id', 'Properties'),
'revision_ids': fields.one2many('mrp.bom.revision', 'bom_id', 'BoM Revisions'),
'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'Index type'),
'child_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
'company_id': fields.many2one('res.company','Company',required=True),
'multi_level_bom': fields.boolean('Multi-level BoM'),

View File

@ -242,21 +242,21 @@
<field name="arch" type="xml">
<form string="Bill of Material">
<group colspan="4" col="6">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<newline/>
<field name="product_uom"/>
<field name="product_qty"/>
<field name="routing_id" select="2" groups="base.group_extended"/>
<newline/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<newline/>
<field name="multi_level_bom" invisible="1"/>
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<newline/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="routing_id" select="2" groups="base.group_extended"/>
<field name="type" groups="base.group_extended"/>
<group colspan="4" col="6">
<field name="product_uom"/>
<field name="product_qty"/>
<field name="multi_level_bom"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list"/>
@ -276,9 +276,6 @@
<field name="product_efficiency"/>
<field colspan="4" name="property_ids" nolabel="2" groups="base.group_extended"/>
</page>
<page string="Multi-Level BoM" attrs="{'invisible':[('multi_level_bom','=',False)]}">
<field colspan="4" name="child_ids" nolabel="1" string="BoM Hierarchy"/>
</page>
</notebook>
</form>
</field>
@ -291,7 +288,7 @@
<field name="field_parent">child_complete_ids</field>
<field name="arch" type="xml">
<tree string="BoM Structure" colors="blue:method">
<field name="sequence" invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="name"/>
<field name="code"/>
<field name="product_id"/>
@ -461,8 +458,8 @@
<group colspan="2" col="3">
<field name="product_uom"/>
<button type="action"
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
</group>
<label string="" colspan="2"/>
<field name="product_uos_qty" groups="product.group_uos"/>
@ -484,45 +481,45 @@
mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
<tree string="Products to Consume">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
</field>
<field colspan="2" name="move_lines2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
widget="one2many_list" mode="tree,form" height="275">
<tree string="Consumed Products" editable="bottom" colors="red:scraped==True">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
widget="one2many_list" mode="tree,form" height="275">
<tree string="Consumed Products" editable="bottom" colors="red:scraped==True">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="prodlot_id" />
<field name="prodlot_id" />
<field name="state" invisible="1"/>
<field name="scraped" invisible="1"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="gtk-justify-fill"
states="done,cancel" />
<button
name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert"
states="done,cancel" />
</tree>
</field>
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="gtk-justify-fill"
states="done,cancel" />
<button
name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert"
states="done,cancel" />
</tree>
</field>
<group col="9" colspan="4">
<field name="state" select="2"/>
@ -540,38 +537,38 @@
mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
<tree string="Products to Finish">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
</field>
<field colspan="2" name="move_created_ids2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
widget="one2many_list" mode="tree,form" height="275">
<tree string="Finished Products" editable="bottom" colors="red:scraped==True">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
widget="one2many_list" mode="tree,form" height="275">
<tree string="Finished Products" editable="bottom" colors="red:scraped==True">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="prodlot_id" />
<field name="prodlot_id" />
<field name="state" invisible="1"/>
<field name="scraped" invisible="1"/>
<button name="%(stock.track_line)d"
<button name="%(stock.track_line)d"
string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action" icon="gtk-convert"
states="done,cancel" />
</tree>
</field>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action" icon="gtk-convert"
states="done,cancel" />
</tree>
</field>
</page>
<page string="Work Orders">
<field colspan="4" name="workcenter_lines" nolabel="1">
@ -1039,12 +1036,12 @@
res_model="mrp.bom"
src_model="product.product"/>
<!-- Menu for Resource for MRP-->
<menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing" sequence="3"/>
<!-- Menu for Resource for MRP-->
<menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing" sequence="3"/>
<menuitem id="menu_pm_resources_mrp" name="Resources" parent="base.menu_mrp_root" sequence="2"/>
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
</data>
</openerp>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Cancel Repair -->
<record id="view_cancel_repair" model="ir.ui.view">
<field name="name">Cancel Repair</field>
<field name="model">mrp.repair.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cancel Repair Order">
<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"
colspan="1" type="object" icon="gtk-ok" />
</group>
</form>
</field>
</record>
<record id="action_cancel_repair" model="ir.actions.act_window">
<field name="name">Cancel Repair Order</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.repair.cancel</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Make Invoice -->
<record id="view_make_invoice" model="ir.ui.view">
<field name="name">Make Invoice</field>
<field name="model">mrp.repair.make_invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create invoices">
<separator colspan="4" string="Do you really want to create the invoices ?" />
<field name="group"/>
<newline/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="make_invoices" string="Create Invoice"
colspan="1" type="object" icon="gtk-ok" />
</group>
</form>
</field>
</record>
<act_window name="Make Invoice"
res_model="mrp.repair.make_invoice"
src_model="mrp.repair"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_mrp_repair_invoice"/>
</data>
</openerp>

View File

@ -444,7 +444,7 @@ class product_product(osv.osv):
'virtual_available': fields.function(_product_virtual_available, method=True, type='float', string='Virtual Stock'),
'incoming_qty': fields.function(_product_incoming_qty, method=True, type='float', string='Incoming'),
'outgoing_qty': fields.function(_product_outgoing_qty, method=True, type='float', string='Outgoing'),
'price': fields.function(_product_price, method=True, type='float', string='Customer Price', digits_compute=dp.get_precision('Sale Price')),
'price': fields.function(_product_price, method=True, type='float', string='Pricelist', digits_compute=dp.get_precision('Sale Price')),
'lst_price' : fields.function(_product_lst_price, method=True, type='float', string='List Price', digits_compute=dp.get_precision('Sale Price')),
'code': fields.function(_product_code, method=True, type='char', string='Code'),
'partner_ref' : fields.function(_product_partner_ref, method=True, type='char', string='Customer ref'),

View File

@ -110,7 +110,7 @@
<field name="arch" type="xml">
<search string="Search Project">
<group col='15' colspan='4'>
<filter icon="terp-project" string="Open" domain="[('state', '=', 'open')]" help="Open Projects" default="1"/>
<filter icon="terp-project" string="Current" domain="[('state', 'in',('open','draft'))]" help="Open and Draft Projects" default="1"/>
<filter icon="terp-project" string="Pending" domain="[('state', '=', 'pending')]" help="Pending Projects"/>
<separator orientation="vertical"/>
<filter icon="terp-project" string="Manager" domain="[('user_id', '=', uid)]" help="Projects in which I am a manager."/>
@ -121,7 +121,6 @@
<field name="name" string="Project Name"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Partner"/>
<field name="state"/>
</group>
</search>
</field>

View File

@ -41,11 +41,11 @@ class report_project_task_user(osv.osv):
'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),
'state': fields.selection([('draft', 'Draft'),
('open', 'In Progress'),
('pending', 'Pending'),
('cancelled', 'Cancelled'),
('done', 'Done')],
'State', readonly=True),
('open', 'In Progress'),
('pending', 'Pending'),
('cancelled', 'Cancelled'),
('done', 'Done')],
'State', readonly=True),
}
_order = 'name desc, project_id'

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
<record id="view_task_project_user_tree" model="ir.ui.view">
<field name="name">report.project.task.user.tree</field>
@ -31,30 +31,29 @@
<field name="model">report.project.task.user</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Tasks">
<filter icon="terp-project" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Tasks performed in this year"/>
<filter icon="terp-project" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Tasks performed in this month"/>
<separator orientation="vertical"/>
<filter string="Start" icon="terp-project" domain="[('date_start','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="End" icon="terp-project" domain="[('date_end','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="Deadline" icon="terp-project" domain="[('date_deadline','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="Closed" icon="terp-project" domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="project_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-project" string="My Task" domain="[('user_id','=',uid)]" default="1"/>
</field>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="11">
<filter string="User" icon="terp-project" context="{'group_by':'user_id'}" />
<filter string="Project" icon="terp-project" context="{'group_by':'project_id'}" />
<separator orientation="vertical"/>
<filter string="State" icon="terp-project" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-project" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-project" context="{'group_by':'name'}"/>
</group>
</search>
<search string="Tasks">
<filter icon="terp-project" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Tasks performed in this year"/>
<filter icon="terp-project" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Tasks performed in this month"/>
<separator orientation="vertical"/>
<filter string="In Progress" icon="terp-project" domain="[('state','=','open')]"/>
<filter string="Pending" icon="terp-project" domain="[('state','=','pending')]"/>
<filter string="Closed" icon="terp-project" domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="project_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-project" string="My Task" domain="[('user_id','=',uid)]" default="1"/>
</field>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="11">
<filter string="User" icon="terp-project" context="{'group_by':'user_id'}" />
<filter string="Project" icon="terp-project" context="{'group_by':'project_id'}" />
<separator orientation="vertical"/>
<filter string="State" icon="terp-project" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-project" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-project" context="{'group_by':'name'}"/>
</group>
</search>
</field>
</record>

View File

@ -3,36 +3,5 @@
<data noupdate="1">
######################## Feature Request (menu) ###########################
<record model="ir.actions.act_window" id="action_project_feature">
<field name="name">Feature Requests</field>
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="project_feature_tree_view"/>
<field name="domain" eval="[('categ_id','=',ref('feature_request_categ'))]"/>
<field name="search_view_id" ref="view_project_feature_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_project_feature_tree_view0">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="project_feature_tree_view"/>
<field name="act_window_id" ref="action_project_feature"/>
</record>
<record model="ir.actions.act_window.view" id="action_project_feature_calendar_view0">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="project_issue_calendar_view"/>
<field name="act_window_id" ref="action_project_feature"/>
</record>
<record model="ir.actions.act_window.view" id="action_project_feature_form_view0">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="project_issue_form_view"/>
<field name="act_window_id" ref="action_project_feature"/>
</record>
<menuitem name="Feature Requests" id="menu_project_issue_feature_request" parent="project.menu_project_management" action="action_project_feature"/>
</data>
</openerp>

View File

@ -27,7 +27,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Issue Tracker Form">
<group colspan="4" col="8">
<group colspan="4" col="6">
<field name="name"/>
<field name="user_id"/>
<field name="assigned_to" />
@ -38,8 +38,6 @@
</group>
<field name="project_id" required="True"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
<field name="create_date"/>
<field name="write_date" />
</group>
<notebook colspan="4">
<page string="General">
@ -76,6 +74,8 @@
<page string="History" groups="base.group_extended">
<group col="2" colspan="2">
<separator colspan="2" string="Date"/>
<field name="create_date"/>
<field name="write_date" />
<field name="date_closed"/>
<field name="date_open"/>
</group>

View File

@ -66,9 +66,9 @@ class project_phase(osv.osv):
return True
def _check_dates(self, cr, uid, ids, context={}):
phase = self.read(cr, uid, ids[0], ['date_start', 'date_end'], context=context)
if phase['date_start'] and phase['date_end'] and phase['date_start'] > phase['date_end']:
return False
for phase in self.read(cr, uid, ids, ['date_start', 'date_end'], context=context):
if phase['date_start'] and phase['date_end'] and phase['date_start'] > phase['date_end']:
return False
return True
def _check_constraint_start(self, cr, uid, ids, context={}):
@ -104,16 +104,15 @@ class project_phase(osv.osv):
}
_defaults = {
'responsible_id': lambda obj,cr,uid,context: uid,
'date_start': lambda *a: time.strftime('%Y-%m-%d'),
'state': lambda *a: 'draft',
'sequence': lambda *a: 10,
}
_order = "name"
_constraints = [
(_check_recursion,'Error ! Loops In Phases Not Allowed',['next_phase_ids', 'previous_phase_ids']),
(_check_dates, 'Error! Phase start-date must be lower then Phase end-date.', ['date_start', 'date_end']),
(_check_constraint_start, 'Error! Phase must start-after Constraint Start Date.', ['date_start', 'constraint_date_start']),
(_check_constraint_end, 'Error! Phase must end-before Constraint End Date.', ['date_end', 'constraint_date_end']),
(_check_recursion,'Loops in phases not allowed',['next_phase_ids', 'previous_phase_ids']),
(_check_dates, 'Phase start-date must be lower than phase end-date.', ['date_start', 'date_end']),
#(_check_constraint_start, 'Phase must start-after constraint start Date.', ['date_start', 'constraint_date_start']),
#(_check_constraint_end, 'Phase must end-before constraint end Date.', ['date_end', 'constraint_date_end']),
]
def onchange_project(self, cr, uid, ids, project, context={}):
@ -369,4 +368,4 @@ class task(osv.osv):
return super(task, self).write(cr, uid, ids, vals, context=context)
task()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -32,7 +32,7 @@
</field>
</record>
# ------------------------------------------------------
# ------------------------------------------------------
# Project Phase
# ------------------------------------------------------
@ -46,38 +46,43 @@
<field name="name" select="1"/>
<field name="project_id" on_change="onchange_project(project_id)"/>
<field name="responsible_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="duration" widget="float_time"/>
<field name="product_uom"/>
</group>
<notebook colspan="4">
<page string="Resource Allocation Detail">
<separator colspan="4" string="Resource Allocation"/>
<page string="Resource Allocation Detail">
<group colspan="2" col="2">
<separator colspan="2" string="Duration"/>
<field name="duration" widget="float_time"/>
<field name="product_uom"/>
</group>
<group colspan="2" col="2">
<separator colspan="2" string="Dates"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<field colspan="4" name="resource_ids" nolabel="1">
<tree editable="bottom" string="Project Resource Allocation">
<tree editable="bottom" string="Project Resource Allocation">
<field name="resource_id" context="{'project_id':parent.project_id}"/>
<field name="useability"/>
<field name="useability"/>
</tree>
<form string="Project Resource Allocation">
<field name="resource_id" context="{'project_id':parent.project_id}"/>
<field name="useability"/>
<field name="useability"/>
</form>
</field>
<group col="12" colspan="4">
<field name="state" select="1"/>
<button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
<button string="Start Phase" name="set_open" states="pending,draft" icon="gtk-execute"/>
<field name="state" select="1"/>
<button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
<button string="Start Phase" name="set_open" states="pending,draft" icon="gtk-execute"/>
<button string="Done" name="set_done" states="draft,pending,open" icon="gtk-jump-to"/>
<button string="Pending" name="set_pending" states="open" icon="gtk-media-pause"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending" icon="gtk-cancel"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending" icon="gtk-cancel"/>
</group>
</page>
<page string="Other Info">
<group colspan="2" col="2">
<separator string="Constraints" colspan="2"/>
<field name="constraint_date_start"/>
<field name="constraint_date_end"/>
<field name="constraint_date_end"/>
</group>
<group colspan="2" col="2">
<separator string="Scheduling" colspan="2"/>
@ -91,46 +96,46 @@
<page string="Task Detail">
<separator colspan="4" string="Project's Tasks"/>
<field colspan="4" name="task_ids" context="{'default_project_id' :project_id}" nolabel="1">
<tree editable="bottom" string="Project's Tasks">
<tree editable="bottom" string="Project's Tasks">
<field name="name"/>
<field name="project_id"/>
<field name="user_id"/>
<field name="date_start"/>
<field name="date_deadline"/>
<field name="planned_hours" widget="float_time" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours)"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
<field name="effective_hours" invisible="1"/>
<field name="state"/>
<field name="occupation_rate"/>
<field name="date_start"/>
<field name="date_deadline"/>
<field name="planned_hours" widget="float_time" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours)"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
<field name="effective_hours" invisible="1"/>
<field name="state"/>
<field name="occupation_rate"/>
</tree>
<form string="Project's Tasks">
<notebook colspan="4">
<page string="Task Detail">
<group colspan="4" col="4">
<field name="name"/>
<field name="project_id"/>
<field name="user_id"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2"/>
<field name="date_start"/>
<field name="date_deadline"/>
<field name="occupation_rate"/>
</group>
<group colspan="2" col="2">
<separator string="Planning" colspan="2"/>
<field name="planned_hours" widget="float_time" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours)"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
<field name="effective_hours" invisible="1"/>
</group>
<group colspan="6" col="4">
<field name="state"/>
</group>
</page>
</notebook>
<notebook colspan="4">
<page string="Task Detail">
<group colspan="4" col="4">
<field name="name"/>
<field name="project_id"/>
<field name="user_id"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2"/>
<field name="date_start"/>
<field name="date_deadline"/>
<field name="occupation_rate"/>
</group>
<group colspan="2" col="2">
<separator string="Planning" colspan="2"/>
<field name="planned_hours" widget="float_time" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours)"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
<field name="effective_hours" invisible="1"/>
</group>
<group colspan="6" col="4">
<field name="state"/>
</group>
</page>
</notebook>
</form>
</field>
<button name="%(wizard_schedule_task)d" string="Schedule Tasks" type="action" icon="gtk-jump-to"/>
<button name="%(wizard_schedule_task)d" string="Schedule Tasks" type="action" icon="gtk-jump-to"/>
</page>
</notebook>
<newline/>
@ -194,15 +199,15 @@
<filter string="Current" domain="[('state','in',('open','draft'))]" help="Draft, Open and Pending Phases" icon="terp-project" default="1"/>
<filter string="In Progress" domain="[('state','=','open')]" help="Open Phases" icon="terp-project"/>
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Phases" icon="terp-project"/>
<field name="name"/>
<field name="project_id" widget="selection">
<filter domain="[('project_id.user_id','=',uid)]" help="My Projects" icon="terp-project"/>
</field>
<field name="responsible_id" widget="selection">
<separator orientation="vertical"/>
<field name="name"/>
<field name="project_id" widget="selection">
<filter domain="[('project_id.user_id','=',uid)]" help="My Projects" icon="terp-project"/>
</field>
<field name="responsible_id" widget="selection">
<filter domain="[('responsible_id','=',uid)]" help="My Phase" icon="gtk-execute" default="1"/>
</field>
<field name="date_start"/>
<!--<field name="date_end"/>-->
<field name="date_start"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
@ -223,51 +228,51 @@
<field name="search_view_id" ref="view_project_phase_search"/>
</record>
# ------------------------------------------------------
# ------------------------------------------------------
# Project
# ------------------------------------------------------
<record id="view_phase_project_form1" model="ir.ui.view">
<field name="name">phase.project.form1</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<field name="priority" position="before">
<field name="resource_calendar_id"/>
</field>
<field name="name">phase.project.form1</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<field name="priority" position="before">
<field name="resource_calendar_id"/>
</field>
</field>
</record>
</field>
</record>
# ------------------------------------------------------
# ------------------------------------------------------
# Project Task
# ------------------------------------------------------
<record id="view_project_phase_task_form1" model="ir.ui.view">
<field name="name">project.phase.task.form1</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="planned_hours" position="replace">
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours, date_start, occupation_rate)"/>
</field>
<record id="view_project_phase_task_form1" model="ir.ui.view">
<field name="name">project.phase.task.form1</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="planned_hours" position="replace">
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_planned(project_id, user_id, planned_hours, effective_hours, date_start, occupation_rate)"/>
</field>
</field>
</record>
</field>
</record>
<record id="view_project_phase_task_form2" model="ir.ui.view">
<field name="name">project.phase.task.form2</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="date_end" position = "after">
<field name="occupation_rate"/>
</field>
</field>
</record>
<record id="view_project_phase_task_form2" model="ir.ui.view">
<field name="name">project.phase.task.form2</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="date_end" position = "after">
<field name="occupation_rate"/>
</field>
</field>
</record>
<act_window
id="project_phase_task_list"
@ -286,16 +291,16 @@
view_mode="tree,form"
view_type="form" />
# ------------------------------------------------------
# ------------------------------------------------------
# Menu Items
# ------------------------------------------------------
<menuitem action="act_project_phase" id="menu_project_phase" parent="project.menu_project_management" sequence="4"/>
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
<menuitem id="menu_pm_resources_project1" name="Resources" parent="base.menu_main_pm" sequence="2"/>
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource" parent="menu_pm_resources_project1" sequence="1"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar" parent="menu_pm_resources_project1" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves" parent="menu_pm_resources_project1" sequence="1"/>
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource" parent="menu_pm_resources_project1" sequence="1"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar" parent="menu_pm_resources_project1" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves" parent="menu_pm_resources_project1" sequence="1"/>
</data>
</openerp>

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-05 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_purchase

View File

@ -2,27 +2,26 @@
<openerp>
<data>
<!-- Search Views -->
<!-- Search Views -->
<record id="view_resource_resource_search" model="ir.ui.view">
<record id="view_resource_resource_search" model="ir.ui.view">
<field name="name">resource.resource.search</field>
<field name="model">resource.resource</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Resource">
<group col='15' colspan='4'>
<field name="name" string="Resource Name"/>
<field name="code" string="Code"/>
<field name="name"/>
<field name="user_id" string="User" widget="selection">
<filter domain="[('user_id','=',uid)]" help="My Resouces" icon="gtk-execute" default="1"/>
</field>
<field name="calendar_id" string="Working Calendar" widget="selection"/>
<field name="resource_type" string="Resource Type"/>
<field name="company_id" string="Company" widget="selection"/>
<filter domain="[('user_id','=',uid)]" help="My Resouces" icon="gtk-execute" default="1"/>
</field>
<field name="resource_type"/>
<field name="company_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
<filter string="Resouce Type" icon="terp-project" domain="[]" context="{'group_by':'resource_type'}"/>
<filter string="Type" icon="terp-project" domain="[]" context="{'group_by':'resource_type'}"/>
<filter string="Company" icon="terp-project" domain="[]" context="{'group_by':'company_id'}"/>
<filter string="User" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
</group>
</search>
@ -37,10 +36,9 @@
<field name="arch" type="xml">
<search string="Search Working Period">
<group col='15' colspan='4'>
<field name="name" string="Name"/>
<!-- <field name="name" string="Working Calendar"/> -->
<field name="manager" string="Workgroup Manager" widget="selection"/>
<field name="company_id" string="Company" widget="selection"/>
<field name="name" string="Name"/>
<field name="manager" widget="selection"/>
<field name="company_id" widget="selection"/>
</group>
</search>
</field>
@ -71,7 +69,7 @@
<field name="model">resource.calendar</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Working Period">
<form string="Working Period">
<field name="name" select="1"/>
<field name="manager" select="1"/>
<field name="company_id" select="1"/>
@ -86,7 +84,7 @@
<field name="model">resource.calendar</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Working Period">
<tree string="Working Period">
<field name="name"/>
<field name="manager" select="1"/>
<field name="company_id" select="1"/>
@ -131,7 +129,7 @@
</field>
</record>
<record id="view_resource_calendar" model="ir.ui.view">
<record id="view_resource_calendar" model="ir.ui.view">
<field name="name">resource.calendar.leaves.calendar</field>
<field name="model">resource.calendar.leaves</field>
<field name="type">calendar</field>
@ -143,20 +141,20 @@
</record>
<act_window
id="resource_calendar_closing_days"
name="Closing Days"
res_model="resource.calendar.leaves"
src_model="resource.calendar"
view_mode="calendar,tree,form"
domain="[('calendar_id','=',active_id), ('resource_id','=',False)]"/>
id="resource_calendar_closing_days"
name="Closing Days"
res_model="resource.calendar.leaves"
src_model="resource.calendar"
view_mode="calendar,tree,form"
domain="[('calendar_id','=',active_id), ('resource_id','=',False)]"/>
<act_window
id="resource_calendar_resources_leaves"
name="Resources Leaves"
res_model="resource.calendar.leaves"
src_model="resource.calendar"
view_mode="calendar,tree,form"
domain="[('calendar_id','=',active_id), ('resource_id','!=',False)]"/>
id="resource_calendar_resources_leaves"
name="Resources Leaves"
res_model="resource.calendar.leaves"
src_model="resource.calendar"
view_mode="calendar,tree,form"
domain="[('calendar_id','=',active_id), ('resource_id','!=',False)]"/>
<record id="resource_resource_form" model="ir.ui.view">
<field name="name">resource.resource.form</field>
@ -166,7 +164,7 @@
<form string="Resource">
<field name="name" />
<field name="active"/>
<field name="company_id" />
<field name="company_id" widget="selection"/>
<field name="calendar_id" />
<field name="resource_type" />
<field name="user_id" attrs="{'required':[('resource_type','=','user')]}"/>
@ -203,7 +201,7 @@
<field name="arch" type="xml">
<form string="Leave Detail">
<field name="name" />
<field name="company_id" />
<field name="company_id" widget="selection"/>
<field name="calendar_id" />
<field name="date_from" />
<field name="date_to" />

View File

@ -448,15 +448,15 @@
domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]" default="1"
separator="1" />
<separator orientation="vertical"/>
<field name="product_id" select="1"/>
<field name="order_id" select="1"/>
<field name="order_partner_id" select="1"/>
<field name="product_id" select="1"/>
<field name="state" select="1"/>
<newline />
<group expand="1" string="Group By..." colspan="9" col="8">
<filter string="Product" icon="terp-sale" domain="[]" context="{'group_by':'product_id'}"/>
<!-- <filter string="Customer" icon="terp-sale" domain="[]" context="{'group_by':'order_partner_id'}"/>-->
<filter string="Order" icon="terp-sale" domain="[]" context="{'group_by':'order_id'}"/>
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-05 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: scrum

View File

@ -61,8 +61,8 @@
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]" default="1"/>
<separator orientation="vertical"/>
<filter string="Current" icon="terp-hr" domain="[('state','in',('open','draft'))]"/>
<filter string="Order Date" icon="terp-stock" domain="[('order_date',=,time.strftime('%%m/%%d/%%Y'))]" />
<filter string="Expected Date" icon="terp-hr" domain="[('expected_date',=,time.strftime('%%m/%%d/%%Y'))]"/>
<filter string="Order Date" icon="terp-stock" domain="[('order_date',=,time.strftime('%%Y-%%m-%%d'))]" />
<filter string="Expected Date" icon="terp-hr" domain="[('expected_date',=,time.strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical"/>
<field name="reference" />
<field name="origin" />

View File

@ -29,79 +29,130 @@ class change_standard_price(osv.osv_memory):
'new_price': fields.float('Price', required=True),
'stock_account_input':fields.many2one('account.account', 'Stock Input Account'),
'stock_account_output':fields.many2one('account.account', 'Stock Output Account'),
'stock_journal':fields.many2one('account.journal', 'Stock journal', required=True),
'stock_journal':fields.many2one('account.journal', 'Stock journal', required=True),
'enable_stock_in_out_acc':fields.boolean('Enable Related Account',),
}
def default_get(self, cr, uid, fields, context):
"""
"""
To get default values for the object.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param fields: List of fields for which we want default values
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
@param fields: List of fields for which we want default values
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
product_pool = self.pool.get('product.product')
product_obj = product_pool.browse(cr, uid, context.get('active_id', False))
res = super(change_standard_price, self).default_get(cr, uid, fields, context=context)
res = super(change_standard_price, self).default_get(cr, uid, fields, context=context)
accounts = product_pool.get_product_accounts(cr, uid, context.get('active_id', False), context={})
price = product_obj.standard_price
if 'new_price' in fields:
res.update({'new_price': price})
if 'stock_account_input' in fields:
res.update({'stock_account_input': accounts['stock_account_input']})
res.update({'stock_account_input': accounts['stock_account_input']})
if 'stock_account_output' in fields:
res.update({'stock_account_output': accounts['stock_account_output']})
res.update({'stock_account_output': accounts['stock_account_output']})
if 'stock_journal' in fields:
res.update({'stock_journal': accounts['stock_journal']})
res.update({'stock_journal': accounts['stock_journal']})
if 'enable_stock_in_out_acc' in fields:
res.update({'enable_stock_in_out_acc': True})
res.update({'enable_stock_in_out_acc': True})
return res
def onchange_price(self, cr, uid, ids, new_price, context = {}):
product_obj = self.pool.get('product.product').browse(cr, uid, context.get('active_id', False))
price = product_obj.standard_price
diff = price - new_price
if diff > 0 :
if diff > 0 :
return {'value' : {'enable_stock_in_out_acc':True}}
else :
return {'value' : {'enable_stock_in_out_acc':False}}
def change_price(self, cr, uid, ids, context):
"""
Changes the Standard Price of Product.
"""
Changes the Standard Price of Product.
And creates an account move accordingly.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: List of IDs selected
@param context: A standard dictionary
@return:
@param ids: List of IDs selected
@param context: A standard dictionary
@return:
"""
rec_id = context and context.get('active_id', False)
assert rec_id, _('Active ID is not set in Context')
prod_obj = self.pool.get('product.product')
res = self.browse(cr, uid, ids)
datas = {
'new_price' : res[0].new_price,
'stock_output_account' : res[0].stock_account_output.id,
'stock_input_account' : res[0].stock_account_input.id,
'stock_journal' : res[0].stock_journal.id
}
prod_obj.do_change_standard_price(cr, uid, [rec_id], datas, context)
return {}
change_standard_price()
prod_obj = self.pool.get('product.template')
location_obj = self.pool.get('stock.location')
lot_obj = self.pool.get('stock.report.prodlots')
move_obj = self.pool.get('account.move')
move_line_obj = self.pool.get('account.move.line')
data_obj = self.pool.get('ir.model.data')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
res = self.read(cr, uid, ids[0], ['new_price'])
new_price = res.get('new_price',[])
data = prod_obj.browse(cr, uid, rec_id)
diff = data.standard_price - new_price
prod_obj.write(cr, uid, rec_id, {'standard_price': new_price})
loc_ids = location_obj.search(cr, uid, [('account_id','<>',False),('usage','=','internal')])
lot_ids = lot_obj.search(cr, uid, [('location_id', 'in', loc_ids),('product_id','=',rec_id)])
qty = 0
debit = 0.0
credit = 0.0
stock_input_acc = data.property_stock_account_input.id or data.categ_id.property_stock_account_input_categ.id
stock_output_acc = data.property_stock_account_output.id or data.categ_id.property_stock_account_output_categ.id
for lots in lot_obj.browse(cr, uid, lot_ids):
qty += lots.name
if stock_input_acc and stock_output_acc and lot_ids:
move_id = move_obj.create(cr, uid, {'journal_id': data.categ_id.property_stock_journal.id})
if diff > 0:
credit = qty * diff
move_line_obj.create(cr, uid, {
'name': data.name,
'account_id': stock_input_acc,
'credit': credit,
'move_id': move_id
})
for lots in lot_obj.browse(cr, uid, lot_ids):
credit = lots.name * diff
move_line_obj.create(cr, uid, {
'name': 'Expense',
'account_id': lots.location_id.account_id.id,
'debit': credit,
'move_id': move_id
})
elif diff < 0:
debit = qty * -diff
move_line_obj.create(cr, uid, {
'name': data.name,
'account_id': stock_output_acc,
'debit': debit,
'move_id': move_id
})
for lots in lot_obj.browse(cr, uid, lot_ids):
debit = lots.name * -diff
move_line_obj.create(cr, uid, {
'name': 'Income',
'account_id': lots.location_id.account_id.id,
'credit': debit,
'move_id': move_id
})
else:
raise osv.except_osv(_('Warning!'),_('No Change in Price.'))
else:
pass
return {}
change_standard_price()

View File

@ -97,7 +97,6 @@ class survey(osv.osv):
survey()
class survey_history(osv.osv):
_name = 'survey.history'
_description = 'Survey History'
@ -110,7 +109,6 @@ class survey_history(osv.osv):
_defaults = {
'date': lambda * a: datetime.datetime.now()
}
survey_history()
class survey_page(osv.osv):
@ -144,14 +142,14 @@ class survey_page(osv.osv):
surv_name_wiz = self.pool.get('survey.name.wiz')
surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'transfer':True, 'page_no' : context.get('page_number',0) })
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'survey.question.wiz',
'type': 'ir.actions.act_window',
'target': 'new',
'search_view_id': search_id[0],
'context': context
}
'view_type': 'form',
'view_mode': 'form',
'res_model': 'survey.question.wiz',
'type': 'ir.actions.act_window',
'target': 'new',
'search_view_id': search_id[0],
'context': context
}
def copy(self, cr, uid, id, default=None, context={}):
raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
@ -196,28 +194,28 @@ class survey_question(osv.osv):
'descriptive_text': fields.text('Descriptive Text', size=255),
'column_heading_ids': fields.one2many('survey.question.column.heading', 'question_id',' Column heading'),
'type': fields.selection([('multiple_choice_only_one_ans','Multiple Choice (Only One Answer)'),
('multiple_choice_multiple_ans','Multiple Choice (Multiple Answer)'),
('matrix_of_choices_only_one_ans','Matrix of Choices (Only One Answers Per Row)'),
('matrix_of_choices_only_multi_ans','Matrix of Choices (Multiple Answers Per Row)'),
('matrix_of_drop_down_menus','Matrix of Drop-down Menus'),
('rating_scale','Rating Scale'),('single_textbox','Single Textbox'),
('multiple_textboxes','Multiple Textboxes'),
('multiple_textboxes_diff_type','Multiple Textboxes With Different Type'),
('comment','Comment/Essay Box'),
('numerical_textboxes','Numerical Textboxes'),('date','Date'),
('date_and_time','Date and Time'),('descriptive_text','Descriptive Text'),
('table','Table'),
], 'Question Type', required=1,),
('multiple_choice_multiple_ans','Multiple Choice (Multiple Answer)'),
('matrix_of_choices_only_one_ans','Matrix of Choices (Only One Answers Per Row)'),
('matrix_of_choices_only_multi_ans','Matrix of Choices (Multiple Answers Per Row)'),
('matrix_of_drop_down_menus','Matrix of Drop-down Menus'),
('rating_scale','Rating Scale'),('single_textbox','Single Textbox'),
('multiple_textboxes','Multiple Textboxes'),
('multiple_textboxes_diff_type','Multiple Textboxes With Different Type'),
('comment','Comment/Essay Box'),
('numerical_textboxes','Numerical Textboxes'),('date','Date'),
('date_and_time','Date and Time'),('descriptive_text','Descriptive Text'),
('table','Table'),
], 'Question Type', required=1,),
'is_comment_require': fields.boolean('Add Comment Field (optional)'),
'comment_label': fields.char('Field Label', size = 255),
'comment_field_type': fields.selection([('char', 'Single Line Of Text'), ('text', 'Paragraph of Text')], 'Comment Field Type'),
'comment_valid_type': fields.selection([('do_not_validate', '''Don't Validate Comment Text.'''),
('must_be_specific_length', 'Must Be Specific Length'),
('must_be_whole_number', 'Must Be A Whole Number'),
('must_be_decimal_number', 'Must Be A Decimal Number'),
('must_be_date', 'Must Be A Date'),
('must_be_email_address', 'Must Be An Email Address'),
], 'Text Validation'),
('must_be_specific_length', 'Must Be Specific Length'),
('must_be_whole_number', 'Must Be A Whole Number'),
('must_be_decimal_number', 'Must Be A Decimal Number'),
('must_be_date', 'Must Be A Date'),
('must_be_email_address', 'Must Be An Email Address'),
], 'Text Validation'),
'comment_minimum_no': fields.integer('Minimum number'),
'comment_maximum_no': fields.integer('Maximum number'),
'comment_minimum_float': fields.float('Minimum decimal number'),
@ -229,12 +227,12 @@ class survey_question(osv.osv):
'make_comment_field_err_msg': fields.text('Error message'),
'is_validation_require': fields.boolean('Validate Text (optional)'),
'validation_type': fields.selection([('do_not_validate', '''Don't Validate Comment Text.'''),\
('must_be_specific_length', 'Must Be Specific Length'),\
('must_be_whole_number', 'Must Be A Whole Number'),\
('must_be_decimal_number', 'Must Be A Decimal Number'),\
('must_be_date', 'Must Be A Date'),\
('must_be_email_address', 'Must Be An Email Address')\
], 'Text Validation'),
('must_be_specific_length', 'Must Be Specific Length'),\
('must_be_whole_number', 'Must Be A Whole Number'),\
('must_be_decimal_number', 'Must Be A Decimal Number'),\
('must_be_date', 'Must Be A Date'),\
('must_be_email_address', 'Must Be An Email Address')\
], 'Text Validation'),
'validation_minimum_no': fields.integer('Minimum number'),
'validation_maximum_no': fields.integer('Maximum number'),
'validation_minimum_float': fields.float('Minimum decimal number'),
@ -437,14 +435,14 @@ class survey_question(osv.osv):
surv_name_wiz = self.pool.get('survey.name.wiz')
surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'transfer':True, 'page_no' : context.get('page_number',False) })
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'survey.question.wiz',
'type': 'ir.actions.act_window',
'target': 'new',
'search_view_id': search_id[0],
'context': context
}
'view_type': 'form',
'view_mode': 'form',
'res_model': 'survey.question.wiz',
'type': 'ir.actions.act_window',
'target': 'new',
'search_view_id': search_id[0],
'context': context
}
def default_get(self, cr, uid, fields, context={}):
data = super(survey_question, self).default_get(cr, uid, fields, context)
@ -453,7 +451,7 @@ class survey_question(osv.osv):
data['sequence'] = context['line_order'][-1][2]['sequence'] + 1
if context.has_key('page_id'):
data['page_id']= context.get('page_id',False)
data['page_id']= context.get('page_id', False)
return data
survey_question()
@ -465,11 +463,11 @@ class survey_question_column_heading(osv.osv):
_rec_name = 'title'
def _get_in_visible_rating_weight(self,cr, uid, context={}):
if context.get('in_visible_rating_weight',False):
if context.get('in_visible_rating_weight', False):
return context['in_visible_rating_weight']
return False
def _get_in_visible_menu_choice(self,cr, uid, context={}):
if context.get('in_visible_menu_choice',False):
if context.get('in_visible_menu_choice', False):
return context['in_visible_menu_choice']
return False
@ -485,7 +483,6 @@ class survey_question_column_heading(osv.osv):
'in_visible_rating_weight': _get_in_visible_rating_weight,
'in_visible_menu_choice': _get_in_visible_menu_choice,
}
survey_question_column_heading()
class survey_answer(osv.osv):
@ -496,7 +493,7 @@ class survey_answer(osv.osv):
def _calc_response_avg(self, cr, uid, ids, field_name, arg, context):
val = {}
for rec in self.browse(cr, uid, ids):
for rec in self.browse(cr, uid, ids, context):
cr.execute("select count(question_id) ,(select count(answer_id) \
from survey_response_answer sra, survey_response_line sa \
where sra.response_id = sa.id and sra.answer_id = %d \
@ -515,9 +512,7 @@ class survey_answer(osv.osv):
return val
def _get_in_visible_answer_type(self,cr, uid, context={}):
if context.get('in_visible_answer_type',False):
return context.get('in_visible_answer_type',False)
return False
return context.get('in_visible_answer_type', False)
_columns = {
'question_id': fields.many2one('survey.question', 'Question', ondelete='cascade'),
@ -526,8 +521,8 @@ class survey_answer(osv.osv):
'response': fields.function(_calc_response_avg, method=True, string="#Answer", multi='sums'),
'average': fields.function(_calc_response_avg, method=True, string="#Avg", multi='sums'),
'type': fields.selection([('char','Character'),('date','Date'),('datetime','Date & Time'),\
('integer','Integer'),('float','Float'),('selection','Selection'),\
('email','Email')], "Type of Answer",required=1),
('integer','Integer'),('float','Float'),('selection','Selection'),\
('email','Email')], "Type of Answer",required=1),
'menu_choice': fields.text('Menu Choices'),
'in_visible_answer_type': fields.boolean('Is Answer Type Invisible??')
}
@ -539,7 +534,7 @@ class survey_answer(osv.osv):
def default_get(self, cr, uid, fields, context={}):
data = super(survey_answer, self).default_get(cr, uid, fields, context)
if context.get('line_order',False):
if context.get('line_order', False):
if len(context['line_order'][-1]) > 2 and type(context['line_order'][-1][2]) == type({}) and context['line_order'][-1][2].has_key('sequence'):
data['sequence'] = context['line_order'][-1][2]['sequence'] + 1
return data

File diff suppressed because it is too large Load Diff