[MERGE] sync with trunk
bzr revid: mat@openerp.com-20131220144635-qq4vmp1ciw3e5xlw
This commit is contained in:
commit
b421d76cdd
|
@ -3,9 +3,15 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<record id="analytic_journal_sale" model="account.analytic.journal">
|
||||
<field name="code">SAL</field>
|
||||
<field name="name">Sales</field>
|
||||
<field name="type">sale</field>
|
||||
</record>
|
||||
<record id="exp" model="account.analytic.journal">
|
||||
<field name="code">PUR</field>
|
||||
<field name="name">Purchases</field>
|
||||
<field name="type">purchase</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Payment term
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||
"PO-Revision-Date: 2013-07-02 06:32+0000\n"
|
||||
"PO-Revision-Date: 2013-12-19 08:06+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-09-12 05:32+0000\n"
|
||||
"X-Generator: Launchpad (build 16761)\n"
|
||||
"X-Launchpad-Export-Date: 2013-12-20 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 16872)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
|
@ -184,6 +184,13 @@ msgid ""
|
|||
" </p>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"<p class=\"oe_view_nocontent_create\">\n"
|
||||
" Щелкните, чтобы добавить отчетный период.\n"
|
||||
" </p><p>\n"
|
||||
" Отчетный период как правило - месяц или квартал .\n"
|
||||
" Обычно он соответствует периодам налоговой декларации.\n"
|
||||
" </p>\n"
|
||||
" "
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_view_created_invoice_dashboard
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
<field name="name">Sales</field>
|
||||
<field name="type">sale</field>
|
||||
</record>
|
||||
<record id="exp" model="account.analytic.journal">
|
||||
<field name="code">PUR</field>
|
||||
<field name="name">Purchases</field>
|
||||
<field name="type">purchase</field>
|
||||
</record>
|
||||
<record id="sit" model="account.analytic.journal">
|
||||
<field name="code">START</field>
|
||||
<field name="name">Miscellaneous Operation</field>
|
||||
|
|
|
@ -450,6 +450,7 @@ class account_analytic_account(osv.osv):
|
|||
'is_overdue_quantity' : fields.function(_is_overdue_quantity, method=True, type='boolean', string='Overdue Quantity',
|
||||
store={
|
||||
'account.analytic.line' : (_get_analytic_account, None, 20),
|
||||
'account.analytic.account': (lambda self, cr, uid, ids, c=None: ids, ['quantity_max'], 10),
|
||||
}),
|
||||
'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
|
||||
help="Total customer invoiced amount for this account.",
|
||||
|
|
|
@ -23,6 +23,7 @@ from datetime import datetime, timedelta
|
|||
import time
|
||||
import logging
|
||||
|
||||
import openerp
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||
|
@ -222,6 +223,7 @@ class base_action_rule(osv.osv):
|
|||
def create(self, cr, uid, vals, context=None):
|
||||
res_id = super(base_action_rule, self).create(cr, uid, vals, context=context)
|
||||
self._register_hook(cr, [res_id])
|
||||
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
|
||||
return res_id
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
|
@ -229,6 +231,7 @@ class base_action_rule(osv.osv):
|
|||
ids = [ids]
|
||||
super(base_action_rule, self).write(cr, uid, ids, vals, context=context)
|
||||
self._register_hook(cr, ids)
|
||||
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
|
||||
return True
|
||||
|
||||
def onchange_model_id(self, cr, uid, ids, model_id, context=None):
|
||||
|
|
|
@ -411,7 +411,7 @@
|
|||
on_change="on_change_partner_id(partner_id)"
|
||||
string="Customer"
|
||||
context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
|
||||
<field name="email_from" string="Email"/>
|
||||
<field name="email_from" string="Email" widget="email"/>
|
||||
<field name="phone"/>
|
||||
</group>
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import psycopg2
|
|||
|
||||
import openerp
|
||||
from openerp import tools
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.osv.orm import except_orm
|
||||
import openerp.report.interface
|
||||
|
@ -322,7 +323,7 @@ class document_directory(osv.osv):
|
|||
ressource_parent_type_id=vals.get('ressource_parent_type_id',False)
|
||||
ressource_id=vals.get('ressource_id',0)
|
||||
if op=='write':
|
||||
for directory in self.browse(cr, uid, ids):
|
||||
for directory in self.browse(cr, SUPERUSER_ID, ids):
|
||||
if not name:
|
||||
name=directory.name
|
||||
if not parent_id:
|
||||
|
@ -336,7 +337,7 @@ class document_directory(osv.osv):
|
|||
if len(res):
|
||||
return False
|
||||
if op=='create':
|
||||
res=self.search(cr,uid,[('name','=',name),('parent_id','=',parent_id),('ressource_parent_type_id','=',ressource_parent_type_id),('ressource_id','=',ressource_id)])
|
||||
res = self.search(cr, SUPERUSER_ID, [('name','=',name),('parent_id','=',parent_id),('ressource_parent_type_id','=',ressource_parent_type_id),('ressource_id','=',ressource_id)])
|
||||
if len(res):
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -58,6 +58,23 @@
|
|||
!python {model: ir.attachment}: |
|
||||
ids = self.search(cr, uid, [('res_model', '=', 'res.country'), ('res_id', '=', ref("base.za"))])
|
||||
assert ids == [ ref("attach_3rd")], ids
|
||||
-
|
||||
I test that I can't create duplicate directories (even when duplicates are hidden by a record rule)
|
||||
-
|
||||
!python {model: document.directory}: |
|
||||
duplicate_detected = False
|
||||
from openerp.osv.osv import except_osv
|
||||
try:
|
||||
demo_uid = ref('base.user_demo')
|
||||
dir_vals = {
|
||||
'name': 'Testing (will be deleted!)',
|
||||
'parent_id': ref('document.dir_root')
|
||||
}
|
||||
new_dir_id = self.create(cr, demo_uid, dir_vals, context=None)
|
||||
self.unlink(cr, uid, [new_dir_id], context=None)
|
||||
except except_osv, e:
|
||||
duplicate_detected = e.value == u'Directory name must be unique!'
|
||||
assert duplicate_detected is True, 'Failed to detect duplicate directory'
|
||||
-
|
||||
I delete the attachments
|
||||
-
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -57,9 +57,10 @@ class res_users(osv.Model):
|
|||
various mailboxes, we do not have access to the current partner_id. """
|
||||
if kwargs.get('type') == 'email':
|
||||
return super(res_users, self).message_post(cr, uid, thread_id, context=context, **kwargs)
|
||||
res = None
|
||||
employee_ids = self._message_post_get_eid(cr, uid, thread_id, context=context)
|
||||
if not employee_ids:
|
||||
pass # dpo something
|
||||
if not employee_ids: # no employee: fall back on previous behavior
|
||||
return super(res_users, self).message_post(cr, uid, thread_id, context=context, **kwargs)
|
||||
for employee_id in employee_ids:
|
||||
res = self.pool.get('hr.employee').message_post(cr, uid, employee_id, context=context, **kwargs)
|
||||
return res
|
||||
|
|
|
@ -242,6 +242,10 @@ class hr_holidays(osv.osv):
|
|||
result['value'] = {
|
||||
'employee_id': ids_employee[0]
|
||||
}
|
||||
elif holiday_type != 'employee':
|
||||
result['value'] = {
|
||||
'employee_id': False
|
||||
}
|
||||
return result
|
||||
|
||||
def onchange_employee(self, cr, uid, ids, employee_id):
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<separator/>
|
||||
<filter icon="terp-go-year" name="year" string="Year" domain="[('holiday_status_id.active','=',True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
|
||||
<separator/>
|
||||
<filter string="My Leaves" icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
|
||||
<filter string="My Requests" icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leave Requests"/>
|
||||
<separator/>
|
||||
<filter string="My Department Leaves" icon="terp-personal+" help="My Department Leaves" domain="[('department_id.manager_id','=',uid)]"/>
|
||||
<field name="employee_id"/>
|
||||
|
@ -47,61 +47,14 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="edit_holiday_new" model="ir.ui.view">
|
||||
<!-- Holidays: Allocation Request -->
|
||||
<record model="ir.ui.view" id="edit_holiday_new">
|
||||
<field name="name">Leave Request</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Leave Request" version="7.0">
|
||||
<field name="can_reset" invisible="1"/>
|
||||
<header>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
|
||||
<button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1,validate" type="workflow" groups="base.group_hr_user"/>
|
||||
<button string="Reset to Draft" name="reset" type="workflow"
|
||||
attrs="{'invisible': ['|', ('can_reset', '=', False), ('state', 'not in', ['confirm', 'refuse'])]}"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
|
||||
</header>
|
||||
<sheet string="Leave Request">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
|
||||
<field name="holiday_status_id" context="{'employee_id':employee_id}"/>
|
||||
<label for="number_of_days_temp" string="Duration" help="The default duration interval between the start date and the end date is 8 hours. Feel free to adapt it to your needs."/>
|
||||
<div>
|
||||
<group col="3">
|
||||
<field name="date_from" nolabel="1" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/><label string="-" class="oe_inline"/>
|
||||
<field name="date_to" nolabel="1" on_change="onchange_date_to(date_to, date_from)" required="1" class="oe_inline"/>
|
||||
</group>
|
||||
<div>
|
||||
<field name="number_of_days_temp" class="oe_inline"/> days
|
||||
</div>
|
||||
</div>
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type, employee_id)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" on_change="onchange_employee(employee_id)" groups="base.group_hr_user"/>
|
||||
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Holidays: Allocation Request -->
|
||||
<record model="ir.ui.view" id="allocation_leave_new">
|
||||
<field name="name">Allocation Request</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Allocation Request" version="7.0">
|
||||
<field name="can_reset" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<header>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
|
||||
|
@ -114,21 +67,27 @@
|
|||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" required="1" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')], 'required': [('type', '=', 'add')]}"/>
|
||||
<field name="holiday_status_id" context="{'employee_id':employee_id}"/>
|
||||
<label for="number_of_days_temp"/>
|
||||
<label for="number_of_days_temp" string="Duration"/>
|
||||
<div>
|
||||
<field name="number_of_days_temp" class="oe_inline"/> days
|
||||
<group col="3" attrs="{'invisible': [('type', '=', 'add')]}">
|
||||
<field name="date_from" nolabel="1" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/><label string="-" class="oe_inline"/>
|
||||
<field name="date_to" nolabel="1" on_change="onchange_date_to(date_to, date_from)" required="1" class="oe_inline"/>
|
||||
</group>
|
||||
<div>
|
||||
<field name="number_of_days_temp" class="oe_inline"/> days
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)"/>
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')]}"/>
|
||||
<field name="department_id" attrs="{'invisible':[('holiday_type','=','category')]}"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('type', '=', 'remove'),('state','!=','draft')]}" string="Mode" groups="base.group_hr_user"/>
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" on_change="onchange_employee(employee_id)" groups="base.group_hr_user"/>
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly': [('type', '=', 'remove'),('state','!=','draft'), ('state','!=','confirm')], 'invisible':[('holiday_type','=','employee')]}"/>
|
||||
<field name="department_id" attrs="{'readonly':['|', ('type','=','add'),('holiday_type','=','category')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
|
||||
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..." attrs="{'invisible': [('type', '=', 'remove')]}"/>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
|
@ -231,7 +190,7 @@
|
|||
<menuitem name="Leaves" parent="hr.menu_hr_root" id="menu_open_ask_holidays" sequence="20"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="open_ask_holidays">
|
||||
<field name="name">Leave Requests</field>
|
||||
<field name="name">Leave Request</field>
|
||||
<field name="res_model">hr.holidays</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
|
@ -305,7 +264,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="context">{'default_type':'add', 'search_default_my_leaves':1}</field>
|
||||
<field name="domain">[('type','=','add')]</field>
|
||||
<field name="view_id" ref="allocation_leave_new"/>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
<field name="search_view_id" ref="view_hr_holidays_filter"/>
|
||||
</record>
|
||||
|
||||
|
@ -319,7 +278,7 @@
|
|||
<record model="ir.actions.act_window.view" id="action_open_allocation_holidays_form">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="allocation_leave_new"/>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
<field name="act_window_id" ref="open_allocation_holidays"/>
|
||||
</record>
|
||||
|
||||
|
@ -331,7 +290,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="context">{'default_type': 'add', 'search_default_approve':1}</field>
|
||||
<field name="domain">[('type','=','add')]</field>
|
||||
<field name="view_id" ref="allocation_leave_new"/>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
<field name="search_view_id" ref="view_hr_holidays_filter"/>
|
||||
</record>
|
||||
|
||||
|
@ -345,7 +304,7 @@
|
|||
<record model="ir.actions.act_window.view" id="action_request_approve_allocation_form">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="allocation_leave_new"/>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
<field name="act_window_id" ref="request_approve_allocation"/>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ class hr_applicant(osv.Model):
|
|||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Subject', size=128, required=True),
|
||||
'name': fields.char('Subject / Application Name', size=128, required=True),
|
||||
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."),
|
||||
'description': fields.text('Description'),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
|
@ -200,7 +200,7 @@ class hr_applicant(osv.Model):
|
|||
'salary_expected_extra': fields.char('Expected Salary Extra', size=100, help="Salary Expected by Applicant, extra advantages"),
|
||||
'salary_proposed': fields.float('Proposed Salary', help="Salary Proposed by the Organisation"),
|
||||
'salary_expected': fields.float('Expected Salary', help="Salary Expected by Applicant"),
|
||||
'availability': fields.integer('Availability'),
|
||||
'availability': fields.integer('Availability', help="The number of days in which the applicant will be available to start working"),
|
||||
'partner_name': fields.char("Applicant's Name", size=64),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<field name="last_stage_id" invisible="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_last_stage_update" invisible="1"/>
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="email_from"/>
|
||||
<field name="partner_phone"/>
|
||||
|
|
|
@ -745,6 +745,8 @@
|
|||
<field name="property_account_receivable" ref="pcg_3488"/>
|
||||
<field name="property_account_payable" ref="pcg_4488"/>
|
||||
<field name="currency_id" ref="base.MAD"/>
|
||||
<field name="property_account_income_categ" ref="pcg_7111"/>
|
||||
<field name="property_account_expense_categ" ref="pcg_1486"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_exo">
|
||||
|
|
|
@ -119,3 +119,5 @@
|
|||
"51100_general_product",51100,"Freight and Shipping Costs","other","l10n_us.user_type_cogs","cost_of_goods_sold","False","l10n_us.account_chart_template_general_product"
|
||||
"52500_general_product",52500,"Purchase Discounts","other","l10n_us.user_type_cogs","cost_of_goods_sold","False","l10n_us.account_chart_template_general_product"
|
||||
"52900_general_product",52900,"Purchases - Resale Items","other","l10n_us.user_type_cogs","cost_of_goods_sold","False","l10n_us.account_chart_template_general_product"
|
||||
"base_miscincome","49000","Miscellaneous Income","other","l10n_us.user_type_income","income","False","l10n_us.account_chart_template_basic"
|
||||
"base_miscexpense","69000","Miscellaneous Expense","other","l10n_us.user_type_expense","expense","False","l10n_us.account_chart_template_basic"
|
|
|
@ -9,6 +9,8 @@
|
|||
<field name="property_account_receivable" ref="account_receivable"/>
|
||||
<field name="property_account_payable" ref="account_payable"/>
|
||||
<field name="currency_id" ref="base.USD"/>
|
||||
<field name="property_account_income_categ" ref="base_miscincome"/>
|
||||
<field name="property_account_expense_categ" ref="base_miscexpense"/>
|
||||
</record>
|
||||
<record id="account_chart_template_advertising" model="account.chart.template">
|
||||
<field name="bank_account_view_id" ref="cash_expenditure"/>
|
||||
|
|
|
@ -81,16 +81,19 @@ Main Features
|
|||
'css': [
|
||||
'static/src/css/mail.css',
|
||||
'static/src/css/mail_group.css',
|
||||
'static/src/css/announcement.css',
|
||||
],
|
||||
'js': [
|
||||
'static/src/js/mail.js',
|
||||
'static/src/js/mail_followers.js',
|
||||
'static/src/js/many2many_tags_email.js',
|
||||
'static/src/js/announcement.js',
|
||||
'static/src/js/suggestions.js',
|
||||
],
|
||||
'qweb': [
|
||||
'static/src/xml/mail.xml',
|
||||
'static/src/xml/mail_followers.xml',
|
||||
'static/src/xml/announcement.xml',
|
||||
'static/src/xml/suggestions.xml',
|
||||
],
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.openerp .annoucement_bar {
|
||||
display: none;
|
||||
}
|
|
@ -90,7 +90,9 @@
|
|||
}
|
||||
|
||||
.openerp .oe_group_button {
|
||||
padding-top: 7px;
|
||||
position: absolute;
|
||||
padding-bottom: 50px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.openerp .oe_group_button .oe_group_join {
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
openerp_announcement = function(instance) {
|
||||
instance.web.WebClient.include({
|
||||
show_application: function() {
|
||||
return $.when(this._super.apply(this, arguments)).then(this.proxy('show_annoucement_bar'));
|
||||
},
|
||||
_ab_location: function(dbuuid) {
|
||||
return _.str.sprintf('https://services.openerp.com/openerp-enterprise/ab/css/%s.css', dbuuid);
|
||||
},
|
||||
show_annoucement_bar: function() {
|
||||
if (this.session.get_cookie('ab') === 'c') {
|
||||
return;
|
||||
}
|
||||
var self = this;
|
||||
var config_parameter = new instance.web.Model('ir.config_parameter');
|
||||
var $bar = this.$el.find('.announcement_bar');
|
||||
return config_parameter.call('get_param', ['database.uuid', false]).then(function(dbuuid) {
|
||||
if (!dbuuid) {
|
||||
return;
|
||||
}
|
||||
var $link = $bar.find('.url a');
|
||||
$link.attr('href', _.str.sprintf('%s/%s', $link.attr('href'), dbuuid));
|
||||
var $css = $('<link />').attr({
|
||||
rel : 'stylesheet',
|
||||
type: 'text/css',
|
||||
media: 'screen',
|
||||
href: self._ab_location(dbuuid)
|
||||
});
|
||||
$css.on('load', function() {
|
||||
var close = function() {
|
||||
var ttl = 7*24*60*60;
|
||||
self.session.set_cookie('ab', 'c', ttl);
|
||||
$bar.slideUp('slow');
|
||||
};
|
||||
$bar.find('.close').on('click', close);
|
||||
self.trigger('ab_loaded', $bar);
|
||||
});
|
||||
|
||||
$('head').append($css);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
|
@ -6,6 +6,7 @@ openerp.mail = function (session) {
|
|||
|
||||
openerp_mail_followers(session, mail); // import mail_followers.js
|
||||
openerp_FieldMany2ManyTagsEmail(session); // import manyy2many_tags_email.js
|
||||
openerp_announcement(session);
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-extend="WebClient">
|
||||
<t t-jquery="table.oe_webclient" t-operation="prepend">
|
||||
<td colspan="2" class="announcement_bar">
|
||||
<span class="message"></span>
|
||||
<span class="url"><a href="https://services.openerp.com/openerp-enterprise/ab/register" target="_blank"></a></span>
|
||||
<span class="close"></span>
|
||||
</td>
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
|
@ -38,9 +38,9 @@ professional emails and reuse templates in a few clicks.
|
|||
],
|
||||
'data': [
|
||||
'mail_data.xml',
|
||||
'mass_mailing_view.xml',
|
||||
'wizard/mail_compose_message_view.xml',
|
||||
'wizard/mail_mass_mailing_create_segment.xml',
|
||||
'mass_mailing_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'js': [
|
||||
|
|
|
@ -252,6 +252,9 @@
|
|||
<t t-if="widget.view.is_action_enabled('edit')">
|
||||
<li><a type="edit">Settings</a></li>
|
||||
</t>
|
||||
<t t-if="widget.view.is_action_enabled('edit')">
|
||||
<li><a name="%(action_mail_mass_mailing_create)d" type="action">New Wave</a></li>
|
||||
</t>
|
||||
<t t-if="widget.view.is_action_enabled('delete')">
|
||||
<li><a type="delete">Delete</a></li>
|
||||
</t>
|
||||
|
|
|
@ -36,7 +36,7 @@ class MailMassMailingCreate(osv.TransientModel):
|
|||
required=True,
|
||||
),
|
||||
'model_id': fields.many2one(
|
||||
'ir.model', 'Document',
|
||||
'ir.model', 'Document Type',
|
||||
required=True,
|
||||
help='Document on which the mass mailing will run. This must be a '
|
||||
'valid OpenERP model.',
|
||||
|
@ -116,6 +116,7 @@ class MailMassMailingCreate(osv.TransientModel):
|
|||
'default_template_id': wizard.template_id.id,
|
||||
'default_use_mass_mailing_campaign': True,
|
||||
'default_use_active_domain': True,
|
||||
'default_model': wizard.model_id.model,
|
||||
'default_active_domain': wizard.domain,
|
||||
'default_mass_mailing_campaign_id': wizard.mass_mailing_campaign_id.id,
|
||||
'default_mass_mailing_id': wizard.mass_mailing_id.id,
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<label for="model_id"/>
|
||||
<label for="template_id"/>
|
||||
<div>
|
||||
<field name="template_id"/>
|
||||
<p class="oe_grey"
|
||||
|
@ -55,8 +55,7 @@
|
|||
<label for="name"/>
|
||||
<div>
|
||||
<field name="name"/>
|
||||
<p class="oe_grey"
|
||||
attrs="{'invisible': [('name', '!=', False)]}">
|
||||
<p class="oe_grey">
|
||||
Please choose the name of the mailing.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -70,6 +70,8 @@ class report_custom(report_rml):
|
|||
main_strd_price = str(std_price) + '\r\n'
|
||||
sum_strd = prod_qtty*std_price
|
||||
for seller_id in prod.seller_ids:
|
||||
if seller_id.name.id == prod.seller_id.id:
|
||||
continue
|
||||
sellers += '- <i>'+ to_xml(seller_id.name.name) +'</i>\r\n'
|
||||
pricelist = seller_id.name.property_product_pricelist_purchase
|
||||
price = pricelist_pool.price_get(cr,uid,[pricelist.id],
|
||||
|
|
|
@ -714,13 +714,14 @@ class pos_order(osv.osv):
|
|||
}, context=context)
|
||||
self.write(cr, uid, [order.id], {'picking_id': picking_id}, context=context)
|
||||
location_id = order.warehouse_id.lot_stock_id.id
|
||||
output_id = order.warehouse_id.lot_output_id.id
|
||||
if order.partner_id:
|
||||
destination_id = order.partner_id.property_stock_customer.id
|
||||
else:
|
||||
destination_id = partner_obj.default_get(cr, uid, ['property_stock_customer'], context=context)['property_stock_customer']
|
||||
|
||||
for line in order.lines:
|
||||
if line.product_id and line.product_id.type == 'service':
|
||||
continue
|
||||
if line.qty < 0:
|
||||
location_id, output_id = output_id, location_id
|
||||
|
||||
move_obj.create(cr, uid, {
|
||||
'name': line.name,
|
||||
|
@ -732,11 +733,9 @@ class pos_order(osv.osv):
|
|||
'product_qty': abs(line.qty),
|
||||
'tracking_id': False,
|
||||
'state': 'draft',
|
||||
'location_id': location_id,
|
||||
'location_dest_id': output_id,
|
||||
'location_id': location_id if line.qty >= 0 else destination_id,
|
||||
'location_dest_id': destination_id if line.qty >= 0 else location_id,
|
||||
}, context=context)
|
||||
if line.qty < 0:
|
||||
location_id, output_id = output_id, location_id
|
||||
|
||||
picking_obj.signal_button_confirm(cr, uid, [picking_id])
|
||||
picking_obj.force_assign(cr, uid, [picking_id], context)
|
||||
|
|
|
@ -560,6 +560,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
|
|||
this.handler = function(e){
|
||||
|
||||
if(e.which === 13){ //ignore returns
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,6 @@ openerp.project = function(openerp) {
|
|||
if (self.dataset.model === 'project.project') {
|
||||
self.project_display_members_names();
|
||||
}
|
||||
},
|
||||
on_record_moved: function(record, old_group, old_index, new_group, new_index){
|
||||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
if(new_group.state.folded)
|
||||
new_group.do_action_toggle_fold();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -46,12 +46,15 @@
|
|||
Process Transition
|
||||
-->
|
||||
|
||||
<!-- This "foreign" process node is duplicated here from the corresponding sale_stock node because
|
||||
<!-- This process node is duplicated here from the corresponding sale_stock node because
|
||||
`project_mrp` implements a basic procurement system for services without actually using the
|
||||
full-fledged procurement process from sale_stock, and without the dependency. So it stil
|
||||
represents a "procurement system".
|
||||
full-fledged procurement process from sale_stock, and without the dependency. So it still
|
||||
represents a "procurement system". Sharing the external ID causes other problems, so
|
||||
we duplicate it instead.
|
||||
TODO: To cleanup this duplicate node, it should probably be moved to the
|
||||
`sale` module directly, and removed from both `sale_stock` and `project_mrp`.
|
||||
-->
|
||||
<record id="procurement.process_node_saleprocurement0" model="process.node">
|
||||
<record id="process_node_saleprocurement0" model="process.node">
|
||||
<field name="menu_id" ref="procurement.menu_stock_procurement_action"/>
|
||||
<field name="model_id" ref="procurement.model_procurement_order"/>
|
||||
<field name="kind">subflow</field>
|
||||
|
@ -66,7 +69,7 @@
|
|||
<field eval=""""Procurement Task"""" name="name"/>
|
||||
<field eval=""""if product type is 'service' then it creates the task."""" name="note"/>
|
||||
<field name="target_node_id" ref="process_node_procuretasktask0"/>
|
||||
<field name="source_node_id" ref="procurement.process_node_saleprocurement0"/>
|
||||
<field name="source_node_id" ref="process_node_saleprocurement0"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_createtask0" model="process.transition">
|
||||
|
|
|
@ -140,6 +140,6 @@ class stock_picking_in(osv.osv):
|
|||
_columns = {
|
||||
'purchase_id': fields.many2one('purchase.order', 'Purchase Order',
|
||||
ondelete='set null', select=True),
|
||||
'warehouse_id': fields.related('purchase_id', 'warehouse_id', type='many2one', relation='stock.warehouse', string='Destination Warehouse'),
|
||||
'warehouse_id': fields.related('purchase_id', 'warehouse_id', type='many2one', relation='stock.warehouse', string='Destination Warehouse', readonly=True),
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -997,9 +997,9 @@ class mail_compose_message(osv.Model):
|
|||
|
||||
def send_mail(self, cr, uid, ids, context=None):
|
||||
context = context or {}
|
||||
if context.get('active_model') == 'sale.order' and context.get('active_ids') and context.get('mark_so_as_sent'):
|
||||
if context.get('default_model') == 'sale.order' and context.get('default_res_id') and context.get('mark_so_as_sent'):
|
||||
context = dict(context, mail_post_autofollow=True)
|
||||
self.pool.get('sale.order').signal_quotation_sent(cr, uid, context['active_ids'])
|
||||
self.pool.get('sale.order').signal_quotation_sent(cr, uid, [context['default_res_id']])
|
||||
return super(mail_compose_message, self).send_mail(cr, uid, ids, context=context)
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,18 @@ from dateutil import relativedelta
|
|||
from openerp import tools
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
class res_users(osv.Model):
|
||||
_inherit = 'res.users'
|
||||
_columns = {
|
||||
'default_section_id': fields.many2one('crm.case.section', 'Default Sales Team'),
|
||||
}
|
||||
|
||||
def __init__(self, pool, cr):
|
||||
init_res = super(res_users, self).__init__(pool, cr)
|
||||
# duplicate list to avoid modifying the original reference
|
||||
self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
|
||||
self.SELF_WRITEABLE_FIELDS.extend(['default_section_id'])
|
||||
return init_res
|
||||
|
||||
class sale_order(osv.osv):
|
||||
_inherit = 'sale.order'
|
||||
|
@ -35,6 +47,17 @@ class sale_order(osv.osv):
|
|||
domain="['|',('section_id','=',section_id),('section_id','=',False), ('object_id.model', '=', 'crm.lead')]", context="{'object_name': 'crm.lead'}")
|
||||
}
|
||||
|
||||
def _get_default_section_id(self, cr, uid, context=None):
|
||||
""" Gives default section by checking if present in the context """
|
||||
section_id = self.pool.get('crm.lead')._resolve_section_id_from_context(cr, uid, context=context) or False
|
||||
if not section_id:
|
||||
section_id = self.pool.get('res.users').browse(cr, uid, uid, context).default_section_id.id or False
|
||||
return section_id
|
||||
|
||||
_defaults = {
|
||||
'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
|
||||
}
|
||||
|
||||
def _prepare_invoice(self, cr, uid, order, lines, context=None):
|
||||
invoice_vals = super(sale_order, self)._prepare_invoice(cr, uid, order, lines, context=context)
|
||||
if order.section_id and order.section_id.id:
|
||||
|
@ -92,21 +115,6 @@ class crm_case_section(osv.osv):
|
|||
def action_forecast(self, cr, uid, id, value, context=None):
|
||||
return self.write(cr, uid, [id], {'invoiced_forecast': round(float(value))}, context=context)
|
||||
|
||||
|
||||
class res_users(osv.Model):
|
||||
_inherit = 'res.users'
|
||||
_columns = {
|
||||
'default_section_id': fields.many2one('crm.case.section', 'Default Sales Team'),
|
||||
}
|
||||
|
||||
def __init__(self, pool, cr):
|
||||
init_res = super(res_users, self).__init__(pool, cr)
|
||||
# duplicate list to avoid modifying the original reference
|
||||
self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
|
||||
self.SELF_WRITEABLE_FIELDS.extend(['default_section_id'])
|
||||
return init_res
|
||||
|
||||
|
||||
class sale_crm_lead(osv.Model):
|
||||
_inherit = 'crm.lead'
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
# Thai translation for openobject-addons
|
||||
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
|
||||
"PO-Revision-Date: 2013-12-12 11:19+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Thai <th@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-12-13 05:52+0000\n"
|
||||
"X-Generator: Launchpad (build 16869)\n"
|
||||
|
||||
#. module: sale_mrp
|
||||
#: model:ir.model,name:sale_mrp.model_mrp_production
|
||||
msgid "Manufacturing Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_mrp
|
||||
#: help:mrp.production,sale_name:0
|
||||
msgid "Indicate the name of sales order."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_mrp
|
||||
#: help:mrp.production,sale_ref:0
|
||||
msgid "Indicate the Customer Reference from sales order."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_mrp
|
||||
#: field:mrp.production,sale_ref:0
|
||||
msgid "Sale Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_mrp
|
||||
#: field:mrp.production,sale_name:0
|
||||
msgid "Sale Name"
|
||||
msgstr ""
|
|
@ -2106,7 +2106,7 @@ class stock_move(osv.osv):
|
|||
})
|
||||
new_moves.append(self.browse(cr, uid, [new_id])[0])
|
||||
if pickid:
|
||||
self.signal_button_confirm(cr, uid, [pickid])
|
||||
self.pool.get('stock.picking').signal_button_confirm(cr, uid, [pickid])
|
||||
if new_moves:
|
||||
new_moves += self.create_chained_picking(cr, uid, new_moves, context)
|
||||
return new_moves
|
||||
|
|
|
@ -1044,7 +1044,7 @@
|
|||
<button name="action_process" states="assigned" string="Receive" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="replace">
|
||||
<field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Supplier" domain="[('supplier','=',True)]" />
|
||||
<field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Supplier" domain="[('supplier','=',True)]" context="{'default_supplier':1,'default_customer':0}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='move_lines']" position="replace">
|
||||
<field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
|
||||
|
|
|
@ -10,7 +10,7 @@ OpenERP Web LinkedIn module.
|
|||
This module provides the Integration of the LinkedIn with OpenERP.
|
||||
""",
|
||||
'data': ['web_linkedin_view.xml'],
|
||||
'depends' : ['crm'],
|
||||
'depends' : ['web','crm'],
|
||||
'js': ['static/src/js/*.js'],
|
||||
'css': ['static/src/css/*.css'],
|
||||
'qweb': ['static/src/xml/*.xml'],
|
||||
|
|
|
@ -24,6 +24,7 @@ import urllib2
|
|||
from urlparse import urlparse, urlunparse
|
||||
|
||||
import openerp
|
||||
import openerp.addons.web
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
class Binary(openerp.http.Controller):
|
||||
|
@ -88,4 +89,4 @@ class web_linkedin_fields(osv.Model):
|
|||
'linkedin_url': fields.char(string="LinkedIn url", size=100, store=True),
|
||||
'linkedin_public_url': fields.function(_get_url, type='text', string="LinkedIn url",
|
||||
help="This url is set automatically when you join the partner with a LinkedIn account."),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue