[MERGE] from trunk

bzr revid: fva@openerp.com-20130911155650-uqrn4213urt98f43
This commit is contained in:
Frédéric van der Essen 2013-09-11 17:56:50 +02:00
commit 2f86c5ab5a
120 changed files with 471 additions and 486 deletions

View File

@ -137,16 +137,27 @@ class account_account_type(osv.osv):
_name = "account.account.type"
_description = "Account Type"
def _get_current_report_type(self, cr, uid, ids, name, arg, context=None):
def _get_financial_report_ref(self, cr, uid, context=None):
obj_data = self.pool.get('ir.model.data')
obj_financial_report = self.pool.get('account.financial.report')
financial_report_ref = {}
for key, financial_report in [
('asset','account_financial_report_assets0'),
('liability','account_financial_report_liability0'),
('income','account_financial_report_income0'),
('expense','account_financial_report_expense0'),
]:
try:
financial_report_ref[key] = obj_financial_report.browse(cr, uid,
obj_data.get_object_reference(cr, uid, 'account', financial_report)[1],
context=context)
except ValueError:
pass
return financial_report_ref
def _get_current_report_type(self, cr, uid, ids, name, arg, context=None):
res = {}
financial_report_ref = {
'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context),
'liability': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_liability0')[1], context=context),
'income': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_income0')[1], context=context),
'expense': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_expense0')[1], context=context),
}
financial_report_ref = self._get_financial_report_ref(cr, uid, context=context)
for record in self.browse(cr, uid, ids, context=context):
res[record.id] = 'none'
for key, financial_report in financial_report_ref.items():
@ -157,15 +168,9 @@ class account_account_type(osv.osv):
def _save_report_type(self, cr, uid, account_type_id, field_name, field_value, arg, context=None):
field_value = field_value or 'none'
obj_data = self.pool.get('ir.model.data')
obj_financial_report = self.pool.get('account.financial.report')
#unlink if it exists somewhere in the financial reports related to BS or PL
financial_report_ref = {
'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context),
'liability': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_liability0')[1], context=context),
'income': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_income0')[1], context=context),
'expense': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_expense0')[1], context=context),
}
financial_report_ref = self._get_financial_report_ref(cr, uid, context=context)
for key, financial_report in financial_report_ref.items():
list_ids = [x.id for x in financial_report.account_type_ids]
if account_type_id in list_ids:
@ -1258,6 +1263,10 @@ class account_move(osv.osv):
return [('id', 'in', tuple(ids))]
return [('id', '=', '0')]
def _get_move_from_lines(self, cr, uid, ids, context=None):
line_obj = self.pool.get('account.move.line')
return [line.move_id.id for line in line_obj.browse(cr, uid, ids, context=context)]
_columns = {
'name': fields.char('Number', size=64, required=True),
'ref': fields.char('Reference', size=64),
@ -1267,7 +1276,10 @@ class account_move(osv.osv):
help='All manually created new journal entries are usually in the status \'Unposted\', but you can set the option to skip that status on the related journal. In that case, they will behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' status.'),
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store={
_name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10),
'account.move.line': (_get_move_from_lines, ['partner_id'],10)
}),
'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
'narration':fields.text('Internal Note'),
@ -1633,9 +1645,11 @@ class account_move(osv.osv):
else:
# We can't validate it (it's unbalanced)
# Setting the lines as draft
obj_move_line.write(cr, uid, line_ids, {
'state': 'draft'
}, context, check=False)
not_draft_line_ids = list(set(line_ids) - set(line_draft_ids))
if not_draft_line_ids:
obj_move_line.write(cr, uid, not_draft_line_ids, {
'state': 'draft'
}, context, check=False)
# Create analytic lines for the valid moves
for record in valid_moves:
obj_move_line.create_analytic_lines(cr, uid, [line.id for line in record.line_id], context)

View File

@ -1431,6 +1431,7 @@ class account_invoice_line(osv.osv):
_name = "account.invoice.line"
_description = "Invoice Line"
_order = "invoice_id,sequence,id"
_columns = {
'name': fields.text('Description', required=True),
'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."),
@ -1467,6 +1468,7 @@ class account_invoice_line(osv.osv):
'discount': 0.0,
'price_unit': _price_unit_default,
'account_id': _default_account_id,
'sequence': 10,
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):

View File

@ -192,6 +192,7 @@
<page string="Invoice">
<field context="{'partner_id': partner_id, 'price_type': context.get('price_type') or False, 'type': type}" name="invoice_line">
<tree string="Invoice lines" editable="bottom">
<field name="sequence" widget="handle" />
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="name"/>
@ -250,7 +251,7 @@
<group>
<group>
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
<field name="name" invisible="1"/>
<field name="payment_term" widget="selection"/>
</group>
@ -392,7 +393,7 @@
<group col="4">
<group>
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id,context)" widget="selection" groups="base.group_multi_company"/>
<field name="user_id" groups="base.group_user"/>
<field name="user_id" groups="base.group_user" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
<field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
<field name="period_id" domain="[('state', '=', 'draft'), ('company_id', '=', company_id)]"
groups="account.group_account_manager"
@ -467,8 +468,8 @@
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Invoice Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_invoice'}"/>
<filter string="Due Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_due'}"/>
<filter string="Invoice Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_invoice'}"/>
<filter string="Due Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_due'}"/>
</group>
</search>
</field>

View File

@ -413,7 +413,7 @@
<page string="Advanced Settings">
<group>
<group>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_user']}"/>
<field name="sequence_id" required="0"/>
</group>
<group>
@ -1406,7 +1406,7 @@
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
<filter string="Entries Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Journal Entries by Month"/>
</group>
</search>
</field>

View File

@ -133,7 +133,7 @@
<field name="name"/>
<field name="account_id"/>
<field name="journal_id"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
</group>
<group>
<field name="date"/>
@ -206,7 +206,7 @@
<filter string="Product" context="{'group_by':'product_id'}"/>
<filter string="User" context="{'group_by':'user_id'}"/>
<separator/>
<filter string="Date" context="{'group_by':'date'}" name="group_date"/>
<filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
</group>
</search>

View File

@ -7,16 +7,16 @@
<field name="model">account.analytic.chart</field>
<field name="arch" type="xml">
<form string="Analytic Account Charts" version="7.0">
<header>
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<group string="Select the Period for Analysis" col="4">
<field name="from_date"/>
<field name="to_date"/>
<label string="(Keep empty to open the current situation)" colspan="4"/>
</group>
<footer>
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>

View File

@ -92,7 +92,7 @@
<filter string="Acc.Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}" name="usertype"/>
<filter string="Int.Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Date" icon="terp-go-today" context="{'group_by':'date'}"/>
<filter string="Entries Month" icon="terp-go-today" context="{'group_by':'date'}" help="Entries Date by Month"/>
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Year" icon="terp-go-year" context="{'group_by':'fiscalyear_id'}"/>
</group>

View File

@ -38,6 +38,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
'get_filter': self._get_filter,
'get_start_date':self._get_start_date,
'get_end_date':self._get_end_date,
'get_target_move': self._get_target_move,
})
self.context = context

View File

@ -166,11 +166,12 @@
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="163.0,163.0,163.0" style="Table2_header">
<blockTable colWidths="122.0,122.0,122.0,122.0" style="Table2_header">
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Accounts</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filters' and get_filter(data) ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Target Moves</para></td>
</tr>
<tr>
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
@ -197,6 +198,10 @@
</tr>
</blockTable>
</td>
<td>
<para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">

View File

@ -71,7 +71,7 @@
<filter string="Commercial Partner" name="commercial_partner_id" context="{'group_by':'commercial_partner_id','residual_visible':True}"/>
<filter string="Commercial Partner's Country" name="country_id" context="{'group_by':'country_id'}"/>
<filter string="Salesperson" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Due Date" icon="terp-go-today" context="{'group_by':'date_due'}"/>
<filter string="Due Month" icon="terp-go-today" context="{'group_by':'date_due'}"/>
<filter string="Period" icon="terp-go-month" context="{'group_by':'period_id'}" name="period"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True,'residual_invisible':True}"/>
<filter string="Category of Product" name="category_product" icon="terp-stock_symbol-selection" context="{'group_by':'categ_id','residual_invisible':True}"/>

View File

@ -54,7 +54,7 @@ class accounting_report(osv.osv_memory):
'target_move': 'posted',
'account_report_id': _get_account_report,
}
def _build_comparison_context(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
@ -62,6 +62,7 @@ class accounting_report(osv.osv_memory):
result['fiscalyear'] = 'fiscalyear_id_cmp' in data['form'] and data['form']['fiscalyear_id_cmp'] or False
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
if data['form']['filter_cmp'] == 'filter_date':
result['date_from'] = data['form']['date_from_cmp']
result['date_to'] = data['form']['date_to_cmp']
@ -86,7 +87,7 @@ class accounting_report(osv.osv_memory):
return res
def _print_report(self, cr, uid, ids, data, context=None):
data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter'], context=context)[0])
data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter','target_move'], context=context)[0])
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.financial.report',

View File

@ -157,8 +157,8 @@ class account_invoice_refund(osv.osv_memory):
for line in movelines:
if line.account_id.id == inv.account_id.id:
to_reconcile_ids[line.account_id.id] = [line.id]
if type(line.reconcile_id) != osv.orm.browse_null:
reconcile_obj.unlink(cr, uid, line.reconcile_id.id)
if line.reconcile_id:
line.reconcile_id.unlink()
inv_obj.signal_invoice_open(cr, uid, [refund.id])
refund = inv_obj.browse(cr, uid, refund_id[0], context=context)
for tmpline in refund.move_id.line_id:

View File

@ -154,6 +154,7 @@ class account_common_report(osv.osv_memory):
result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
if data['form']['filter'] == 'filter_date':
result['date_from'] = data['form']['date_from']
result['date_to'] = data['form']['date_to']

View File

@ -239,8 +239,8 @@
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Parent" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
<filter string="Start Date" domain="[]" context="{'group_by' : 'date_start'}" />
<filter string="End Date" domain="[]" context="{'group_by' : 'date'}" />
<filter string="Start Month" domain="[]" context="{'group_by' : 'date_start'}" />
<filter string="End Month" domain="[]" context="{'group_by' : 'date'}" />
<filter string="Pricelist" domain="[]" context="{'group_by' : 'pricelist_id'}" />
</group>
</search>

View File

@ -29,7 +29,7 @@
<separator string="Conditions" colspan="4"/>
<field name="product_id"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice', 'base.group_sale_salesman']}"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="date_start"/>
<field name="date_stop"/>

View File

@ -56,9 +56,9 @@
<filter string="Asset" name="asset" context="{'group_by':'asset_id'}"/>
<filter string="Asset Category" name="asset_category" icon="terp-stock_symbol-selection" context="{'group_by':'asset_category_id'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Purchase Date" icon="terp-go-month"
<filter string="Purchase Month" icon="terp-go-month"
domain="[]" context="{'group_by':'purchase_date'}" help="Date of asset purchase"/>
<filter string="Depreciation Date" icon="terp-go-today"
<filter string="Depreciation Month" icon="terp-go-today"
domain="[]" context="{'group_by':'depreciation_date'}" help="Date of depreciation"/>
</group>
</search>

View File

@ -111,7 +111,7 @@
</div>
<group>
<group>
<field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_user']}"/>
<field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
</group>
<group>

View File

@ -50,7 +50,7 @@
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
<filter string="Litigation" icon="terp-camera_test" context="{'group_by':'blocked'}" />
<filter string="Follow-up Level" icon="terp-stock_effects-object-colorize" name="followup_level" context="{'group_by':'followup_id'}" />
<filter string="Latest Follow-up Date" icon="terp-go-month" context="{'group_by':'date_followup'}" />
<filter string="Latest Follow-up Month" icon="terp-go-month" context="{'group_by':'date_followup'}" />
<filter string="Company" groups="base.group_multi_company" icon="terp-go-home" context="{'group_by':'company_id'}" />
</group>
</search>

View File

@ -79,7 +79,7 @@
</div>
<group>
<group>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
<field name="mode"/>
</group>
<group>

View File

@ -63,7 +63,7 @@
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<filter string="Due Date" icon="terp-go-today" context="{'group_by':'date_due'}"/>
<filter string="Due Month" icon="terp-go-today" context="{'group_by':'date_due'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by Invoice Date"/>
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}" help="Group by month of Invoice Date"/>

View File

@ -295,10 +295,6 @@ class account_analytic_account(osv.osv):
args=[]
if context is None:
context={}
if context.get('current_model') == 'project.project':
project_obj = self.pool.get("account.analytic.account")
project_ids = project_obj.search(cr, uid, args)
return self.name_get(cr, uid, project_ids, context=context)
if name:
account_ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
if not account_ids:

View File

@ -22,7 +22,7 @@
<group name="main">
<group>
<field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
<field name="manager_id"/>
<field name="manager_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_manager']}"/>
<field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>
</group>
<group>

View File

@ -8,7 +8,7 @@
<field name="model">analytic.user.funct.grid</field>
<field name="arch" type="xml">
<tree string="Invoicing Data" editable="bottom">
<field name="user_id" on_change="onchange_user_product_id(user_id, product_id)"/>
<field name="user_id" on_change="onchange_user_product_id(user_id, product_id)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman']}"/>
<field name="product_id" on_change="onchange_user_product_id(user_id, product_id)" domain="[('type','=','service')]"/>
<field name="price"/>
<field name="uom_id" groups="product.group_uom"/>
@ -22,7 +22,7 @@
<field name="arch" type="xml">
<form string="Invoicing Data">
<group>
<field name="user_id" on_change="onchange_user_product_id(user_id, product_id)"/>
<field name="user_id" on_change="onchange_user_product_id(user_id, product_id)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman']}"/>
<field name="product_id" domain="[('type','=','service')]" on_change="onchange_user_product_id(user_id, product_id)"/>
<field name="price"/>
<field name="uom_id" groups="product.group_uom"/>
@ -124,7 +124,7 @@
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='user_id']" position="replace">
<field name="user_id" required="1" on_change="on_change_user_id(user_id, account_id, unit_amount)"/>
<field name="user_id" required="1" on_change="on_change_user_id(user_id, account_id, unit_amount)" context="{'default_groups_ref': ['base.group_user']}"/>
</xpath>
</field>
</record>

View File

@ -166,7 +166,7 @@
<group expand="0" string="Group By...">
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Object" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'object_id'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'timestamp'}"/>
<filter string="Audit Month" icon="terp-go-month" domain="[]" context="{'group_by':'timestamp'}" help="Audit Date by Month"/>
</group>
</search>
</field>

View File

@ -578,8 +578,7 @@ property or property parameter."),
def do_accept(self, cr, uid, ids, context=None, *args):
"""
Update state of invitation as Accepted and if the invited user is other
then event user it will make a copy of this event for invited user.
Marks event invitation as Accepted.
@param cr: the current row, from the database cursor
@param uid: the current user's ID for security checks
@param ids: list of calendar attendee's IDs
@ -589,15 +588,7 @@ property or property parameter."),
if context is None:
context = {}
for vals in self.browse(cr, uid, ids, context=context):
if vals.ref and vals.ref.user_id:
mod_obj = self.pool[vals.ref._name]
res=mod_obj.read(cr,uid,[vals.ref.id],['duration','class'],context)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id,'duration':res[0]['duration'],'class':res[0]['class']}
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
return True
return self.write(cr, uid, ids, {'state': 'accepted'}, context)
def do_decline(self, cr, uid, ids, context=None, *args):
"""
@ -1126,12 +1117,14 @@ rule or repeating pattern of time to exclude from the recurring rule."),
for partner in event.partner_ids:
if partner.id in attendees:
continue
local_context = context.copy()
local_context.pop('default_state', None)
att_id = self.pool.get('calendar.attendee').create(cr, uid, {
'partner_id': partner.id,
'user_id': partner.user_ids and partner.user_ids[0].id or False,
'ref': self._name+','+str(event.id),
'email': partner.email
}, context=context)
}, context=local_context)
if partner.email:
mail_to = mail_to + " " + partner.email
self.write(cr, uid, [event.id], {

View File

@ -265,7 +265,7 @@
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'show_as'}"/>
<filter string="Privacy" icon="terp-locked" domain="[]" context="{'group_by':'class'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
<filter string="Event Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Start Date of Event by Month"/>
</group>
</search>
</field>

View File

@ -68,7 +68,7 @@
on_change="onchange_dates(date,False,date_deadline)"/>
</group>
<group>
<field name="user_id" groups="base.group_no_one"/>
<field name="user_id" groups="base.group_no_one" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="location"/>
<field name="organizer" groups="base.group_no_one"/>

View File

@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:03+0000\n"
"PO-Revision-Date: 2012-01-27 08:38+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2013-09-03 16:43+0000\n"
"Last-Translator: Niels L <junk@laentver.dk>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-03 05:44+0000\n"
"X-Launchpad-Export-Date: 2013-09-04 04:40+0000\n"
"X-Generator: Launchpad (build 16753)\n"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "Users"
msgstr ""
msgstr "Brugere"

View File

@ -36,13 +36,13 @@ This wizard will activate the CRON job and the Scheduler and will start the auto
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': ['gengo_sync_schedular_data.xml'],
'update_xml': [
'data': [
'gengo_sync_schedular_data.xml',
'ir_translation.xml',
'res_company_view.xml',
'wizard/base_gengo_translations_view.xml',
],
'demo_xml': [],
],
'demo': [],
'test': [],
'installable': True,
'auto_install': False,

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data noupdate="1">
<!--Scheduler sync Receive Request-->
<record id="gengo_sync_receive_request_scheduler" model="ir.cron">
<field name="name" >Gengo Sync Translation (Response)</field>

View File

@ -26,7 +26,7 @@ Re-implement openerp's file import system:
'author': 'OpenERP SA',
'depends': ['web'],
'installable': True,
'auto_install': False,
'auto_install': True,
'data': [
'security/ir.model.access.csv',
],

View File

@ -160,7 +160,7 @@ class crm_case_section(osv.osv):
'note': fields.text('Description'),
'working_hours': fields.float('Working Hours', digits=(16, 2)),
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="The email address associated with this team. New emails received will automatically "
"create new leads assigned to the team."),
'color': fields.integer('Color Index'),

View File

@ -174,7 +174,7 @@
</div>
<group>
<group>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="code"/>
<field name="parent_id"/>
<field name="change_responsible"/>

View File

@ -634,7 +634,7 @@ class crm_lead(format_address, osv.osv):
# Merge notifications about loss of information
opportunities = [highest]
opportunities.extend(opportunities_rest)
self._merge_notify(cr, uid, highest, opportunities, context=context)
self._merge_notify(cr, uid, highest.id, opportunities, context=context)
# Check if the stage is in the stages of the sales team. If not, assign the stage with the lowest sequence
if merged_data.get('section_id'):
section_stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('section_ids', 'in', merged_data['section_id']), ('type', '=', merged_data.get('type'))], order='sequence', context=context)

View File

@ -145,7 +145,7 @@
</group>
<group>
<field name="user_id" on_change="on_change_user(user_id, context)"
context="{'default_groups_ref': ['base.group_user', 'base.group_sale_salesman_all_leads'] }"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads'] }"/>
<label for="section_id" groups="base.group_multi_salesteams"/>
<div groups="base.group_multi_salesteams">
<field name="section_id"/>
@ -425,7 +425,7 @@
</group>
<group>
<field name="user_id" on_change="on_change_user(user_id, context)" context="{'default_groups_ref': ['base.group_user', 'base.group_sale_salesman_all_leads']}"/>
<field name="user_id" on_change="on_change_user(user_id, context)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<label for="section_id" groups="base.group_multi_salesteams"/>
<div groups="base.group_multi_salesteams">
<field name="section_id" widget="selection"/>

