[Merge]: Merged with parent branch.\n[IMP]: Improved all views

bzr revid: uco@tinyerp.co.in-20091209133811-mg73ajmwhjxyzidl
This commit is contained in:
uco (OpenERP) 2009-12-09 19:08:11 +05:30
commit 446b593bc9
47 changed files with 742 additions and 371 deletions

View File

@ -349,7 +349,7 @@ class account_account(osv.osv):
_sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
]
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
if not context:
@ -479,7 +479,7 @@ class account_journal(osv.osv):
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'),
#'company_id': fields.related('default_credit_account_id','company_id',type='many2one', relation="res.company", string="Company"),
#'company_id': fields.related('default_credit_account_id','company_id',type='many2one', relation="res.company", string="Company",store=True),
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
help="The sequence used for invoice numbers in this journal."),
@ -503,7 +503,7 @@ class account_journal(osv.osv):
# })
return journal_id
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
@ -782,7 +782,7 @@ class account_move(osv.osv):
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
],'Type', readonly=True, select=True, states={'draft':[('readonly',False)]}),
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company'),
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
}
_defaults = {
'name': lambda *a: '/',

View File

@ -389,7 +389,7 @@ class account_move_line(osv.osv):
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account'),
#TODO: remove this
'amount_taxed':fields.float("Taxed Amount",digits=(16,int(tools.config['price_accuracy']))),
'company_id': fields.related('account_id','company_id',type='many2one',object='res.company',string='Company')
'company_id': fields.related('account_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}

View File

@ -878,7 +878,7 @@ class account_invoice(osv.osv):
}
return [(r['id'], types[r['type']]+(r['number'] or '')+' '+(r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if context is None:
@ -1086,7 +1086,7 @@ class account_invoice_line(osv.osv):
'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),
'note': fields.text('Notes'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company')
'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}
_defaults = {
'quantity': lambda *a: 1,
@ -1312,7 +1312,7 @@ class account_invoice_tax(osv.osv):
'base_amount': fields.float('Base Code Amount', digits=(16,int(config['price_accuracy']))),
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
'tax_amount': fields.float('Tax Code Amount', digits=(16,int(config['price_accuracy']))),
'company_id': fields.related('account_id','company_id',type='many2one',relation='res.company',string='Company'),
'company_id': fields.related('account_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
}
def base_change(self, cr, uid, ids, base,currency_id=False,company_id=False,date_invoice=False):

View File

@ -248,7 +248,7 @@ class account_analytic_account(osv.osv):
res['value']['partner_id'] = partner
return res
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:

View File

@ -17,6 +17,25 @@
</tree>
</field>
</record>
<record id="view_account_analytic_account_search" model="ir.ui.view">
<field name="name">account.analytic.account.search</field>
<field name="model">account.analytic.account</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Account">
<group col="8" colspan="4">
<filter icon="gtk-execute" string="My Accounts" domain="[('user_id','=',uid)]" help="My Analytic Accounts"/>
<filter icon="gtk-execute" string="Current" domain="[('user_id','=',uid),('state','=','open')]" help="My Current Accounts"/>
<filter icon="gtk-execute" string="Pending" domain="[('user_id','=',uid),('state','=','pending')]" help="My Pending Accounts"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="partner_id" select="1"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_account_tree" model="ir.ui.view">
<field name="name">account.analytic.account.tree</field>
@ -77,6 +96,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
</record>
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="account.menu_analytic_accounting"/>
@ -368,7 +388,6 @@
<act_window domain="[('account_id', '=', active_id)]" id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal" name="All Analytic Entries" res_model="account.analytic.line" src_model="account.analytic.account" view_mode="tree,form" view_type="form"/>
<act_window domain="[('account_id', '=', active_id)]" id="act_acc_analytic_acc_2_report_hr_timesheet_invoice_journal" name="Costs &amp; Revenues" res_model="report.hr.timesheet.invoice.journal" src_model="account.analytic.account" view_mode="graph,tree,form" view_type="form"/>
<record id="view_account_journal_1" model="ir.ui.view">

View File

@ -1,30 +1,28 @@
<openerp>
<data>
<menuitem id="next_id_71" name="Financial Project Management" parent="project.menu_main" groups="account.group_account_invoice" sequence="20"/>
<menuitem id="menu_account" name="Analytic Accounts" parent="next_id_71" sequence="10"/>
<menuitem id="menu_invoicing" name="Invoicing" parent="next_id_71" sequence="20"/>
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
<field name="name">All Uninvoiced Entries</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False)]</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
</record>
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="menu_invoicing"/>
<record id="action_account_analytic_all" model="ir.actions.act_window">
<field name="name">All Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
<field name="domain">[]</field>
</record>
<menuitem action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="account_analytic_analysis.menu_account"/>
<menuitem name="Analytic Accounts" action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="next_id_71"/>
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
<field name="name">Overpassed Accounts</field>
@ -32,32 +30,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('date','&lt;=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
</record>
<menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" sequence="50" parent="menu_invoicing"/>
<record id="action_account_analytic_all_open" model="ir.actions.act_window">
<field name="name">Current Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','open')]</field>
<field name="filter" eval="True"/>
</record>
<record id="action_account_analytic_all_pending" model="ir.actions.act_window">
<field name="name">Pending Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','pending')]</field>
<field name="filter" eval="True"/>
</record>
</data>
</openerp>

View File

@ -90,7 +90,6 @@
<field name="arch" type="xml">
<field name="date" position="before">
<field name="last_invoice_date"/>
<field name="ca_to_invoice"/>
</field>

View File

@ -122,7 +122,7 @@ class account_analytic_plan_instance(osv.osv):
res.append((inst.id, name))
return res
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
args= args or []
if name:
ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context or {})

View File

@ -192,7 +192,7 @@ class account_report(osv.osv):
'type': lambda *args: 'indicator',
}
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:

View File

@ -103,7 +103,7 @@ class account_report_bs(osv.osv):
'font_style': lambda *a :'',
}
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:

View File

@ -41,8 +41,8 @@
"update_xml" : [
"voucher_sequence.xml",
"account_report.xml",
"voucher_wizard.xml",
"voucher_view.xml",
"voucher_wizard.xml",
"account_view.xml",
],
'certificate': '0037580727101',

View File

@ -441,7 +441,7 @@ class account_voucher(osv.osv):
}
return [(r['id'], types[r['type']]+(r['number'] or '')+' '+(r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:

View File

@ -77,8 +77,8 @@
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
</record>
<menuitem name="Financial Management/Voucher Entries"
id="menu_action_voucher_list" action="action_voucher_list"/>
<menuitem action="action_voucher_list" id="menu_action_voucher_list"
name="Voucher Entries" parent="account.menu_finance"/>
<!-- Receipt Vouchers -->
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
@ -90,8 +90,8 @@
<field name="domain">[('type','like','rec_voucher')]</field>
<field name="context">{'type':'rec_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Receipt Vouchers"
id="menu_action_receipt_vou_voucher_list" action="action_receipt_vou_voucher_list"/>
<menuitem name="Receipt Vouchers" id="menu_action_receipt_vou_voucher_list"
action="action_receipt_vou_voucher_list" parent="menu_action_voucher_list"/>
<record model="ir.actions.act_window" id="action_receipt_cashreceipt_voucher_list">
<field name="name">Cash Receipt</field>
@ -102,8 +102,8 @@
<field name="domain">[('type','=','rec_voucher')]</field>
<field name="context">{'type':'rec_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Receipt Vouchers/Cash Receipts"
id="menu_action_receipt_cashreceipt_voucher_list" action="action_receipt_cashreceipt_voucher_list"/>
<menuitem name="Cash Receipts" id="menu_action_receipt_cashreceipt_voucher_list"
action="action_receipt_cashreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>
<record model="ir.actions.act_window" id="action_receipt_bakreceipt_voucher_list">
<field name="name">Bank Receipt</field>
@ -114,8 +114,8 @@
<field name="domain">[('type','=','bank_rec_voucher')]</field>
<field name="context">{'type':'bank_rec_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Receipt Vouchers/Bank Receipts"
id="menu_action_receipt_bakreceipt_voucher_list" action="action_receipt_bakreceipt_voucher_list"/>
<menuitem name="Bank Receipts" id="menu_action_receipt_bakreceipt_voucher_list"
action="action_receipt_bakreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>
<!-- End Receipt Vouchers -->
@ -130,8 +130,8 @@
<field name="domain">[('type','like','pay_voucher')]</field>
<field name="context">{'type':'pay_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Payment Vouchers"
id="menu_action_payments_voucher_list" action="action_payments_voucher_list"/>
<menuitem name="Payment Vouchers" id="menu_action_payments_voucher_list"
action="action_payments_voucher_list" parent="menu_action_voucher_list"/>
<record model="ir.actions.act_window" id="action_payments_cashpay_voucher_list">
<field name="name">Payment Vouchers</field>
@ -142,8 +142,8 @@
<field name="domain">[('type','=','pay_voucher')]</field>
<field name="context">{'type':'pay_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Payment Vouchers/Cash Payments"
id="menu_action_payments_cashpay_voucher_list" action="action_payments_cashpay_voucher_list"/>
<menuitem name="Cash Payments" id="menu_action_payments_cashpay_voucher_list"
action="action_payments_cashpay_voucher_list" parent="menu_action_payments_voucher_list"/>
<record model="ir.actions.act_window" id="action_payments_bankpay_voucher_list">
<field name="name">Payment Vouchers</field>
@ -154,8 +154,8 @@
<field name="domain">[('type','=','bank_pay_voucher')]</field>
<field name="context">{'type':'bank_pay_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Payment Vouchers/Bank Payments"
id="menu_action_payments_bankpay_voucher_list" action="action_payments_bankpay_voucher_list"/>
<menuitem name="Bank Payments" id="menu_action_payments_bankpay_voucher_list"
action="action_payments_bankpay_voucher_list" parent="menu_action_payments_voucher_list"/>
<!-- End Payment Vouchers -->
@ -167,53 +167,57 @@
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
</record>
<menuitem name="Financial Management/Voucher Entries/Other Vouchers"
id="menu_action_other_voucher_list" action="action_other_voucher_list"/>
<menuitem name="Other Vouchers" id="menu_action_other_voucher_list"
action="action_other_voucher_list" parent="menu_action_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_cont_voucher_form">
<field name="name">Contra Voucher</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" eval="view_voucher_form"/>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('type','=','cont_voucher')]</field>
<field name="context">{'type':'cont_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Other Vouchers/Contra Voucher" id="menu_action_view_cont_voucher_form" action="action_view_cont_voucher_form"/>
<menuitem name="Contra Voucher" id="menu_action_view_cont_voucher_form"
action="action_view_cont_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_jour_sale_voucher_form">
<field name="name">Journal Sale Voucher</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" eval="view_voucher_form"/>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('type','=','journal_sale_vou')]</field>
<field name="context">{'type':'journal_sale_vou'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Other Vouchers/Journal Sale Voucher" id="menu_action_view_jour_sale_voucher_form" action="action_view_jour_sale_voucher_form"/>
<menuitem name="Journal Sale Voucher" id="menu_action_view_jour_sale_voucher_form"
action="action_view_jour_sale_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">
<field name="name">Journal Purchase Voucher</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" eval="view_voucher_form"/>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('type','=','journal_pur_voucher')]</field>
<field name="context">{'type':'journal_pur_voucher'}</field>
</record>
<menuitem name="Financial Management/Voucher Entries/Other Vouchers/Journal Purchase Voucher" id="menu_action_view_jour_pur_voucher_form" action="action_view_jour_pur_voucher_form"/>
<menuitem name="Journal Purchase Voucher" id="menu_action_view_jour_pur_voucher_form"
action="action_view_jour_pur_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_jour_voucher_form">
<field name="name">Journal Voucher</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" eval="view_voucher_form"/>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('type','=','journal_voucher')]</field>
<field name="context">{'type':'journal_voucher'}</field>
</record>
<menuitem
name="Financial Management/Voucher Entries/Other Vouchers/Journal Voucher"
id="menu_action_view_jour_voucher_form"
action="action_view_jour_voucher_form"/>
name="Journal Voucher" id="menu_action_view_jour_voucher_form"
action="action_view_jour_voucher_form" parent="menu_action_other_voucher_list"/>
</data>
</openerp>

View File

@ -11,9 +11,10 @@
<menuitem
action="wizard_account_voucher_open"
id="menu_wizard_account_voucher_open"
name="Financial Management/Voucher Entries/Open Vouchers"
name="Open Vouchers"
sequence="0"
type="wizard"/>
type="wizard"
parent="menu_action_voucher_list"/>
</data>
</openerp>

View File

@ -15,12 +15,12 @@
<child1>
<action colspan="4" height="200" name="%(sale.action_order_tree5)d" string="All quotations" width="510"/>
<action colspan="4" name="%(report_sale.action_order_sale_list)d" string="Top ten sales of the month"/>
<action colspan="4" name="%(report_crm.action_report_crm_case_user_tree_month_my)d" string="Cases statistics"/>
<action colspan="4" name="%(report_crm.action_report_crm_case_user_tree)d" string="Cases statistics"/>
</child1>
<child2>
<action colspan="4" name="%(report_sale.action_order_category_tree_all)d" string="Average Sales by Category of Products(this month)" view_mode="graph,tree"/>
<action colspan="4" name="%(report_crm.action_report_crm_case_user_tree_month)d" string="Cases of the month" view_mode="graph,tree"/>
<action colspan="4" name="%(report_crm.action_report_crm_case_user_tree)d" string="Cases of the month" view_mode="graph,tree"/>
</child2>
</hpaned>
</form>

View File

@ -69,13 +69,12 @@ class CalDAV(object):
for child in parsedCal.getChildren():
for cal_data in child.getChildren():
if cal_data.name.lower() == 'attendee':
# This is possible only if Attendee does not inherit osv_memory
attendee = Attendee()
attendee = self.pool.get('caldav.attendee')
attendee.import_ical(cr, uid, cal_data)
if cal_data.name.lower() in self.__attribute__:
self.ical_set(cal_data.name.lower(), cal_data.value, 'value')
return True
class Calendar(CalDAV, osv.osv_memory):
_name = 'caldav.calendar'
__attribute__ = {
@ -209,11 +208,11 @@ class Event(CalDAV, osv.osv_memory):
startdate = todate(startdate)
rset1 = rrulestr(rrulestring, dtstart=startdate, forceset=True)
for date in exdate:
datetime_obj = datetime.strptime(date, "%Y-%m-%d %H:%M:%S", timezone=True)
datetime_obj = datetime.strptime(date, "%Y-%m-%d %H:%M:%S")
# datetime_obj_utc = datetime_obj.replace(tzinfo=timezone('UTC'))
rset1._exdate.append(datetime_obj)
re_dates = rset1._iter()
recurrent_dates = map(lambda x:x.strftime('%Y-%m-%d %H:%M:%S', timezone=True), re_dates)
recurrent_dates = map(lambda x:x.strftime('%Y-%m-%d %H:%M:%S'), re_dates)
return recurrent_dates
def search(self, cr, uid, args, offset=0, limit=None, order=None,
@ -294,8 +293,7 @@ class Alarm(CalDAV):
if self.__attribute__.has_key(val.name.lower()):
self.__attribute__[val.name] = val.value
class Attendee(CalDAV):
# Also inherit osv_memory
class Attendee(CalDAV, osv.osv_memory):
_name = 'caldav.attendee'
__attribute__ = {
'cutype' : None, # Use: 0-1 Specify the type of calendar user specified by the property like "INDIVIDUAL"/"GROUP"/"RESOURCE"/"ROOM"/"UNKNOWN".
@ -310,7 +308,7 @@ class Attendee(CalDAV):
'dir' : None, # Use: 0-1 Specify reference to a directory entry associated with the calendar user specified by the property.
'language' : None, # Use: 0-1 Specify the language for text values in a property or property parameter.
}
def import_ical(self, cr, uid, ical_data):
if ical_data.value:
self.__attribute__['sent-by'] = ical_data.value

View File

@ -288,9 +288,9 @@ class crm_case(osv.osv):
if val['type'] == "text":
vevent.add(key).value = str(crm[val['field']])
elif val['type'] == 'datetime' and crm[val['field']]:
vevent.add(key).value = datetime.strptime(crm[val['field']], "%Y-%m-%d %H:%M:%S")
vevent.add(key).value = datetime.datetime.strptime(crm[val['field']], "%Y-%m-%d %H:%M:%S")
if crm[self.__attribute__['rrule']['field']]:
startdate = datetime.strptime(crm['date'], "%Y-%m-%d %H:%M:%S")
startdate = datetime.datetime.strptime(crm['date'], "%Y-%m-%d %H:%M:%S")
if not startdate:
startdate = datetime.now()
rset1 = rrulestr(str(crm[self.__attribute__['rrule']['field']]), dtstart=startdate, forceset=True)

View File

@ -121,7 +121,7 @@ class crm_menu_config_wizard(osv.osv_memory):
_columns = {
'name': fields.char('Name', size=64),
'meeting': fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."),
'lead': fields.boolean('Prospect', help="Allows you to track and manage leads which are pre-sales requests or contacts, the very first contact with a customer request."),
'lead': fields.boolean('Leads', help="Allows you to track and manage leads which are pre-sales requests or contacts, the very first contact with a customer request."),
'opportunity': fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."),
'jobs': fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."),
'document_ics': fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."),

View File

@ -116,44 +116,6 @@
</record>
<menuitem parent="crm.menu_crm" name="Calendar" id="menu_crm_case_category_act_meetings"/>
<!--
MY MEETINGS
-->
<record model="ir.actions.act_window" id="crm_case_categ_meetmy">
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form,graph,gantt</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'section_id.calendar\',\'=\',1)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_my">
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet_my">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_meet_my">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_my">
<field name="sequence" eval="1"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<menuitem name="My Meetings" id="menu_crm_case_categ_meet_my" action="crm_case_categ_meetmy" parent="menu_crm_case_category_act_meetings"/>
<!--
ALL MEETINGS
-->

View File

@ -103,6 +103,7 @@
<group col="10" colspan="4">
<filter icon="terp-crm" string="Draft" domain="[('state','=','draft')]" />
<filter icon="terp-crm" string="Confirmed" domain="[('state','=','done')]" />
<filter icon="terp-crm" string="My Meetings" domain="[('user_id','=',uid)]" />
<separator orientation="vertical"/>
<field name="name" select="1" string="Subject"/>
<field name="partner_id" select="1"/>

View File

@ -6,9 +6,6 @@
#
<menuitem id="next_id_64" name="Reporting" parent="crm.menu_crm"
sequence="50"/>
<menuitem id="next_id_65" name="This Month" parent="next_id_64" />
<menuitem id="next_id_66" name="All Months"
parent="next_id_64"/>
<record model="ir.ui.view" id="view_crm_case_section_categ_tree">
<field name="name">CRM Report - Sections and Type(Tree)</field>
@ -17,6 +14,7 @@
<field name="arch" type="xml">
<tree string="Cases by Section and Type">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="category2_id"/>
@ -35,6 +33,7 @@
<field name="arch" type="xml">
<form string="Cases by Section and Category2">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="category2_id" select="1"/>
@ -59,20 +58,12 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree_month">
<field name="res_model">report.crm.case.section.categ2</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem parent="next_id_65" name="Cases by Section and Type" action="action_report_crm_case_section_categ_tree_month" id="menu_crm_case_section_categ_tree_month"/>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree">
<field name="res_model">report.crm.case.section.categ2</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
</record>
<menuitem parent="next_id_66" name="Cases by Section and Type" action="action_report_crm_case_section_categ_tree" id="menu_crm_case_section_categ_tree"/>
<menuitem parent="next_id_64" name="Cases by Section and Type" action="action_report_crm_case_section_categ_tree" id="menu_crm_case_section_categ_tree"/>
#
# Cases by section and stage
@ -85,6 +76,7 @@
<field name="arch" type="xml">
<tree string="Cases by Section and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="stage_id"/>
@ -102,6 +94,7 @@
<field name="arch" type="xml">
<form string="Cases by Section and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="stage_id"/>
@ -125,19 +118,12 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_stage_tree_month">
<field name="res_model">report.crm.case.section.stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem parent="next_id_65" name="Cases by Section and Stage" action="action_report_crm_case_section_stage_tree_month" id="menu_crm_case_section_stage_tree_month"/>
<record model="ir.actions.act_window" id="action_report_crm_case_section_stage_tree">
<field name="res_model">report.crm.case.section.stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
</record>
<menuitem parent="next_id_66" name="Cases by Section and Stage" action="action_report_crm_case_section_stage_tree" id="menu_crm_case_section_stage_tree"/>
<menuitem parent="next_id_64" name="Cases by Section and Stage" action="action_report_crm_case_section_stage_tree" id="menu_crm_case_section_stage_tree"/>
#
# Cases by section, category and stage
@ -150,7 +136,7 @@
<field name="arch" type="xml">
<tree string="Cases by Section, Category and Stage">
<field name="name"/>
<field name="year"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="categ_id"/>
@ -168,7 +154,7 @@
<field name="arch" type="xml">
<form string="Cases by Section, Category and Stage">
<field name="name"/>
<field name="year"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="categ_id"/>
@ -187,9 +173,9 @@
<field name="arch" type="xml">
<search string="Cases by Section, Category and Stage">
<group col='8' colspan='4'>
<filter string="Year" icon="terp-hr" domain="[('year','=',time.localtime()[0])]"/>
<filter string="Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-hr" domain="[('name','=',time.localtime()[1])]"/>
<filter string="Month" icon="terp-hr" domain="[('month','=',time.localtime()[1])]"/>
<separator orientation="vertical"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
@ -199,21 +185,25 @@
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree_month">
<field name="res_model">report.crm.case.section.categ.stage</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
<record model="ir.ui.view" id="view_crm_case_section_categ_stage_graph">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.case.section.categ.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases by Section, Category and Stage" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<menuitem parent="next_id_65" name="Cases by Section, Category and Stage" action="action_report_crm_case_section_categ_stage_tree_month" id="menu_crm_case_section_categ_stage_tree_month"/>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree">
<field name="res_model">report.crm.case.section.categ.stage</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_crm_case_section_categ_stage_filter"/>
</record>
<menuitem parent="next_id_66" name="Cases by Section, Category and Stage" action="action_report_crm_case_section_categ_stage_tree" id="menu_crm_case_section_categ_stage_tree"/>
<menuitem parent="next_id_64" name="Cases by Section, Category and Stage" action="action_report_crm_case_section_categ_stage_tree" id="menu_crm_case_section_categ_stage_tree"/>
#
# Cases by section, category and category2
@ -226,7 +216,7 @@
<field name="arch" type="xml">
<tree string="Cases by Section, Category and Type">
<field name="name"/>
<field name="year"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="categ_id"/>
@ -245,7 +235,7 @@
<field name="arch" type="xml">
<form string="Cases by Section, Category and Type">
<field name="name"/>
<field name="year"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="categ_id"/>
@ -265,9 +255,9 @@
<field name="arch" type="xml">
<search string="Search Cases by User">
<group col='12' colspan='4'>
<filter string="Year" icon="terp-hr" domain="[('year','=',time.localtime()[0])]"/>
<filter string="Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-hr" domain="[('name','=',time.localtime()[1])]"/>
<filter string="Month" icon="terp-hr" domain="[('month','=',time.localtime()[1])]"/>
<separator orientation="vertical"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
@ -275,20 +265,26 @@
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_categ2_tree_month">
<field name="res_model">report.crm.case.section.categ.categ2</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem parent="next_id_65" name="Cases by Section, Category and Type" action="action_report_crm_case_section_categ_categ2_tree_month" id="menu_crm_case_section_categ_categ2_tree_month"/>
<record model="ir.ui.view" id="view_crm_case_section_categ_categ2_graph">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.case.section.categ.categ2</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases by Section, Category and Type" type="bar" orientation="horizontal">
<field name="category2_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_categ2_tree">
<field name="res_model">report.crm.case.section.categ.categ2</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_crm_case_section_categ_categ2_filter"/>
</record>
<menuitem parent="next_id_66" name="Cases by Section, Category and Type" action="action_report_crm_case_section_categ_categ2_tree" id="menu_crm_case_section_categ_categ2_tree"/>
<menuitem parent="next_id_64" name="Cases by Section, Category and Type" action="action_report_crm_case_section_categ_categ2_tree" id="menu_crm_case_section_categ_categ2_tree"/>
</data>
</openerp>

View File

@ -467,7 +467,7 @@
</record>
<record id="crm_case_categ0-act" model="ir.actions.act_window">
<field name="name">All Cases</field>
<field name="name">Cases</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm_case_tree-view"/>

View File

@ -36,7 +36,9 @@ class report_crm_case_section_categ2(osv.osv):
_description = "Cases by section and category2"
_auto = False
_columns = {
'name': fields.date('Month', readonly=True),
'name': fields.char('Year',size=64,required=False, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'category2_id':fields.many2one('crm.case.category2', 'Type', readonly=True),
@ -54,7 +56,8 @@ class report_crm_case_section_categ2(osv.osv):
create view report_crm_case_section_categ2 as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY-MM')||'-01' as name,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.category2_id,
@ -66,7 +69,7 @@ class report_crm_case_section_categ2(osv.osv):
from
crm_case c
where c.category2_id is not null
group by to_char(c.create_date,'YYYY-MM'), c.user_id, c.state, c.stage_id, c.category2_id, c.section_id)""")
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.category2_id, c.section_id)""")
report_crm_case_section_categ2()
@ -75,7 +78,9 @@ class report_crm_case_section_stage(osv.osv):
_description = "Cases by section and stage"
_auto = False
_columns = {
'name': fields.date('Month', readonly=True),
'name': fields.char('Year',size=64,required=False, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
@ -93,7 +98,8 @@ class report_crm_case_section_stage(osv.osv):
create view report_crm_case_section_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY-MM')||'-01' as name,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.stage_id,
@ -104,7 +110,7 @@ class report_crm_case_section_stage(osv.osv):
from
crm_case c
where c.stage_id is not null
group by to_char(c.create_date,'YYYY-MM'), c.user_id, c.state, c.stage_id, c.section_id)""")
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.section_id)""")
report_crm_case_section_stage()
@ -113,8 +119,9 @@ class report_crm_case_section_categ_stage(osv.osv):
_description = "Cases by section, Category and stage"
_auto = False
_columns = {
'name': fields.date('Month', readonly=True),
'year': fields.char('Year',size=64,readonly=True),
'name': fields.char('Year',size=64,required=False, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
@ -131,8 +138,8 @@ class report_crm_case_section_categ_stage(osv.osv):
create view report_crm_case_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as year,
to_char(c.create_date,'YYYY-MM')||'-01' as name,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.state,
@ -143,7 +150,7 @@ class report_crm_case_section_categ_stage(osv.osv):
from
crm_case c
where c.categ_id is not null AND c.stage_id is not null
group by to_char(c.create_date,'YYYY'),to_char(c.create_date,'YYYY-MM'), c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
report_crm_case_section_categ_stage()
@ -152,8 +159,9 @@ class report_crm_case_section_categ_categ2(osv.osv):
_description = "Cases by section, Category and Category2"
_auto = False
_columns = {
'name': fields.date('Month', readonly=True),
'year': fields.char('Year',size=64,readonly=True),
'name': fields.char('Year',size=64,required=False, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
'category2_id':fields.many2one('crm.case.category2', 'Type', readonly=True),
@ -171,8 +179,8 @@ class report_crm_case_section_categ_categ2(osv.osv):
create view report_crm_case_section_categ_categ2 as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as year,
to_char(c.create_date, 'YYYY-MM')||'-01' as name,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.category2_id,
@ -184,7 +192,7 @@ class report_crm_case_section_categ_categ2(osv.osv):
from
crm_case c
where c.categ_id is not null AND c.category2_id is not null
group by to_char(c.create_date, 'YYYY'),to_char(c.create_date,'YYYY-MM'), c.user_id, c.categ_id, c.category2_id, c.state, c.stage_id, c.section_id)""")
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.category2_id, c.state, c.stage_id, c.section_id)""")
report_crm_case_section_categ_categ2()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -117,6 +117,25 @@
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_event_search">
<field name="name">Events</field>
<field name="model">event.event</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Events">
<group col="8" colspan="4">
<filter icon="terp-calendar" string="Draft" domain="[('state','=','draft')]" help="Draft Events"/>
<filter icon="terp-calendar" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed Events"/>
<separator orientation="vertical"/>
<field name="name" string="Event" select="1"/>
<field name="user_id" select="1"/>
<field name="date_begin" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<!-- Events Organisation/CONFIGURATION/EVENTS -->
<record model="ir.actions.act_window" id="action_event_view">
@ -125,6 +144,7 @@
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_event_search"/>
</record>
<menuitem name="All Events" id="menu_event_event" action="action_event_view" parent="menu_event_main" />
@ -243,12 +263,33 @@
</field>
</record>
<record model="ir.ui.view" id="view_registration_search">
<field name="name">Registrations</field>
<field name="model">event.registration</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Event Registration">
<group col="10" colspan="4">
<filter icon="terp-calendar" string="Draft" domain="[('state','=','draft')]" help="Draft Registrations"/>
<filter icon="terp-calendar" string="Confirmed" domain="[('state','in',('open','done'))]" help="Confirmed Registrations"/>
<separator orientation="vertical"/>
<field name="event_id" select="1"/>
<field name="user_id" select="1"/>
<field name="partner_id" select="1"/>
<field name="state" select="1"/>
<field name="invoice_label" select="1"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_registration">
<field name="name">Registrations</field>
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="domain"></field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_registration_search"/>
</record>
<menuitem
name="All Registrations"

View File

@ -164,6 +164,26 @@
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_idea_idea_search">
<field name="name">idea.idea.search</field>
<field name="model">idea.idea</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Ideas">
<group col="10" colspan="4">
<filter icon="gtk-execute" string="My" domain="[('user_id','=',uid)]" help="My Ideas"/>
<separator orientation="vertical"/>
<filter icon="gtk-execute" string="Draft" domain="[('state','=','draft')]" help="Draft Ideas"/>
<filter icon="gtk-execute" string="Open" domain="[('state','=','open')]" help="Open Ideas"/>
<separator orientation="vertical"/>
<field name="title" select="1"/>
<field name="category_id" select="1"/>
<field name="user_id" select="1"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_idea_comment_tree">
<field name="name">idea.comment.tree</field>
@ -182,6 +202,7 @@
<field name="res_model">idea.idea</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_idea_idea_search"/>
</record>
<menuitem name="All Ideas" parent="menu_ideas1" id="menu_idea_idea" action="action_idea_idea"/>

View File

@ -19,9 +19,5 @@
#
##############################################################################
import multi_company
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -24,13 +24,23 @@
'name': 'Multi Company',
'version': '1.0',
'category': 'Custom',
'description': " ",
'author': 'Tiny',
'depends': ['base','sale','project'],
'update_xml': [
'multi_company_view.xml',
'description': """This module add the possibility to easily manage
the default value for each object
""",
'author': 'Tiny,SYLEAM',
'website': 'http://www.openerp.com/',
'depends': [
'base',
'sale',
'project'
],
'init_xml': [],
'update_xml': [
#'security/ir.model.access.csv',
],
'demo_xml': [
'multi_company_demo.xml'
],
'demo_xml': ['multi_company_demo.xml'],
'installable': True,
'active': False,
}

View File

@ -0,0 +1,188 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * multi_company
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-08 11:46:41+0000\n"
"PO-Revision-Date: 2009-12-08 12:48+0100\n"
"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.3.0\n"
#. module: multi_company
#: help:multi_company.default,object_id:0
msgid "Object affect by this rules"
msgstr "Objet en relation avec cette règle"
#. module: multi_company
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: multi_company
#: constraint:product.template:0
msgid "Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
#. module: multi_company
#: constraint:res.partner:0
msgid "The VAT doesn't seem to be correct."
msgstr ""
#. module: multi_company
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: multi_company
#: model:res.company,overdue_msg:multi_company.res_company_odoo
#: model:res.company,overdue_msg:multi_company.res_company_oerp_be
#: model:res.company,overdue_msg:multi_company.res_company_oerp_editor
#: model:res.company,overdue_msg:multi_company.res_company_oerp_in
#: model:res.company,overdue_msg:multi_company.res_company_oerp_us
msgid "Would your payment have been carried out after this mail was sent, please consider the present one as void. Do not hesitate to contact our accounting department"
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_dest_id:0
msgid "Default Company"
msgstr "Société par défaut"
#. module: multi_company
#: field:multi_company.default,object_id:0
msgid "Object"
msgstr "Objet"
#. module: multi_company
#: model:ir.module.module,shortdesc:multi_company.module_meta_information
#: view:multi_company.default:0
msgid "Multi Company"
msgstr "Multi société"
#. module: multi_company
#: model:ir.module.module,description:multi_company.module_meta_information
msgid ""
"This module add the possibility to easily manage \n"
" the default value for each object\n"
" "
msgstr ""
"Ce module ajoute la possibilité de gérer facilement \n"
" les valeurs par défaut de chaques objets\n"
" "
#. module: multi_company
#: field:multi_company.default,company_id:0
msgid "Main Company"
msgstr "Société principale"
#. module: multi_company
#: view:multi_company.default:0
msgid "Condition"
msgstr "Condition"
#. module: multi_company
#: help:multi_company.default,company_dest_id:0
msgid "Company to store the current record"
msgstr "Société dans lequel l'enregistrement courant sera stocké"
#. module: multi_company
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalide pour cette vue!"
#. module: multi_company
#: field:multi_company.default,name:0
msgid "Name"
msgstr "Nom"
#. module: multi_company
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
#. module: multi_company
#: model:product.category,name:multi_company.Odoo1
msgid "Odoo Offers"
msgstr "Offres Odoo"
#. module: multi_company
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr "Erreur! Vous ne pouvez pas créer de sociétés récursives."
#. module: multi_company
#: help:multi_company.default,name:0
msgid "Name it to easily find a record"
msgstr "La nommer facilement de façon a trouver l'enregistrement"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
msgid "Multi company"
msgstr "Multi société"
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
msgstr "multi_company.default"
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
msgstr "Société dans laquelle l'utilisateur est connectée"
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
msgstr "Société par défaut par objet"
#. module: multi_company
#: field:multi_company.default,expression:0
msgid "Expression"
msgstr "Expression"
#. module: multi_company
#: model:product.template,name:multi_company.product_product_odoo1_product_template
msgid "Odoo Offer"
msgstr "Offre Odoo"
#. module: multi_company
#: field:multi_company.default,sequence:0
msgid "Sequence"
msgstr "Séquence"
#. module: multi_company
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr ""
#. module: multi_company
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr "Erreur: code EAN invalide"
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
msgstr "L'expression doit être à True pour correspondre"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
msgstr "Société par défaut par objet"
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
#, python-format
msgid " (copy)"
msgstr " (copie)"
#. module: multi_company
#: view:multi_company.default:0
msgid "Matching"
msgstr "Critère de correspondance"

View File

@ -0,0 +1,185 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * multi_company
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-08 11:46:41+0000\n"
"PO-Revision-Date: 2009-12-08 11:46:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: multi_company
#: help:multi_company.default,object_id:0
msgid "Object affect by this rules"
msgstr ""
#. module: multi_company
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: multi_company
#: constraint:product.template:0
msgid "Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
#. module: multi_company
#: constraint:res.partner:0
msgid "The VAT doesn't seem to be correct."
msgstr ""
#. module: multi_company
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: multi_company
#: model:res.company,overdue_msg:multi_company.res_company_odoo
#: model:res.company,overdue_msg:multi_company.res_company_oerp_be
#: model:res.company,overdue_msg:multi_company.res_company_oerp_editor
#: model:res.company,overdue_msg:multi_company.res_company_oerp_in
#: model:res.company,overdue_msg:multi_company.res_company_oerp_us
msgid "Would your payment have been carried out after this mail was sent, please consider the present one as void. Do not hesitate to contact our accounting department"
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_dest_id:0
msgid "Default Company"
msgstr ""
#. module: multi_company
#: field:multi_company.default,object_id:0
msgid "Object"
msgstr ""
#. module: multi_company
#: model:ir.module.module,shortdesc:multi_company.module_meta_information
#: view:multi_company.default:0
msgid "Multi Company"
msgstr ""
#. module: multi_company
#: model:ir.module.module,description:multi_company.module_meta_information
msgid "This module add the possibility to easily manage \n"
" the default value for each object\n"
" "
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_id:0
msgid "Main Company"
msgstr ""
#. module: multi_company
#: view:multi_company.default:0
msgid "Condition"
msgstr ""
#. module: multi_company
#: help:multi_company.default,company_dest_id:0
msgid "Company to store the current record"
msgstr ""
#. module: multi_company
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: multi_company
#: field:multi_company.default,name:0
msgid "Name"
msgstr ""
#. module: multi_company
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
#. module: multi_company
#: model:product.category,name:multi_company.Odoo1
msgid "Odoo Offers"
msgstr ""
#. module: multi_company
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr ""
#. module: multi_company
#: help:multi_company.default,name:0
msgid "Name it to easily find a record"
msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
msgid "Multi company"
msgstr ""
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
msgstr ""
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
msgstr ""
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
msgstr ""
#. module: multi_company
#: field:multi_company.default,expression:0
msgid "Expression"
msgstr ""
#. module: multi_company
#: model:product.template,name:multi_company.product_product_odoo1_product_template
msgid "Odoo Offer"
msgstr ""
#. module: multi_company
#: field:multi_company.default,sequence:0
msgid "Sequence"
msgstr ""
#. module: multi_company
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr ""
#. module: multi_company
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr ""
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
msgstr ""
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
#, python-format
msgid " (copy)"
msgstr ""
#. module: multi_company
#: view:multi_company.default:0
msgid "Matching"
msgstr ""

View File

@ -1,60 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
import time
import netsvc
from osv import fields, osv
from tools import config
from tools.translate import _
import tools
class multi_company_default(osv.osv):
_name = 'multi_company.default'
_order = 'sequence,id'
_columns = {
'sequence': fields.integer('Sequence'),
'name': fields.char('Name', size=32, required=True),
'company_id': fields.many2one('res.company', 'Main Company', required=True),
'company_dest_id': fields.many2one('res.company', 'Default Company', required=True),
'object_id': fields.many2one('ir.model', 'Object', required=True),
'expression': fields.char('Expression', size=32, required=True),
}
_defaults = {
'expression': lambda *a: 'True',
'sequence': lambda *a: 1
}
multi_company_default()
class res_company(osv.osv):
_inherit = 'res.company'
def _company_default_get(self, cr, uid, object=False, context={}):
proxy = self.pool.get('multi_company.default')
ids = proxy.search(cr, uid, [('object_id.model', '=', object)])
for rule in proxy.browse(cr, uid, ids, context):
user = self.pool.get('res.users').browse(cr, uid, uid)
if eval(rule.expression, {'context': context, 'user': user}):
return rule.company_dest_id.id
return super(res_company, self)._company_default_get(cr, uid, object, context)
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_inventory_tree" model="ir.ui.view">
<field name="name">multi_company.default.tree</field>
<field name="model">multi_company.default</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Multi Company">
<field name="sequence"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_dest_id"/>
<field name="object_id"/>
<field name="expression" />
</tree>
</field>
</record>
<record id="view_inventory_form" model="ir.ui.view">
<field name="name">multi_company.default.form</field>
<field name="model">multi_company.default</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Multi Company">
<field name="sequence"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_dest_id"/>
<field name="object_id"/>
<field name="expression" />
</form>
</field>
</record>
<record id="action_inventory_form" model="ir.actions.act_window">
<field name="name">Multi Company</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">multi_company.default</field>
<field name="view_type">form</field>
</record>
<menuitem action="action_inventory_form" id="menu_action_inventory_form" parent="base.menu_action_res_company_tree"/>
</data>
</openerp>

View File

@ -0,0 +1 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink

View File

@ -271,7 +271,7 @@ class product_pricelist_version(osv.osv):
'price_version_id', 'Price List Items', required=True),
'date_start': fields.date('Start Date', help="Starting date for this pricelist version to be valid."),
'date_end': fields.date('End Date', help="Ending date for this pricelist version to be valid."),
'company_id': fields.related('pricelist_id','company_id',type='many2one',relation='res.company',string='Company')
'company_id': fields.related('pricelist_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}
_defaults = {
'active': lambda *a: 1,
@ -368,7 +368,7 @@ class product_pricelist_item(osv.osv):
digits=(16, int(config['price_accuracy']))),
'price_max_margin': fields.float('Max. Price Margin',
digits=(16, int(config['price_accuracy']))),
'company_id': fields.related('price_version_id','company_id',type='many2one',relation='res.company',string='Company')
'company_id': fields.related('price_version_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}
_constraints = [

View File

@ -500,7 +500,7 @@ class product_product(osv.osv):
result = map(_name_get, self.read(cr, user, ids, ['variants','name','default_code'], context))
return result
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:

View File

@ -9,12 +9,10 @@
<field name="name">Product / Manager</field>
</record>
</data>
<data noupdate="0">
<record model="ir.rule.group" id="product_comp_rule_group">
<field name="name" >Product multi-company</field>
<field name="model_id" ref="model_product_product"/>
<field name="model_id" ref="model_product_template"/>
<field name="global" eval="True"/>
</record>
<record id="product_comp_rule" model="ir.rule">

View File

@ -443,7 +443,7 @@ class project_work(osv.osv):
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True),
'hours': fields.float('Time Spent'),
'user_id': fields.many2one('res.users', 'Done by', required=True),
'company_id': fields.related('task_id','company_id',type='many2one',relation='res.company',string='Company')
'company_id': fields.related('task_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}
_defaults = {
'user_id': lambda obj,cr,uid,context: uid,

View File

@ -456,7 +456,7 @@ class purchase_order_line(osv.osv):
'notes': fields.text('Notes'),
'order_id': fields.many2one('purchase.order', 'Order Ref', select=True, required=True, ondelete='cascade'),
'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company')
'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}
_defaults = {
'product_qty': lambda *a: 1.0

View File

@ -154,6 +154,24 @@
</form>
</field>
</record>
<record id="account_analytic_planning_view_search" model="ir.ui.view">
<field name="name">report.account.analytic.planning.search</field>
<field name="model">report_account_analytic.planning</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Planning by Account">
<group col="8" colspan="4">
<filter icon="gtk-execute" string="My" domain="[('user_id','=',uid)]" help="My Plannings"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<!-- Planning Line -->
@ -196,6 +214,7 @@
<field name="res_model">report_account_analytic.planning</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="account_analytic_planning_view_search"/>
</record>
<menuitem id="planning_main" name="Long Term Planning"
@ -252,6 +271,23 @@
</field>
</record>
<record id="account_analytic_planning_stat_view_search" model="ir.ui.view">
<field name="name">report_account_analytic.planning.stat.search</field>
<field name="model">report_account_analytic.planning.stat</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Planning statistics">
<group col="10" colspan="4">
<filter icon="gtk-execute" string="My" domain="[('user_id','=',uid),('planning_id.state','&lt;&gt;','cancel')]" help="My Plannings Statistics"/>
<filter icon="gtk-execute" string="My Project" domain="[('manager_id','=',uid),('planning_id.state','&lt;&gt;','cancel')]" help="Planning Statistics of My Projects"/>
<separator orientation="vertical"/>
<field name="planning_id" select="1"/>
<field name="user_id" select="1"/>
<field name="account_id" select="1"/>
</group>
</search>
</field>
</record>
<record id="action_account_analytic_planning_stat_form" model="ir.actions.act_window">
@ -259,6 +295,7 @@
<field name="res_model">report_account_analytic.planning.stat</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="account_analytic_planning_stat_view_search"/>
</record>
<menuitem id="next_id_85" name="Planning"
parent="hr.menu_hr_reporting" />

View File

@ -77,47 +77,27 @@
</field>
</record>
<record id="action_report_crm_case_user_tree_month" model="ir.actions.act_window">
<field name="name">Cases by user and section (this month)</field>
<field name="res_model">report.crm.case.user</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem id="next_id_64" name="Reporting" parent="crm.menu_crm" sequence="50"/>
<menuitem id="crm.next_id_52" name="All Cases" parent="next_id_64" sequence="0"/>
<menuitem id="next_id_65" name="This Month" parent="next_id_64"/><menuitem action="action_report_crm_case_user_tree_month" id="menu_crm_case_user_tree_month" parent="next_id_65"/>
<record id="action_report_crm_case_user_tree" model="ir.actions.act_window">
<field name="name">Cases by User and Section</field>
<field name="res_model">report.crm.case.user</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_crm_case_user_filter"/>
</record>
<menuitem id="next_id_66" name="All Months" parent="report_crm.next_id_64"/><menuitem action="action_report_crm_case_user_tree" id="menu_crm_case_user_tree" parent="next_id_66"/>
<record id="action_report_crm_case_user_tree_month_my" model="ir.actions.act_window">
<field name="name">My cases by section (this month)</field>
<field name="res_model">report.crm.case.user</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain">[('user_id','=',uid),('name','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem action="action_report_crm_case_user_tree_month_my" id="menu_crm_case_user_tree_month_my" parent="report_crm.next_id_65"/>
<menuitem action="action_report_crm_case_user_tree" id="menu_crm_case_user_tree" parent="next_id_64"/>
<record id="action_report_crm_case_user_tree_my" model="ir.actions.act_window">
<field name="name">My cases by section</field>
<field name="res_model">report.crm.case.user</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="search_view_id" ref="view_crm_case_user_filter"/>
</record>
<menuitem action="action_report_crm_case_user_tree_my" id="menu_crm_case_user_tree_my" parent="report_crm.next_id_66"/>
<menuitem action="action_report_crm_case_user_tree_my" id="menu_crm_case_user_tree_my" parent="report_crm.next_id_64"/>
<!-- # Cases by section and categoryof case -->
@ -179,22 +159,14 @@
</field>
</record>
<record id="action_report_crm_case_categ_tree_month" model="ir.actions.act_window">
<field name="name">Cases by categories and section (this month)</field>
<field name="res_model">report.crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem action="action_report_crm_case_categ_tree_month" id="menu_crm_case_categ_tree_month" parent="report_crm.next_id_65"/>
<record id="action_report_crm_case_categ_tree" model="ir.actions.act_window">
<field name="name">Cases by Categories and Section</field>
<field name="res_model">report.crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_crm_case_categ_filter"/>
</record>
<menuitem action="action_report_crm_case_categ_tree" id="menu_crm_case_categ_tree" parent="report_crm.next_id_66"/>
<menuitem action="action_report_crm_case_categ_tree" id="menu_crm_case_categ_tree" parent="report_crm.next_id_64"/>
<act_window domain="[('user_id', '=', active_id)]" id="act_res_users_2_report_crm_case_user" name="Monthly cases" res_model="report.crm.case.user" src_model="res.users"/>
@ -322,4 +294,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -40,7 +40,9 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="All users files">
<group col="8" colspan="4">
<group col="10" colspan="4">
<filter icon="terp-stock" string="My" domain="[('user','=',uid)]" help="My Files"/>
<separator orientation="vertical"/>
<filter icon="terp-stock" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="All Months Files"/>
<filter icon="terp-stock" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="This Months Files"/>
<separator orientation="vertical"/>

View File

@ -41,7 +41,7 @@
</record>
<record id="process_node_quotation0" model="process.node">
<field name="menu_id" ref="sale.menu_action_order_tree_all"/>
<field name="menu_id" ref="sale.menu_sale_order"/>
<field name="model_id" ref="sale.model_sale_order"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Quotation&quot;&quot;&quot;" name="name"/>
@ -52,7 +52,7 @@
</record>
<record id="process_node_saleorder0" model="process.node">
<field name="menu_id" ref="sale.menu_action_order_tree_all"/>
<field name="menu_id" ref="sale.menu_sale_order"/>
<field name="model_id" ref="sale.model_sale_order"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Sale Order&quot;&quot;&quot;" name="name"/>

View File

@ -778,7 +778,7 @@ class sale_order_line(osv.osv):
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled'), ('exception', 'Exception')], 'State', required=True, readonly=True),
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
'salesman_id':fields.related('order_id','user_id',type='many2one',relation='res.users',string='Salesman'),
'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company'),
'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
}
_order = 'sequence, id'
_defaults = {

View File

@ -252,16 +252,6 @@
</record>
<menuitem action="action_order_form" id="menu_sale_order" parent="sale.menu_sale_root"/>
<record id="action_order_tree_all" model="ir.actions.act_window">
<field name="name">All Sales Order</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
</record>
<menuitem action="action_order_tree_all" id="menu_action_order_tree_all" parent="sale.menu_sale_order" groups="base.group_extended"/>
<record id="action_order_tree2" model="ir.actions.act_window">
<field name="name">Sales in Exception</field>
<field name="type">ir.actions.act_window</field>
@ -328,7 +318,6 @@
</field>
</record>
<record id="view_order_line_tree" model="ir.ui.view">
<field name="name">sale.order.line.tree</field>
<field name="model">sale.order.line</field>

View File

@ -119,7 +119,7 @@ class scrum_product_backlog(osv.osv):
_name = 'scrum.product.backlog'
_description = 'Product Backlog'
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:

View File

@ -111,10 +111,32 @@
</form>
</field>
</record>
<record model="ir.ui.view" id="view_scrum_product_backlog_search">
<field name="name">scrum.product.backlog.search</field>
<field name="model">scrum.product.backlog</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Product Backlogs">
<group col="10" colspan="4">
<filter icon="terp-project" string="Draft" domain="[('state','=','draft')]" help="Draft Backlogs"/>
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Backlogs"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="project_id" select="1"/>
<field name="sprint_id" select="1"/>
<field name="user_id" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<record id="action_product_backlog_form" model="ir.actions.act_window">
<field name="name">Backlogs</field>
<field name="res_model">scrum.product.backlog</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="view_scrum_product_backlog_search"/>
</record>
<menuitem action="action_product_backlog_form" id="menu_action_product_backlog_form" parent="scrum.next_id_67"/>
@ -174,12 +196,33 @@
</field>
</record>
<record model="ir.ui.view" id="view_scrum_sprint_search">
<field name="name">scrum.sprint.search</field>
<field name="model">scrum.sprint</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Sprints">
<group col="10" colspan="4">
<filter icon="gtk-execute" string="My" domain="[('scrum_master_id','=',uid)]" help="My Sprints"/>
<separator orientation="vertical"/>
<filter icon="terp-project" string="Draft" domain="[('state','=','draft')]" help="Draft Sprints"/>
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Sprints"/>
<filter icon="terp-project" string="Done" domain="[('state','=','done')]" help="Done Sprints"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="date_start" select="1"/>
</group>
</search>
</field>
</record>
<record id="action_sprint_all_tree" model="ir.actions.act_window">
<field name="name">Sprints</field>
<field name="res_model">scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_scrum_sprint_tree"/>
<field name="search_view_id" ref="view_scrum_sprint_search"/>
</record>
<menuitem action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="scrum.next_id_67"/>
@ -318,6 +361,18 @@
</field>
</field>
</record>
<record id="view_task_search_form" model="ir.ui.view">
<field name="name">scrum.task.search</field>
<field name="model">scrum.task</field>
<field name="type">search</field>
<field name="inherit_id" ref="project.view_task_search_form"/>
<field name="arch" type="xml">
<field name="project_id" position="after">
<field name="product_backlog_id" select="1"/>
</field>
</field>
</record>
<record id="action_view_task" model="ir.actions.act_window">
<field name="name">All Tasks</field>
@ -325,6 +380,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('scrum','=',1)]</field>
<field name="search_view_id" ref="view_task_search_form"/>
</record>
<record id="action_view_scrum_task_tree_view" model="ir.actions.act_window.view">

View File

@ -349,7 +349,7 @@ class stock_tracking(osv.osv):
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
if not context:
@ -912,7 +912,7 @@ class stock_production_lot_revision(osv.osv):
'indice': fields.char('Revision', size=16),
'author_id': fields.many2one('res.users', 'Author'),
'lot_id': fields.many2one('stock.production.lot', 'Production lot', select=True, ondelete='cascade'),
'company_id': fields.related('lot_id','company_id',type='many2one',relation='res.company',string='Company'),
'company_id': fields.related('lot_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
}
_defaults = {
@ -1457,7 +1457,7 @@ class stock_inventory_line(osv.osv):
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
'product_qty': fields.float('Quantity'),
'company_id': fields.related('inventory_id','company_id',type='many2one',object='res.company',string='Company')
'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
}
def on_change_product_id(self, cr, uid, ids, location_id, product, uom=False):

View File

@ -137,15 +137,34 @@
</field>
</record>
<record id="view_wiki_filter" model="ir.ui.view">
<field name="name">wiki.wiki.search</field>
<field name="model">wiki.wiki</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Wiki">
<group col='8' colspan='4'>
<filter icon="gtk-execute" string="My" domain="[('create_uid','=',uid)]" help="My Pages"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="group_id" select="1"/>
<field name="text_area" select="1"/>
<field name="review" select="1"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_wiki">
<field name="name">Search a Pages</field>
<field name="name">Search Pages</field>
<field name="res_model">wiki.wiki</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_wiki_tree"/>
<field name="context">{'section':'1'}</field>
<field name="search_view_id" ref="view_wiki_filter"/>
</record>
<menuitem parent="menu_document" id="menu_action_wiki_wiki" string="Search a Page" action="action_wiki"/>
<menuitem parent="menu_document" id="menu_action_wiki_wiki" string="Search Pages" action="action_wiki"/>
<!-- Pages Waiting Review -->
<record model="ir.actions.act_window" id="action_wiki_review">