View File

@ -87,7 +87,7 @@
<group col="4">
<field name="date"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<label for="duration"/>
<div>
<field name="duration" widget="float_time" class="oe_inline" style="vertical-align:baseline"/> <b> min(s)</b>
@ -123,7 +123,7 @@
on_change="onchange_partner_id(partner_id)"/>
<field name="partner_phone"
invisible="1"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="categ_id" widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"
invisible="1"/>
@ -182,7 +182,7 @@
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Creation" icon="terp-go-month" help="Creation Date" domain="[]" context="{'group_by':'create_date'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Date of Call"/>
<filter string="Calls Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Calls Date by Month"/>
</group>
</search>
</field>

View File

@ -41,7 +41,7 @@ class res_partner(osv.osv):
_columns = {
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
'Leads and Opportunities', domain=[('probability' 'not in', ['0', '100'])]),
'Leads and Opportunities', domain=[('probability', 'not in', ['0', '100'])]),
'meeting_ids': fields.many2many('crm.meeting', 'crm_meeting_partner_rel','partner_id', 'meeting_id',
'Meetings'),
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\

View File

@ -22,7 +22,7 @@
<group>
<field name="partner_id" readonly="True"/>
<field name="phone"/>
<field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>
<field name="user_id" attrs="{'invisible': [('action','=','log')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}" groups="base.group_multi_salesteams"/>
</group>
</group>

View File

@ -14,7 +14,7 @@
<field name="name"/>
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
<field name="partner_id" readonly="True"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="section_id" groups="base.group_multi_salesteams"/>
</group>
<footer>

View File

@ -106,7 +106,7 @@
<field name="date"/>
</group>
<group colspan="4" col="4" groups="base.group_user">
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="priority"/>
<field name="section_id" groups="base.group_multi_salesteams"/>
<field name="date_deadline"/>
@ -196,7 +196,7 @@
<filter string="Responsible" icon="terp-personal" domain="[]" help="Responsible User" context="{'group_by':'user_id'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
<filter string="Claim Date" icon="terp-go-month" domain="[]" help="Claim Date" context="{'group_by':'date'}"/>
<filter string="Claim Month" icon="terp-go-month" domain="[]" help="Claim Date by Month" context="{'group_by':'date'}"/>
<filter string="Deadline" icon="terp-go-month" domain="[]" context="{'group_by':'date_deadline'}"/>
<filter string="Closure" icon="terp-go-month" domain="[]" help="Date Closed" context="{'group_by':'date_closed'}" groups="base.group_no_one"/>
</group>

View File

@ -38,7 +38,7 @@
<group col="4" class="oe_header">
<field name="name" string="Query"/>
<field name="section_id" widget="selection" groups="base.group_multi_salesteams"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="date"/>
<field name="date_deadline"/>
</group>
@ -149,7 +149,7 @@
<filter string="Sales Team" icon="terp-personal+" domain="[]" help="Sales Team" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Date" icon="terp-go-month" domain="[]" help="Request Date" context="{'group_by':'date'}" />
<filter string="Request Month" icon="terp-go-month" domain="[]" help="Request Date by Month" context="{'group_by':'date'}" />
<filter string="Deadline" icon="terp-go-month" domain="[]" context="{'group_by':'date_deadline'}" />
</group>
</search>

View File

@ -35,7 +35,7 @@
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" />
<filter string="Assign Date" icon="terp-go-today" domain="[]" name="group_partner_date" context="{'group_by':'date_assign'}"/>
<filter string="Assign Month" icon="terp-go-today" domain="[]" name="group_partner_date" context="{'group_by':'date_assign'}"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'year'}" />

View File

@ -13,7 +13,7 @@
<field name="task_ids" colspan="4" nolabel="1">
<tree editable="bottom" string="Tasks">
<field name="name"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field string="Timebox" name="timebox_id"/>
<button name="prev_timebox" type="object" string="Previous"/>

View File

@ -11,7 +11,7 @@
<group col="4">
<field name="name"/>
<field name="parent_id"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_document_user']}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
@ -170,7 +170,7 @@
<field name="datas_fname" invisible="1"/>
</xpath>
<field name="url" position="after">
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_document_user']}"/>
</field>
<field name="company_id" position="before">
<field name="parent_id"/>

View File

@ -45,7 +45,7 @@
<field name="parent_id" on_change="onchange_parent_id(parent_id,content)" string="Category"/>
</group>
<group>
<field name="write_uid" groups="base.group_no_one"/>
<field name="write_uid" groups="base.group_no_one" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_document_user']}"/>
<field name="write_date" groups="base.group_no_one"/>
<field name="menu_id" groups="base.group_no_one"/>
</group>

View File

@ -21,6 +21,8 @@
##############################################################################
import base64
import datetime
import dateutil.relativedelta as relativedelta
import logging
import openerp
@ -57,6 +59,12 @@ try:
'str': str,
'quote': quote,
'urlencode': urlencode,
'datetime': datetime,
# dateutil.relativedelta is an old-style class and cannot be directly
# instanciated wihtin a jinja2 expression, so a lambda "proxy" is
# is needed, apparently.
'relativedelta': lambda *a, **kw : relativedelta.relativedelta(*a, **kw),
})
except ImportError:
_logger.warning("jinja2 not available, templating features will not work!")

View File

@ -296,7 +296,7 @@
<filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Starting Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_begin'}"/>
<filter string="Start Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_begin'}"/>
</group>
</search>
</field>
@ -391,7 +391,7 @@
</group>
<group>
<field name="nb_register"/>
<field name="user_id" attrs="{'readonly':[('state','!=', 'draft')]}"/>
<field name="user_id" attrs="{'readonly':[('state','!=', 'draft')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'event.group_event_user']}"/>
</group>
<group groups="base.group_no_one">
<field name="create_date"/>

View File

@ -864,7 +864,7 @@
<filter name="parent_true" domain="[('parent_id','!=',False)]" string="Indicative Costs"/>
<group expand="1" string="Group By...">
<filter name="groupby_year" context="{'group_by' : 'year'}" string="Year"/>
<filter name="groupby_date" context="{'group_by' : 'date'}" string="Date"/>
<filter name="groupby_date" context="{'group_by' : 'date'}" string="Vehicle Costs Month" help="Vehicle Costs by Month"/>
<filter name="groupby_cost_type" context="{'group_by' : 'cost_type'}" string="Cost Type"/>
<filter name="groupby_cost_subtype_id" context="{'group_by' : 'cost_subtype_id'}" string="Cost Subtype"/>
<filter name="groupby_vehicle_id" context="{'group_by' : 'vehicle_id'}" string="Vehicle"/>

View File

@ -190,7 +190,7 @@
<group>
<field name="survey_id"/>
<field name="user_to_review_id"/>
<field name="user_id" string="Interviewer"/>
<field name="user_id" string="Interviewer" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_manager']}"/>
</group>
<group>
<field name="date_deadline"/>
@ -251,7 +251,7 @@
<filter string='Employee' icon="terp-personal" domain="[]" context="{'group_by' : 'employee_id'}" />
<filter string='Plan' icon="terp-stock_align_left_24" domain="[]" context="{'group_by' : 'plan_id'}" />
<filter string='Status' icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
<filter string='Date' icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" />
<filter string='Appraisals Month' icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" help="Appraisals by Month" />
</group>
</search>
</field>
@ -313,7 +313,7 @@
<group>
<field name="survey_id"/>
<field name="user_to_review_id"/>
<field name="user_id" string="Interviewer"/>
<field name="user_id" string="Interviewer" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_manager']}"/>
</group>
<group>
<field name="date_deadline"/>

View File

@ -36,13 +36,6 @@ def _employee_get(obj, cr, uid, context=None):
class hr_expense_expense(osv.osv):
def copy(self, cr, uid, id, default=None, context=None):
if context is None:
context = {}
if not default: default = {}
default.update({'date_confirm': False, 'date_valid': False, 'user_valid': False})
return super(hr_expense_expense, self).copy(cr, uid, id, default, context=context)
def _amount(self, cr, uid, ids, field_name, arg, context=None):
res= {}
for expense in self.browse(cr, uid, ids, context=context):
@ -116,7 +109,11 @@ class hr_expense_expense(osv.osv):
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default.update(account_move_id=False)
default.update(
account_move_id=False,
date_confirm=False,
date_valid=False,
user_valid=False)
return super(hr_expense_expense, self).copy(cr, uid, id, default=default, context=context)
def unlink(self, cr, uid, ids, context=None):

View File

@ -80,7 +80,7 @@
</group>
<group>
<field name="name"/>
<field name="user_valid" attrs="{'invisible': [('state','=','draft')]}"/>
<field name="user_valid" attrs="{'invisible': [('state','=','draft')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_user']}"/>
<field name="currency_id" groups="base.group_multi_currency" on_change="onchange_currency_id(currency_id, company_id)"/>
</group>
</group>
@ -165,7 +165,7 @@
<group expand="0" string="Group By...">
<filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
<filter string="Expenses Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Expenses by Month"/>
</group>
</search>
</field>

View File

@ -3,7 +3,7 @@
<data noupdate="1">
<record model="hr.holidays" id="hr_holidays_employee1_allocation_cl">
<field name="name">Casual Leave for Fabien Pinckaers</field>
<field name="name">Casual Leave for Peter Parker</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="type">add</field>
<field name="number_of_days_temp">20</field>

View File

@ -22,7 +22,7 @@
<field name="holiday_status_id"/>
<group expand="0" string="Group By...">
<filter name="group_name" string="Description" domain="[]" context="{'group_by':'name'}"/>
<filter name="group_date_from" string="Start Date" icon="terp-personal" domain="[]" context="{'group_by':'date_from'}"/>
<filter name="group_date_from" string="Start Month" icon="terp-personal" domain="[]" context="{'group_by':'date_from'}"/>
<filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
<filter name="group_category" string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category_id'}"/>
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>

View File

@ -63,12 +63,12 @@
<field name="name">Provident Fund</field>
</record>
<record id="hr_salary_rule_ca_paolino" model="hr.salary.rule">
<record id="hr_salary_rule_ca_gravie" model="hr.salary.rule">
<field name="amount_select">fix</field>
<field eval="600.0" name="amount_fix"/>
<field name="code">CAQP</field>
<field name="code">CAGG</field>
<field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">Conveyance Allowance For Paolino</field>
<field name="name">Conveyance Allowance For Gravie</field>
<field name="sequence" eval="15"/>
</record>
@ -117,9 +117,9 @@
</record>
<record id="structure_002" model="hr.payroll.structure">
<field name="code">MEQP</field>
<field name="name">Marketing Executive for Quentin Paolino</field>
<field eval="[(6, 0, [ref('hr_salary_rule_ca_paolino'), ref('hr_salary_rule_meal_voucher')])]" name="rule_ids"/>
<field name="code">MEGG</field>
<field name="name">Marketing Executive for Gilles Gravie</field>
<field eval="[(6, 0, [ref('hr_salary_rule_ca_gravie'), ref('hr_salary_rule_meal_voucher')])]" name="rule_ids"/>
<field name="company_id" ref="base.main_company"/>
<field name="parent_id" ref="structure_001"/>
</record>
@ -152,14 +152,14 @@
<field name="working_hours" ref="resource.timesheet_group1"/>
</record>
<record id="hr_contract_quentin_paolino" model="hr.contract">
<field name="name">Contract For Quentin Paolino</field>
<record id="hr_contract_gilles_gravie" model="hr.contract">
<field name="name">Contract For Gilles Gravie</field>
<field name="type_id" ref="hr_contract.hr_contract_type_emp"/>
<field name="date_start" eval="time.strftime('%Y-%m')+'-1'"/>
<field name="date_end" eval="time.strftime('%Y')+'-12-31'"/>
<field name="struct_id" ref="hr_payroll.structure_002"/>
<field name="employee_id" ref="hr.employee_qdp"/>
<field name="notes">This is Quentin Paolino's contract</field>
<field name="notes">This is Gilles Gravie's contract</field>
<field eval="5000.0" name="wage"/>
<field name="working_hours" ref="resource.timesheet_group1"/>
</record>

View File

@ -182,6 +182,8 @@ class hr_applicant(osv.Model):
'write_date': fields.datetime('Update Date', readonly=True),
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage', track_visibility='onchange',
domain="['|', ('department_id', '=', department_id), ('department_id', '=', False)]"),
'last_stage_id': fields.many2one('hr.recruitment.stage', 'Last Stage',
help='Stage of the applicant before being in the current stage. Used for lost cases analysis.'),
'categ_ids': fields.many2many('hr.applicant_category', string='Tags'),
'company_id': fields.many2one('res.company', 'Company'),
'user_id': fields.many2one('res.users', 'Responsible', track_visibility='onchange'),
@ -390,13 +392,16 @@ class hr_applicant(osv.Model):
def write(self, cr, uid, ids, vals, context=None):
if isinstance(ids, (int, long)):
ids = [ids]
# stage change: update date_last_stage_update
if 'stage_id' in vals:
vals['date_last_stage_update'] = fields.datetime.now()
# user_id change: update date_start
if vals.get('user_id'):
vals['date_start'] = fields.datetime.now()
# stage_id: track last stage before update
if 'stage_id' in vals:
vals['date_last_stage_update'] = fields.datetime.now()
for applicant in self.browse(cr, uid, ids, context=None):
vals['last_stage_id'] = applicant.stage_id.id
res = super(hr_applicant, self).write(cr, uid, [applicant.id], vals, context=context)
return res
return super(hr_applicant, self).write(cr, uid, ids, vals, context=context)
def create_employee_from_applicant(self, cr, uid, ids, context=None):
@ -458,7 +463,7 @@ class hr_job(osv.osv):
_inherits = {'mail.alias': 'alias_id'}
_columns = {
'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"),
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="Email alias for this job position. New emails will automatically "
"create new applicants for this job position."),
}

View File

@ -41,6 +41,7 @@
<field name="arch" type="xml">
<tree string="Applicants" fonts="bold:message_unread==True">
<field name="message_unread" invisible="1"/>
<field name="last_stage_id" invisible="1"/>
<field name="create_date"/>
<field name="date_last_stage_update" invisible="1"/>
<field name="name" string="Subject"/>
@ -91,8 +92,8 @@
<field name="partner_name" class="oe_inline"/>
</h2>
<button string="Create Employee" name="create_employee_from_applicant" type="object"
class="oe_link oe_inline" style="margin-left: 8px;"
attrs="{'invisible': [('emp_id', '!=', False)]}"/>
class="oe_link oe_inline" style="margin-left: 8px;"
attrs="{'invisible': [('emp_id', '!=', False)]}"/>
</div>
<group>
<group>
@ -105,7 +106,7 @@
</group>
<group>
<field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'base.group_hr_manager']}"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_manager']}"/>
<label for="title_action"/>
<div>
<field name="date_action"/>
@ -194,9 +195,10 @@
<filter string="Degree" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="Availability" domain="[]" context="{'group_by':'availability'}"/>
<filter string="Appreciation" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Last Stage" help="Match this group by with a specific stage filter in order to analyse the recruitment process" context="{'group_by':'last_stage_id'}"/>
<filter string="Stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Source" domain="[]" context="{'group_by':'source_id'}"/>
<filter string="Creation Date" domain="[]" context="{'group_by':'create_date'}"/>
<filter string="Creation Month" domain="[]" context="{'group_by':'create_date'}"/>
<filter string="Last Stage Update" context="{'group_by':'date_last_stage_update'}"/>
</group>
</search>

View File

@ -56,11 +56,12 @@ class hr_recruitment_report(osv.Model):
'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')),
'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')),
'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
'available': fields.float("Availability"),
'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the project issue"),
'last_stage_id': fields.many2one ('hr.recruitment.stage', 'Last Stage'),
}
def init(self, cr):
@ -84,6 +85,7 @@ class hr_recruitment_report(osv.Model):
s.department_id,
s.priority,
s.stage_id,
s.last_stage_id,
sum(salary_proposed) as salary_prop,
(sum(salary_proposed)/count(*)) as salary_prop_avg,
sum(salary_expected) as salary_exp,
@ -105,6 +107,7 @@ class hr_recruitment_report(osv.Model):
s.company_id,
s.user_id,
s.stage_id,
s.last_stage_id,
s.type_id,
s.priority,
s.job_id,

View File

@ -10,6 +10,7 @@
<field name="user_id" invisible="1"/>
<field name="job_id"/>
<field name="stage_id" invisible="1" />
<field name="last_stage_id" invisible="1"/>
<field name="department_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
@ -68,6 +69,7 @@
<filter string="Jobs" name="job" context="{'group_by':'job_id'}"/>
<filter string="Department" name="department" context="{'group_by':'department_id'}"/>
<filter string="Degree" name="degree" context="{'group_by':'type_id'}"/>
<filter string="Last Stage" help="Match this group by with a specific stage filter in order to analyse the recruitment process" context="{'group_by':'last_stage_id'}"/>
<filter string="Stage" context="{'group_by':'stage_id'}" />
<filter string="Last Stage Update" context="{'group_by':'date_last_stage_update'}" />
<filter string="Day" name="day" context="{'group_by':'day'}" help="Creation Date"/>

View File

@ -74,7 +74,7 @@
<filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
<filter string="Timesheet Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Timesheet by Month"/>
</group>
</search>
</field>

View File

@ -2,11 +2,11 @@
In order to test hr_timesheet Module in OpenERP, I make "Sign In/Sign Out for Project" to encode and
track time spent on the different projects.
-
I create employee "Quentin Paolino" as "User".
I create employee "Gilles Gravie" as "User".
-
!record {model: hr.employee, id: hr.employee_qdp}:
address_home_id: base.res_partner_address_8
name: Quentin Paolino
name: Gilles Gravie
parent_id: 'hr.employee_al'
user_id: 'base.user_demo'
-
@ -22,7 +22,7 @@
!python {model: hr.sign.in.project}: |
import time
uid = ref('base.user_demo')
new_id = self.create(cr, uid, {'emp_id': ref('hr.employee_qdp'), 'name': 'Quentin Paolino',
new_id = self.create(cr, uid, {'emp_id': ref('hr.employee_qdp'), 'name': 'Gilles Gravie',
'server_date': time.strftime('%Y-%m-%d %H:%M:%S')})
self.sign_in_result(cr, uid, [new_id], context)
-
@ -35,7 +35,8 @@
new_id = self.create(cr, uid, {'account_id': ref('account.analytic_nebula'),'analytic_amount': 7.0,
'date': (datetime.now()+timedelta(1)).strftime('%Y-%m-%d %H:%M:%S') ,
'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module',
'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'present'})
'name': 'Gilles Gravie', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'present'})
self.sign_out_result(cr, uid, [new_id], context)
-
My work for this project "Sednacom" is over and I stop working by clicking on "Stop Work" button of this wizard.
@ -47,5 +48,5 @@
new_id = self.create(cr, uid, {'account_id': ref('account.analytic_spark'), 'analytic_amount': 7.0,
'date': (datetime.now()+timedelta(2)).strftime('%Y-%m-%d %H:%M:%S'),
'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module',
'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'absent'})
'name': 'Gilles Gravie', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'absent'})
self.sign_out_result_end(cr, uid, [new_id], context)

View File

@ -7,29 +7,29 @@
!record {model: res.company, id: base.main_company}:
timesheet_max_difference: 1.00
-
I assign this product(Service on Timesheet) and journal(Timesheet Journal) to employee "Quentin Paolino"
I assign this product(Service on Timesheet) and journal(Timesheet Journal) to employee "Gilles Gravie"
-
!record {model: hr.employee, id: hr.employee_qdp}:
product_id: product.product_product_consultant
journal_id: hr_timesheet.analytic_journal
-
I create a timesheet for employee "Quentin Paolino".
I create a timesheet for employee "Gilles Gravie".
-
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
date_from: !eval time.strftime('%Y-%m-01')
name: Quentin Paolino
name: Gilles Gravie
state: new
user_id: base.user_demo
employee_id: 'hr.employee_qdp'
-
Quentin "Sign In" at around 9am.
Gilles "Sign In" at around 9am.
-
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_in
employee_id: 'hr.employee_qdp'
name: !eval datetime.now().strftime('%Y-%m-%d 09:%M:%S')
-
I test that Quentin in signed in
I test that Gilles in signed in
-
!assert {model: hr.employee, id: hr.employee_qdp}:
- state == 'present'

View File

@ -232,6 +232,10 @@ class im_session(osv.osv):
raise Exception("Not allowed to modify a session when you are not in it.")
self.write(cr, uid, session_id, {"user_ids": [(4, user_id)]}, context=context)
def remove_me_from_session(self, cr, uid, session_id, uuid=None, context=None):
my_id = self.pool.get("im.user").get_my_id(cr, uid, uuid, context=context)
self.write(cr, openerp.SUPERUSER_ID, session_id, {"user_ids": [(3, my_id)]}, context=context)
class im_user(osv.osv):
_name = "im.user"

View File

@ -254,22 +254,25 @@ function declare($, _, openerp) {
},
received_messages: function(messages) {
var self = this;
if (! this.get("window_focus") && messages.length >= 1) {
this.set("waiting_messages", this.get("waiting_messages") + messages.length);
this.ting.play();
this.create_ting();
}
var defs = [];
var received = false;
_.each(messages, function(message) {
if (! message.technical) {
defs.push(self.activate_session(message.session_id[0]).then(function(conv) {
received = true;
return conv.received_message(message);
}));
} else {
var json = JSON.parse(message.message);
message.json = json;
defs.push($.when(im_common.technical_messages_handlers[json.type](self, message)));
}
});
if (! this.get("window_focus") && received) {
this.set("waiting_messages", this.get("waiting_messages") + messages.length);
this.ting.play();
this.create_ting();
}
return $.when.apply($, defs);
},
calc_positions: function() {
@ -292,7 +295,7 @@ function declare($, _, openerp) {
className: "openerp_style oe_im_chatview",
events: {
"keydown input": "keydown",
"click .oe_im_chatview_close": "destroy",
"click .oe_im_chatview_close": "close",
"click .oe_im_chatview_header": "show_hide"
},
init: function(parent, c_manager, session_id, options) {
@ -443,8 +446,8 @@ function declare($, _, openerp) {
return new Array(size - str.length + 1).join('0') + str;
};
date = "" + zpad(date.getHours(), 2) + ":" + zpad(date.getMinutes(), 2);
this.last_bubble = $(openerp.qweb.render("im_common.conversation_bubble", {"items": items, "user": user, "time": date}));
var to_show = _.map(items, im_common.escape_keep_url);
this.last_bubble = $(openerp.qweb.render("im_common.conversation_bubble", {"items": to_show, "user": user, "time": date}));
$(this.$(".oe_im_chatview_content").children()[0]).append(this.last_bubble);
this._go_bottom();
},
@ -456,7 +459,7 @@ function declare($, _, openerp) {
return;
im_common.connection.model("im.session").call("add_to_session",
[this.session_id, user.get("id"), this.c_manager.me.get("uuid")]).then(_.bind(function() {
this.send_message(JSON.stringify({"type": "session_modified"}), true);
this.send_message(JSON.stringify({"type": "session_modified", "action": "added", "user_id": user.get("id")}), true);
}, this));
},
focus: function() {
@ -464,6 +467,20 @@ function declare($, _, openerp) {
if (! this.shown)
this.show_hide();
},
close: function() {
var def = $.when();
if (this.get("users").length > 1) {
def = im_common.connection.model("im.session").call("remove_me_from_session",
[this.session_id, this.c_manager.me.get("uuid")]).then(_.bind(function() {
return this.send_message(JSON.stringify({"type": "session_modified", "action": "removed",
"user_id": this.c_manager.me.get("id")}), true)
}, this))
}
return def.then(_.bind(function() {
this.destroy();
}, this));
},
destroy: function() {
_.each(this.get("users"), function(user) {
user.remove_watcher();
@ -479,11 +496,36 @@ function declare($, _, openerp) {
im_common.technical_messages_handlers = {};
im_common.technical_messages_handlers.session_modified = function(c_manager, message) {
c_manager.activate_session(message.session_id[0], true).then(function(conv) {
conv.refresh_users();
var def = $.when();
if (message.json.action === "added" && message.json.user_id === c_manager.me.get("id")) {
def = c_manager.activate_session(message.session_id[0], true);
}
return def.then(function() {
var conv = _.find(c_manager.conversations, function(conv) {return conv.session_id == message.session_id[0];});
if (conv)
return conv.refresh_users();
return undefined;
});
};
var url_regex = /(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/gi;
im_common.escape_keep_url = function(str) {
var last = 0;
var txt = "";
while (true) {
var result = url_regex.exec(str);
if (! result)
break;
txt += _.escape(str.slice(last, result.index));
last = url_regex.lastIndex;
var url = _.escape(result[0]);
txt += '<a href="' + url + '">' + url + '</a>';
}
txt += str.slice(last, str.length);
return txt;
};
return im_common;
}

View File

@ -33,7 +33,7 @@
<div class="oe_im_chatview_from"><t t-esc="user.get('name')"/></div>
<div class="oe_im_chatview_bubble_list">
<t t-foreach="items" t-as="item">
<div class="oe_im_chatview_bubble_item"><t t-esc="item"/></div>
<div class="oe_im_chatview_bubble_item"><t t-raw="item"/></div>
</t>
</div>
<div class="oe_im_chatview_time"><t t-esc="time"/></div>

View File

@ -247,9 +247,9 @@ class partner_vat_intra(osv.osv_memory):
for client in xml_data['clientlist']:
if not client['vatnum']:
raise osv.except_osv(_('Insufficient Data!'),_('No vat number defined for %s.') % client['partner_name'])
data_clientinfo +='\n\t\t<ns2:IntraClient SequenceNumber="%(seq)s">\n\t\t\t<ns2:CompanyVATNumber issuedBy="%(country)s">%(vatnum)s</ns2:CompanyVATNumber>\n\t\t\t<ns2:Code>%(code)s</ns2:Code>\n\t\t\t<ns2:Amount>%(amount)s</ns2:Amount>\n\t\t</ns2:IntraClient>' % (client)
data_clientinfo +='\n\t\t<ns2:IntraClient SequenceNumber="%(seq)s">\n\t\t\t<ns2:CompanyVATNumber issuedBy="%(country)s">%(vatnum)s</ns2:CompanyVATNumber>\n\t\t\t<ns2:Code>%(code)s</ns2:Code>\n\t\t\t<ns2:Amount>%(amount).2f</ns2:Amount>\n\t\t</ns2:IntraClient>' % (client)
data_decl = '\n\t<ns2:IntraListing SequenceNumber="1" ClientsNbr="%(clientnbr)s" DeclarantReference="%(dnum)s" AmountSum="%(amountsum)s">' % (xml_data)
data_decl = '\n\t<ns2:IntraListing SequenceNumber="1" ClientsNbr="%(clientnbr)s" DeclarantReference="%(dnum)s" AmountSum="%(amountsum).2f">' % (xml_data)
data_file += data_head + data_decl + data_comp_period + data_clientinfo + '\n\t\t<ns2:Comment>%(comments)s</ns2:Comment>\n\t</ns2:IntraListing>\n</ns2:IntraConsignment>' % (xml_data)
context['file_save'] = data_file

View File

@ -241,11 +241,11 @@ class account_coda_import(osv.osv_memory):
if statement['debit'] == '1': # 1=Debit
statement['balance_end_real'] = - statement['balance_end_real']
if statement['balance_end_realDate']:
period_id = self.pool.get('account.period').search(cr, uid, [('date_start', '<=', statement['balance_end_realDate']), ('date_stop', '>=', statement['balance_end_realDate'])])
period_id = self.pool.get('account.period').search(cr, uid, [('company_id', '=', statement['journal_id'].company_id.id), ('date_start', '<=', statement['balance_end_realDate']), ('date_stop', '>=', statement['balance_end_realDate'])])
else:
period_id = self.pool.get('account.period').search(cr, uid, [('date_start', '<=', statement['date']), ('date_stop', '>=', statement['date'])])
period_id = self.pool.get('account.period').search(cr, uid, [('company_id', '=', statement['journal_id'].company_id.id), ('date_start', '<=', statement['date']), ('date_stop', '>=', statement['date'])])
if not period_id and len(period_id) == 0:
raise osv.except_osv(_('Error') + 'R0002', _("The CODA Statement New Balance date doesn't fall within a defined Accounting Period! Please create the Accounting Period for date %s.") % statement['balance_end_realDate'])
raise osv.except_osv(_('Error') + 'R0002', _("The CODA Statement New Balance date doesn't fall within a defined Accounting Period! Please create the Accounting Period for date %s for the company %s.") % (statement['balance_end_realDate'], statement['journal_id'].company_id.name))
statement['period_id'] = period_id[0]
elif line[0] == '9':
statement['balanceMin'] = float(rmspaces(line[22:37])) / 1000

View File

@ -47,13 +47,13 @@ This is the latest Ethiopian OpenERP localization and consists of:
'data/account.tax.template.csv',
'data/res.country.state.csv',
],
'update_xml': [
'data': [
'l10n_et_wizard.xml',
],
'test': [
],
'demo_xml': [
'demo': [
],
'installable': True,
'active': False,
}
}

View File

@ -21,7 +21,6 @@
{
'name': 'Indian Payroll',
'category': 'Localization',
'init_xml': [],
'author': 'OpenERP SA',
'website':'http://www.openerp.com',
'depends': ['hr_payroll'],
@ -43,7 +42,7 @@ Indian Payroll Salary Rules.
- Yearly Salary by Head and Yearly Salary by Employee Report
""",
'active': False,
'update_xml': [
'data': [
'l10n_in_hr_payroll_view.xml',
'data/l10n_in_hr_payroll_data.xml',
'data/hr.salary.rule.csv',
@ -61,7 +60,7 @@ Indian Payroll Salary Rules.
'test/payment_advice_batch.yml'
],
'demo_xml': ['l10n_in_hr_payroll_demo.xml'],
'demo': ['l10n_in_hr_payroll_demo.xml'],
'installable': True
}

View File

@ -33,8 +33,8 @@
'account',
'account_chart',
],
'init_xml': [],
'update_xml': ['account_types.xml',
'data': [
'account_types.xml',
'account_chart.xml',
'account_tax_code_template.xml',
'account_chart_template.xml',
@ -42,7 +42,7 @@
'account_taxes.xml',
'l10n_chart_pt_wizard.xml',
],
'demo_xml': [],
'demo': [],
'installable': True,
}

View File

@ -23,7 +23,7 @@
<field name="user_id"/>
<group expand="0" string="Group By...">
<filter name="group_by_supplier" string="By Supplier" context="{'group_by':'supplier'}"/>
<filter name="group_by_date" string="By Date" context="{'group_by':'date'}"/>
<filter name="group_by_date" string="Order Month" context="{'group_by':'date'}" help="Supplier Order by Month"/>
</group>
</search>
</field>
@ -375,7 +375,7 @@
<group>
<group>
<field name='user_id'
context="{'default_groups_ref': ['base.group_user', 'lunch.group_lunch_user']}"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'lunch.group_lunch_user']}"/>
</group>
<group>
<field name='date'/>

View File

@ -76,7 +76,7 @@ class mail_group(osv.Model):
help="Small-sized photo of the group. It is automatically "\
"resized as a 64x64px image, with aspect ratio preserved. "\
"Use this field anywhere a small image is required."),
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="The email address associated with this group. New emails received will automatically "
"create new topics."),
}

View File

@ -376,6 +376,7 @@ class mail_message(osv.Model):
'author_id': author,
'partner_ids': partner_ids,
'attachment_ids': attachment_ids,
'user_pid': pid
})
return True

View File

@ -36,7 +36,7 @@ class res_users(osv.Model):
_inherits = {'mail.alias': 'alias_id'}
_columns = {
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="Email address internally associated with this user. Incoming "\
"emails will appear in the user's notifications."),
'display_groups_suggestions': fields.boolean("Display Groups Suggestions"),

View File

@ -53,6 +53,9 @@
.openerp .oe_mail > .oe_thread{
margin-left: 0px;
}
.openerp .oe_inline.oe_compose_recipients {
margin-top: -2px;
}
/* ---------------- MESSAGES ------------------ */

View File

@ -235,7 +235,7 @@ openerp.mail = function (session) {
this.attachment_ids = datasets.attachment_ids || [],
this.partner_ids = datasets.partner_ids || [];
this.date = datasets.date;
this.user_pid = datasets.user_pid || false;
this.format_data();
// update record_name: Partner profile
@ -565,6 +565,7 @@ openerp.mail = function (session) {
'default_partner_ids': partner_ids,
'mail_post_autofollow': true,
'mail_post_autofollow_partner_ids': partner_ids,
'is_private': self.is_private
};
if (self.is_log) {
_.extend(context, {'mail_compose_log': true});
@ -773,7 +774,7 @@ openerp.mail = function (session) {
// if clicked: call for suggested recipients
if (event.type == 'click') {
this.is_log = $input.hasClass('oe_compose_log');
suggested_partners = this.parent_thread.ds_thread.call('message_get_suggested_recipients', [[this.context.default_res_id]]).done(function (additional_recipients) {
suggested_partners = this.parent_thread.ds_thread.call('message_get_suggested_recipients', [[this.context.default_res_id], this.context]).done(function (additional_recipients) {
var thread_recipients = additional_recipients[self.context.default_res_id];
_.each(thread_recipients, function (recipient) {
var parsed_email = mail.ChatterUtils.parse_email(recipient[1]);
@ -1239,9 +1240,9 @@ openerp.mail = function (session) {
if (datasets.author_id && !_.contains(_.flatten(datasets.partner_ids),datasets.author_id[0]) && datasets.author_id[0]) {
datasets.partner_ids.push(datasets.author_id);
}
this.user_pid = datasets.user_pid || false;
this.partner_ids = datasets.partner_ids;
this.messages = [];
this.options.flat_mode = (this.options.display_indented_thread - this.thread_level > 0);
// object compose message

View File

@ -121,21 +121,23 @@
To:
<t t-if="!widget.is_private">
<span class="oe_all_follower">
<t t-if="widget.parent_thread.parent_message.record_name" t-raw="'&quot;' + widget.parent_thread.parent_message.record_name + '&quot;'">
<t t-if="widget.parent_thread.parent_message.record_name">
Followers of <t t-raw="'&quot;' + widget.parent_thread.parent_message.record_name + '&quot;'"/>
</t>
<t t-if="!widget.parent_thread.parent_message.record_name and widget.options.view_inbox">My Followers</t>
<t t-if="!widget.parent_thread.parent_message.record_name and !widget.options.view_inbox">Followers of this document</t>
</span>
</t>
<t t-if="!widget.is_private and (widget.partner_ids.length or (widget.author_id and widget.author_id[0]))"> and </t>
<t t-set="inc" t-value="0"/>
<t t-foreach="widget.partner_ids" t-as="partner">
<span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/>
<a t-if="widget.options.show_link" t-attf-href="#model=res.partner&amp;id=#{partner[0]}"><t t-raw="partner[1]"/></a>
<t t-if="!widget.options.show_link" t-raw="partner[1]"/>
</span>
<t t-set="inc" t-value="inc+1"/>
<t t-if="widget.is_private or (widget.user_pid != partner[0])">
<t t-if="!widget.is_private and inc==0"> and </t>
<span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/>
<a t-if="widget.options.show_link" t-attf-href="#model=res.partner&amp;id=#{partner[0]}"><t t-raw="partner[1]"/></a>
<t t-if="!widget.options.show_link" t-raw="partner[1]"/>
</span>
<t t-set="inc" t-value="inc+1"/>
</t>
</t>
<t t-if="widget.partner_ids.length > 3">
<span class="oe_more">, <a><t t-raw="widget.partner_ids.length - 3"/> others...</a></span>

View File

@ -66,7 +66,6 @@ class mail_compose_message(osv.TransientModel):
if context is None:
context = {}
result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
# get some important values from context
composition_mode = context.get('default_composition_mode', context.get('mail.compose.message.mode'))
model = context.get('default_model', context.get('active_model'))
@ -78,7 +77,6 @@ class mail_compose_message(osv.TransientModel):
result['active_domain'] = '%s' % context.get('active_domain')
else:
result['active_domain'] = ''
# get default values according to the composition mode
if composition_mode == 'reply':
vals = self.get_message_data(cr, uid, message_id, context=context)
@ -212,7 +210,8 @@ class mail_compose_message(osv.TransientModel):
# get partner_ids from original message
partner_ids = [partner.id for partner in message_data.partner_ids] if message_data.partner_ids else []
partner_ids += context.get('default_partner_ids', [])
if context.get('is_private',False) and message_data.author_id : #check message is private then add author also in partner list.
partner_ids += [message_data.author_id.id]
# update the result
result = {
'record_name': message_data.record_name,

View File

@ -34,7 +34,7 @@
attrs="{'invisible':[('composition_mode', '=', 'mass_mail')]}">
<span attrs="{'invisible':[('model', '=', False)]}">
Followers of
<field name="record_name" readonly="1" class="oe_inline"/>
<field name="record_name" readonly="1" class="oe_inline oe_compose_recipients"/>
and
</span>
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."

View File

@ -250,7 +250,7 @@
<group expand="0" string="Group By...">
<filter string="Campaign" name="Campaign" icon="terp-gtk-jump-to-rtl" context="{'group_by':'campaign_id'}"/>
<filter string="Status" name="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Launch Date" name="Launch Date" icon="terp-go-month" context="{'group_by':'date_run'}"/>
<filter string="Launch Month" name="Launch Date" icon="terp-go-month" context="{'group_by':'date_run'}"/>
</group>
</search>
</field>
@ -435,7 +435,7 @@
<filter string="Resource" name="resource" icon="terp-accessories-archiver" context="{'group_by':'object_id'}"/>
<filter string="Resource ID" name="res_id" icon="terp-accessories-archiver" context="{'group_by':'res_id'}"/>
<filter string="Status" name="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Execution Date" name="Date" icon="terp-go-month" context="{'group_by':'date'}"/>
<filter string="Execution Month" name="Date" icon="terp-go-month" context="{'group_by':'date'}"/>
</group>
</search>
</field>

View File

@ -16,7 +16,7 @@
<field name="categ_id" operator="child_of"/>
<group expand='0' string='Group by...'>
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}"/>
<filter string='Date From' icon="terp-go-month" domain="[]" context="{'group_by' : 'membership_date_from'}"/>
<filter string='From Month' icon="terp-go-month" domain="[]" context="{'group_by' : 'membership_date_from'}"/>
</group>
</search>
</field>
@ -158,6 +158,7 @@
<record id="view_res_partner_member_filter" model="ir.ui.view">
<field name="name">res.partner.select</field>
<field name="model">res.partner</field>
<field name="priority">50</field>
<field name="arch" type="xml">
<search string="Membership Partners">
<field name="membership_start" invisible="1"/>
@ -172,8 +173,8 @@
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}"/>
<filter string="Associate Member" name = "associate" icon="terp-partner" domain="[]" context="{'group_by':'associate_member'}"/>
<filter string=" Membership State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'membership_state'}"/>
<filter string="Start Date" help="Starting Date Of Membership" icon="terp-go-month" domain="[]" context="{'group_by':'membership_start'}"/>
<filter string="End Date" help="Ending Date Of Membership" icon="terp-go-month" domain="[]" context="{'group_by':'membership_stop'}"/>
<filter string="Start Month" help="Starting Month Of Membership" icon="terp-go-month" domain="[]" context="{'group_by':'membership_start'}"/>
<filter string="End Month" help="Ending Month Of Membership" icon="terp-go-month" domain="[]" context="{'group_by':'membership_stop'}"/>
</group>
</search>
</field>

View File

@ -318,9 +318,10 @@ class mrp_bom(osv.osv):
"""
routing_obj = self.pool.get('mrp.routing')
factor = factor / (bom.product_efficiency or 1.0)
factor = rounding(factor, bom.product_rounding)
if factor < bom.product_rounding:
factor = bom.product_rounding
max_rounding = max(bom.product_rounding, bom.product_uom.rounding)
factor = rounding(factor, max_rounding)
if factor < max_rounding:
factor = max_rounding
result = []
result2 = []
phantom = False

View File

@ -430,7 +430,7 @@
<filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}"/>
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Starting Date"/>
<filter string=" Valid From Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
</group>
</search>
</field>
@ -667,7 +667,7 @@
<group>
<field name="bom_id" domain="[('product_id','=',product_id)]" context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)" required="1"/>
<field name="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'mrp.group_mrp_user']}"/>
<field name="origin"/>
</group>
<group groups="stock.group_locations">
@ -827,7 +827,7 @@
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date"/>
<filter string="Scheduled Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date by Month"/>
</group>
</search>
</field>
@ -1027,7 +1027,7 @@
<field name="name">Bill of Materials</field>
<field name="domain">[('bom_id','=',False)]</field>
<field name="res_model">mrp.bom</field>
<field name="view_type">tree</field>
<field name="view_type">form</field>
</record>
<record id="act_product_mrp_production" model="ir.actions.act_window">
<field name="context">{'search_default_product_id': [active_id]}</field>

View File

@ -33,7 +33,13 @@ class TestMrpMulticompany(common.TransactionCase):
self.res_users = self.registry('res.users')
self.stock_location = self.registry('stock.location')
model, self.multicompany_user_id = self.ir_model_data.get_object_reference(cr, uid, 'stock', 'multicompany_user')
model, group_user_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'base', 'group_user')
model, group_stock_manager_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'stock', 'group_stock_manager')
model, company_2_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'stock', 'res_company_2')
self.multicompany_user_id = self.res_users.create(cr, uid,
{'name': 'multicomp', 'login': 'multicomp',
'groups_id': [(6, 0, [group_user_id, group_stock_manager_id])],
'company_id': company_2_id, 'company_ids': [(6,0,[company_2_id])]})
def test_00_multicompany_user(self):

View File

@ -134,7 +134,7 @@
<filter string="Work Center" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/>
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
<filter string="Scheduled Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date by Month"/>
</group>
</search>
</field>

View File

@ -215,7 +215,7 @@
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit"/>
<filter string="Guarantee limit Month" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit by Month"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>

View File

@ -478,6 +478,11 @@ class pos_session(osv.osv):
context = {}
if not ids:
return {}
for session in self.browse(cr, uid, ids, context=context):
if session.user_id.id != uid:
raise osv.except_osv(
_('Error!'),
_("You cannot use the session of another users. This session is owned by %s. Please first close this one to use this point of sale." % session.user_id.name))
context.update({'active_id': ids[0]})
return {
'type' : 'ir.actions.client',
@ -507,7 +512,6 @@ class pos_order(osv.osv):
'pos_reference':order['name'],
'partner_id': order['partner_id'] or False
}, context)
for payments in order['statement_ids']:
payment = payments[2]
self.add_payment(cr, uid, order_id, {
@ -809,9 +813,18 @@ class pos_order(osv.osv):
"""Create a copy of order for refund order"""
clone_list = []
line_obj = self.pool.get('pos.order.line')
for order in self.browse(cr, uid, ids, context=context):
current_session_ids = self.pool.get('pos.session').search(cr, uid, [
('state', '!=', 'closed'),
('user_id', '=', uid)], context=context)
if not current_session_ids:
raise osv.except_osv(_('Error!'), _('To return product(s), you need to open a session that will be used to register the refund.'))
clone_id = self.copy(cr, uid, order.id, {
'name': order.name + ' REFUND',
'name': order.name + ' REFUND', # not used, name forced by create
'session_id': current_session_ids[0],
'date_order': time.strftime('%Y-%m-%d %H:%M:%S'),
}, context=context)
clone_list.append(clone_id)
@ -1357,30 +1370,10 @@ class product_product(osv.osv):
'to_weight' : fields.boolean('To Weight', help="Check if the product should be weighted (mainly used with self check-out interface)."),
}
def _default_pos_categ_id(self, cr, uid, context=None):
proxy = self.pool.get('ir.model.data')
try:
category_id = proxy.get_object_reference(cr, uid, 'point_of_sale', 'categ_others')[1]
except ValueError:
values = {
'name' : 'Others',
}
category_id = self.pool.get('pos.category').create(cr, uid, values, context=context)
values = {
'name' : 'categ_others',
'model' : 'pos.category',
'module' : 'point_of_sale',
'res_id' : category_id,
}
proxy.create(cr, uid, values, context=context)
return category_id
_defaults = {
'to_weight' : False,
'available_in_pos': True,
'pos_categ_id' : _default_pos_categ_id,
}
def edit_ean(self, cr, uid, ids, context):

View File

@ -28,180 +28,6 @@
<p>If you install the PoS proxy you will be able to interface OpenERP with retail hardware: barcode scanners, printers, cash registers, weighing machines, credit card payment terminals.</p>]]></field>
</record>
<record id="unreferenced_product" model="product.product">
<field name="list_price">1.00</field>
<field name="name">Unreferenced Products</field>
<field name="pos_categ_id" ref="categ_others"/>
<field name="image">iVBORw0KGgoAAAANSUhEUgAAAFUAAABQCAYAAABoODnpAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC
AkDAfcUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dE
AP4A/gD+6xjUggAAAAlwSFlzAAAXEgAAFxIBZ5/SUgAAAAl2cEFnAAAAVQAAAFAA8yp5GQAAJFFJ
REFUeNrdfXecVNXZ//fembnTy07f2dm+O9sXFtgC0kEBX9EQI0YRDWpiibFEjeaNJmqKRiXRBGI0
eWMvYAMEEYWlKGULZXudrbO703sv9/7+WCHbUDC0/J7PZygzd855zvc85zzn+Z7nnCFwsYRhILr+
DQTnlHD0va1Kud+ZJgr5c0RhfzY/GkzjR0PJVCwqpxJRMUnTPAAEACZBssIxNscfZVPOMMUfDlKC
/gBPaPTxxUaXSD5gyiiwC7+oi3m33QGwiYvStAtaK2d9HWJqNZFRd0CpdlsKlT57pcJrn6X0OfLl
fkeyLOCWSEJeDj8SJLixCDiJGFh0AgTDnCqDJkjQJIkYi4MIh4sQV8B4eeKoWyjzOcWKEbtE2eEQ
K+vtYsURq0zb2jdrvp1jszKxB8v//wGVfLkN9Pfzkf67txUpdlNVsntkeYrDNF/vMGVrXSNCud8F
fjQINp04pQwz5vvMFGUSU/ybARAnWQhyBXCJ5DDLtIEhhd44JE/5ciQp+bMhhf5I3/KbHJy2Jib2
YOl/J6jKR7bCI1Wy8ntOGFIdg6syrL3fyzIbi9PtA/wkvxNUIn4KDOY/q2pSg042KspiwyVMw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oqHpWxEzERi06c+ukkmiAjoz+dxHWHKP5IkCvoD/CE3T6euNsjlPYO6XLMof+dF8aJOFB2
cU5f/z+rXz1t3lG/LgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxMi0wOC0xMFQxMzoyNjoxNSswMjow
MJsC4wUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTItMDgtMTBUMTM6MjY6MDkrMDI6MDDhVTFTAAAA
GXRFWHRTb2Z0d2FyZQBNaWNyb3NvZnQgT2ZmaWNlf+01cQAAAABJRU5ErkJggg==</field>
</record>
</data>
</openerp>

View File

@ -36,7 +36,7 @@
</record>
<record model="pos.config" id="pos_config_main">
<field name="journal_ids" eval="[(6, 0, [ref('account.cash_journal'), ref('account.bank_journal')])]" />
<field name="journal_ids" eval="[(6, 0, [ref('account.cash_journal'), ref('account.bank_journal'), ref('account.check_journal')])]" />
</record>
<!-- Resource: pos.category -->

View File

@ -8,10 +8,6 @@
groups="group_pos_manager,group_pos_user"
sequence="30"/>
<record id="categ_others" model="pos.category">
<field name="name">Others</field>
</record>
<record model="ir.ui.view" id="view_pos_pos_form">
<field name="name">pos.order</field>
<field name="model">pos.order</field>
@ -85,7 +81,7 @@
<group string="General Information">
<field name="company_id" groups="base.group_multi_company"/>
<field name="warehouse_id" widget="selection" groups="stock.group_locations"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'point_of_sale.group_pos_user']}"/>
<field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]"/>
<field name="picking_id" readonly="1"/>
<field name="pos_reference"/>
@ -161,7 +157,7 @@
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
<filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
</group>
</search>
</field>
@ -177,8 +173,8 @@
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context" eval="{'default_pos_categ_id': ref('point_of_sale.categ_others')}"/>
<field name="domain" eval="[('pos_categ_id','&lt;&gt;',False)]"/>
<field name="context" eval="{}"/>
<field name="domain" eval="[('available_in_pos','&lt;&gt;',False)]"/>
<field name="view_id" ref="product.product_product_tree_view"/>
<field name="search_view_id" ref="product.product_search_form_view"/>
<field name="help" type="html">
@ -898,7 +894,7 @@
<group>
<field name="cash_control" invisible="1" />
<group>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'point_of_sale.group_pos_manager', 'base.group_sale_manager']}"/>
<field name="config_id"/>
</group>
<group>
@ -1049,7 +1045,7 @@
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Session" icon="terp-personal" domain="[]" context="{'group_by':'session_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
<filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
</group>
</search>
</field>

View File

@ -100,7 +100,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
this.custom_payment_status = this.default_payment_status;
this.connection = new instance.web.Session(undefined,url);
this.connection.session_id = _.uniqueId('posproxy');
this.bypass_proxy = false;
this.notifications = {};
@ -516,7 +516,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
// The barcode readers acts as a keyboard, we catch all keyup events and try to find a
// barcode sequence in the typed keys, then act accordingly.
$('body').delegate('','keyup', function (e){
$('body').delegate('','keypress', function (e){
//console.log('keyup:'+String.fromCharCode(e.keyCode)+' '+e.keyCode,e);
//We only care about numbers
if (e.keyCode >= 48 && e.keyCode < 58){

View File

@ -120,7 +120,7 @@
<group expand="0" string="Group By">
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
<filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
<filter string="Scheduled Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>

View File

@ -93,6 +93,7 @@ class product_pricelist(osv.osv):
_name = "product.pricelist"
_description = "Pricelist"
_order = 'name'
_columns = {
'name': fields.char('Pricelist Name',size=64, required=True, translate=True),
'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the pricelist without removing it."),
@ -111,6 +112,27 @@ class product_pricelist(osv.osv):
result.append((pl.id,name))
return result
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if name and operator == '=' and not args:
# search on the name of the pricelist and its currency, opposite of name_get(),
# Used by the magic context filter in the product search view.
query_args = {'name': name, 'limit': limit}
query = """SELECT p.id
FROM product_pricelist p JOIN
res_currency c ON (p.currency_id = c.id)
WHERE p.name || ' (' || c.name || ')' = %(name)s
ORDER BY p.name"""
if limit:
query += " LIMIT %(limit)s"
cr.execute(query, query_args)
ids = [r[0] for r in cr.fetchall()]
# regular search() to apply ACLs - may limit results below limit in some cases
ids = self.search(cr, uid, [('id', 'in', ids)], limit=limit, context=context)
if ids:
return self.name_get(cr, uid, ids, context)
return super(product_pricelist, self).name_search(
cr, uid, name, args, operator=operator, context=context, limit=limit)
def _get_currency(self, cr, uid, ctx):
comp = self.pool.get('res.users').browse(cr, uid, uid).company_id

View File

@ -420,6 +420,11 @@ class product_product(osv.osv):
pricelist = context.get('pricelist', False)
partner = context.get('partner', False)
if pricelist:
# Support context pricelists specified as display_name or ID for compatibility
if isinstance(pricelist, basestring):
pricelist_ids = self.pool.get('product.pricelist').name_search(
cr, uid, pricelist, operator='=', context=context, limit=1)
pricelist = pricelist_ids[0][0] if pricelist_ids else pricelist
for id in ids:
try:
price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist], id, quantity, partner=partner, context=context)[pricelist]
@ -762,7 +767,7 @@ class product_product(osv.osv):
context = {}
if context and context.get('search_default_categ_id', False):
args.append((('categ_id', 'child_of', context['search_default_categ_id'])))
return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=False)
return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
class product_packaging(osv.osv):

View File

@ -15,7 +15,7 @@
<filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
<field name="categ_id"/>
<group expand="0" string="Context...">
<field name="pricelist_id" context="{'pricelist': self}" groups="product.group_sale_pricelist"/>
<field name="pricelist_id" context="{'pricelist': self}" filter_domain="[]" groups="product.group_sale_pricelist"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group expand='0' string='Group by...'>
@ -111,7 +111,7 @@
<group name="status" string="Status">
<field name="state"/>
<field name="product_manager"
context="{'default_groups_ref': ['base.group_user', 'base.group_sale_manager']}"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_manager']}"/>
</group>
<group name="Weights" groups="product.group_stock_packaging" string="Weights">
<field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
@ -723,7 +723,7 @@
<group name="status" string="Status">
<field name="categ_id"/>
<field name="state"/>
<field name="product_manager"/>
<field name="product_manager" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_manager']}"/>
</group>
<group name="uom" string="Unit of Measure">

View File

@ -265,7 +265,7 @@ class project(osv.osv):
'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'task_count': fields.function(_task_count, type='integer', string="Open Tasks"),
'color': fields.integer('Color Index'),
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="Internal email associated with this project. Incoming emails are automatically synchronized"
"with Tasks (or optionally Issues if the Issue Tracker module is installed)."),
'alias_model': fields.selection(_alias_models, "Alias Model", select=True, required=True,
@ -717,6 +717,16 @@ class task(osv.osv):
new_name = _("%s (copy)") % (default.get('name', ''))
default.update({'name':new_name})
return super(task, self).copy_data(cr, uid, id, default, context)
def copy(self, cr, uid, id, default=None, context=None):
if context is None:
context = {}
if default is None:
default = {}
stage = self._get_default_stage_id(cr, uid, context=context)
if stage:
default['stage_id'] = stage
return super(task, self).copy(cr, uid, id, default, context)
def _is_template(self, cr, uid, ids, field_name, arg, context=None):
res = {}
@ -1248,6 +1258,18 @@ class account_analytic_account(osv.osv):
raise osv.except_osv(_('Warning!'), _('Please delete the project linked with this account first.'))
return super(account_analytic_account, self).unlink(cr, uid, ids, *args, **kwargs)
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if args is None:
args = []
if context is None:
context={}
if context.get('current_model') == 'project.project':
project_ids = self.search(cr, uid, args + [('name', operator, name)], limit=limit, context=context)
return self.name_get(cr, uid, project_ids, context=context)
return super(account_analytic_account, self).name_search(cr, uid, name, args=args, operator=operator, context=context, limit=limit)
class project_project(osv.osv):
_inherit = 'project.project'
_defaults = {

View File

@ -37,8 +37,8 @@
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Last Stage Update" icon="terp-go-month" domain="[]" context="{'group_by':'date_last_stage_update'}"/>
<filter string="Deadline" icon="terp-gnome-cpu-frequency-applet+" domain="[]" context="{'group_by':'date_deadline'}"/>
<filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
<filter string="End Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_end'}" groups="base.group_no_one"/>
<filter string="Start Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
<filter string="End Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_end'}" groups="base.group_no_one"/>
</group>
</search>
</field>
@ -101,7 +101,7 @@
<group>
<field name="user_id" string="Project Manager"
attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"
context="{'default_groups_ref': ['base.group_user', 'project.group_project_manager']}"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_manager']}"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<span></span>
<p attrs="{'invisible': [('analytic_account_id','=',False)]}">
@ -127,7 +127,7 @@
</group>
<notebook>
<page string="Team" name="team">
<field colspan="4" name="members" widget="many2many_kanban">
<field colspan="4" name="members" widget="many2many_kanban" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'group_project_user']}">
<kanban quick_create="false" create="true">
<field name="name"/>
<templates>
@ -340,7 +340,7 @@
<field colspan="4" name="name"/>
<field name="hours" widget="float_time"/>
<field name="date"/>
<field name="user_id" options='{"no_open": True}'/>
<field name="user_id" options='{"no_open": True}' context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
</form>
@ -355,7 +355,7 @@
<field name="date"/>
<field name="name"/>
<field name="hours" widget="float_time"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'project.group_project_user']}"/>
</tree>
</field>
</record>
@ -384,7 +384,7 @@
<field name="project_id" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
<field name="user_id"
options='{"no_open": True}'
context="{'default_groups_ref': ['base.group_user', 'project.group_project_user']}"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field name="planned_hours" widget="float_time"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
@ -404,7 +404,7 @@
<field name="name"/>
<field name="hours" widget="float_time" sum="Spent Hours"/>
<field name="date"/>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
</tree>
</field>
<group>

View File

@ -17,7 +17,7 @@
<field name="new_task_description" colspan="2" nolabel="1"/>
</group>
<group>
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<separator string="Validation Task" colspan="2"/>
<field name="prefix" string="Validation Task Title"/>
<field name="planned_hours_me"/>

View File

@ -64,7 +64,7 @@
<group>
<group>
<field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'project.group_project_user']}"/>
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<field name="email_from"/>
<label for="project_id"/>
@ -158,7 +158,7 @@
<filter string="Version" name="group_version" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'version_id'}"/>
<filter string="Priority" name="group_priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Month" name="group_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" help="Creation Month"/>
<filter string="Creation Month" name="group_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
</group>
</search>
</field>

View File

@ -33,7 +33,7 @@
<field name="arch" type="xml">
<form string="Project User Allocation" version="7.0">
<group col="4">
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field name="phase_id"/>
<field name="project_id"/>
<field name="date_start"/>
@ -49,7 +49,7 @@
<field name="priority" eval="5"/>
<field name="arch" type="xml">
<tree editable="bottom" string="Project User Allocation">
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'project.group_project_user']}"/>
<field name="phase_id"/>
<field name="project_id"/>
</tree>
@ -175,7 +175,7 @@
<page string="Team Planning">
<field name="user_ids">
<tree editable="bottom" string="Project Users">
<field name="user_id"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field name="date_start"/>
<field name="date_end"/>
</tree>
@ -280,7 +280,7 @@
<group expand="0" string="Group By...">
<filter string="Project" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}" name="project"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Start Month"/>
<filter string="Start Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
</group>
</search>
</field>

View File

@ -51,7 +51,7 @@
<field eval="&quot;&quot;&quot;Procurement Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;if product type is 'service' then it creates the task.&quot;&quot;&quot;" name="note"/>
<field name="target_node_id" ref="process_node_procuretasktask0"/>
<field name="source_node_id" ref="sale_stock.process_node_saleprocurement0"/>
<field name="source_node_id" ref="mrp.process_node_productionorder0"/>
</record>
<record id="process_transition_createtask0" model="process.transition">

Some files were not shown because too many files have changed in this diff Show More