[MERGE] from trunk
bzr revid: fva@openerp.com-20120925141057-3r9wkxo1y6y5sas9
This commit is contained in:
@@ -601,7 +601,7 @@ class account_account(osv.osv):
|
||||
if not default:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default['code'] = (account['code'] or '') + '(copy)'
|
||||
default.update(code=_("%s (copy)") % (account['code'] or ''))
|
||||
if not local:
|
||||
done_list = []
|
||||
if account.id in done_list:
|
||||
@@ -782,9 +782,10 @@ class account_journal(osv.osv):
|
||||
if not default:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default['code'] = (journal['code'] or '') + '(copy)'
|
||||
default['name'] = (journal['name'] or '') + '(copy)'
|
||||
default['sequence_id'] = False
|
||||
default.update(
|
||||
code=_("%s (copy)") % (journal['code'] or ''),
|
||||
name=_("%s (copy)") % (journal['name'] or ''),
|
||||
sequence_id=False)
|
||||
return super(account_journal, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
|
||||
@@ -447,11 +447,13 @@ class account_bank_statement(osv.osv):
|
||||
return self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
|
||||
def _compute_balance_end_real(self, cr, uid, journal_id, context=None):
|
||||
cr.execute('SELECT balance_end_real \
|
||||
FROM account_bank_statement \
|
||||
WHERE journal_id = %s AND NOT state = %s \
|
||||
ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft'))
|
||||
res = cr.fetchone()
|
||||
res = False
|
||||
if journal_id:
|
||||
cr.execute('SELECT balance_end_real \
|
||||
FROM account_bank_statement \
|
||||
WHERE journal_id = %s AND NOT state = %s \
|
||||
ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft'))
|
||||
res = cr.fetchone()
|
||||
return res and res[0] or 0.0
|
||||
|
||||
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context=None):
|
||||
|
||||
@@ -122,6 +122,14 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="data_account_type_income"/>
|
||||
</record>
|
||||
<record id="usd_bnk" model="account.account">
|
||||
<field name="code">X11007</field>
|
||||
<field name="name">USD Bank Account - (test)</field>
|
||||
<field ref="cas" name="parent_id"/>
|
||||
<field name="type">liquidity</field>
|
||||
<field name="user_type" ref="data_account_type_asset"/>
|
||||
<field name="currency_id" ref="base.USD"/>
|
||||
</record>
|
||||
|
||||
<record model="account.account" id="liabilities_view">
|
||||
<field name="name">Liabilities - (test)</field>
|
||||
@@ -360,8 +368,8 @@
|
||||
<field name="type">bank</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_bank_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="cash"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="bnk"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="bnk"/>
|
||||
<field name="analytic_journal_id" ref="sit"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
@@ -384,7 +392,12 @@
|
||||
<field name="loss_account_id" model="account.account" ref="rsa" />
|
||||
<field name="internal_account_id" model="account.account" ref="rsa" />
|
||||
<field name="with_last_closing_balance" eval="True" />
|
||||
<field name="cash_control" eval="True" />
|
||||
<!--
|
||||
Usually, cash payment methods requires a control at opening and closing.
|
||||
Bot for demo data, it's better to avoid the control step so that people
|
||||
that test OpenERP arrive directly in the touchscreen UI.
|
||||
-->
|
||||
<field name="cash_control" eval="False"/>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_cash_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
||||
@@ -412,6 +425,16 @@
|
||||
<field eval="True" name="centralisation"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
||||
<record id="bank_journal_usd" model="account.journal">
|
||||
<field name="name">USD Bank Journal - (test)</field>
|
||||
<field name="code">TUBK</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
|
||||
<field name="currency" ref="base.USD"/>
|
||||
</record>
|
||||
<!--
|
||||
Product income and expense accounts, default parameters
|
||||
-->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp><data>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="group_account_invoice" model="res.groups">
|
||||
<field name="name">Invoicing & Payments</field>
|
||||
@@ -7,11 +8,13 @@
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_account_user" model="res.groups">
|
||||
<field name="name">Accountant</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
<field name="implied_ids" eval="[(4, ref('group_account_invoice'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_account_manager" model="res.groups">
|
||||
<field name="name">Manager</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
@@ -25,100 +28,107 @@
|
||||
|
||||
<record id="account_move_comp_rule" model="ir.rule">
|
||||
<field name="name">Account Entry</field>
|
||||
<field ref="model_account_move" name="model_id"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_move"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="account_move_line_comp_rule" model="ir.rule">
|
||||
<field name="name">Entry lines</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_move_line"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="name">Entry lines</field>
|
||||
<field name="model_id" ref="model_account_move_line"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="journal_period_comp_rule" model="ir.rule">
|
||||
<field name="name">Journal Period</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_journal_period"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_journal_period"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="journal_comp_rule" model="ir.rule">
|
||||
<field name="name">Journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_journal"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="analytic_journal_comp_rule" model="ir.rule">
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_analytic_journal"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="period_comp_rule" model="ir.rule">
|
||||
<field name="name">Period multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_period"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_period"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_year_comp_rule" model="ir.rule">
|
||||
<field name="name">Fiscal year multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_fiscalyear"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_fiscalyear"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="account_comp_rule" model="ir.rule">
|
||||
<field name="name">Account multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_account"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_account"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_comp_rule" model="ir.rule">
|
||||
<field name="name">Tax multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_tax"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="name">Tax multi-company</field>
|
||||
<field name="model_id" ref="model_account_tax"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_code_comp_rule" model="ir.rule">
|
||||
<field name="name">Tax code multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_tax_code"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_tax_code"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="invoice_comp_rule" model="ir.rule">
|
||||
<field name="name">Invoice multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_invoice"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_invoice"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="invoice_analysis_comp_rule" model="ir.rule">
|
||||
<field name="name">Invoice Analysis multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_invoice_report"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_invoice_report"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="entry_analysis_comp_rule" model="ir.rule">
|
||||
<field name="name">Entries Analysis multi-company</field>
|
||||
<field name="model_id" ref="model_account_entries_report"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_comp_rule" model="ir.rule">
|
||||
<field name="name">Account fiscal Mapping company rule</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_fiscal_position"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_fiscal_position"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="account_model_comp_rule" model="ir.rule">
|
||||
<field name="name">Account model company rule</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_model"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="model_id" ref="model_account_model"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
@@ -143,4 +153,5 @@
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
</data></openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -223,9 +223,10 @@ class account_analytic_account(osv.osv):
|
||||
if not default:
|
||||
default = {}
|
||||
analytic = self.browse(cr, uid, id, context=context)
|
||||
default['code'] = False
|
||||
default['line_ids'] = []
|
||||
default['name'] = analytic['name'] + ' (' + _('copy') + ')'
|
||||
default.update(
|
||||
code=False,
|
||||
line_ids=[],
|
||||
name=_("%s (copy)") % (analytic['name']))
|
||||
return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def on_change_company(self, cr, uid, id, company_id):
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
'name': 'Calendar',
|
||||
'version': '1.0',
|
||||
'depends': ['base', 'base_status', 'mail', 'base_action_rule'],
|
||||
'summary': 'Personnal & Shared Agenda',
|
||||
'description': """
|
||||
This is a full-featured calendar system.
|
||||
========================================
|
||||
@@ -30,7 +31,6 @@ This is a full-featured calendar system.
|
||||
It supports:
|
||||
------------
|
||||
- Calendar of events
|
||||
- Alerts (create requests)
|
||||
- Recurring events
|
||||
- Invitations to people
|
||||
|
||||
|
||||
@@ -996,7 +996,7 @@ class calendar_event(osv.osv):
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}),
|
||||
'date': fields.datetime('Date', states={'done': [('readonly', True)]}, required=True,),
|
||||
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}, required=True,),
|
||||
'date_deadline': fields.datetime('End Date', states={'done': [('readonly', True)]}, required=True,),
|
||||
'create_date': fields.datetime('Created', readonly=True),
|
||||
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
|
||||
'description': fields.text('Description', states={'done': [('readonly', True)]}),
|
||||
|
||||
@@ -428,6 +428,5 @@
|
||||
name="Events" parent="base.menu_calendar_configuration"
|
||||
sequence="15" action="action_view_event"/>
|
||||
|
||||
<menuitem name="Agenda" id="mail_menu_agenda" parent="mail.mail_my_stuff" sequence="10" action="action_view_event"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -87,36 +87,38 @@
|
||||
<page string="Meeting Detail">
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="date" string="Starting at"/>
|
||||
<label for="duration" attrs="{'invisible': [('allday','=',True)]}"/>
|
||||
<div attrs="{'invisible': [('allday','=',True)]}">
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)"
|
||||
class="oe_inline"/> hours
|
||||
(<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_inline"/>
|
||||
<label for="allday" string="All Day?"/>)
|
||||
</div>
|
||||
<field name="date_deadline" groups="base.group_no_one"
|
||||
attrs="{'invisible': [('allday','=',True)]}"
|
||||
on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="user_id" groups="base.group_no_one"/>
|
||||
<field name="categ_ids" widget="many2many_tags"/>
|
||||
<field name="location"/>
|
||||
<field name="organizer" groups="base.group_no_one"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<label for="description"/>
|
||||
<field name="description"/>
|
||||
</page>
|
||||
<page string="Options">
|
||||
<group>
|
||||
<group>
|
||||
<label for="date" string="Starting at"/>
|
||||
<div>
|
||||
<field name="date"/>
|
||||
<span attrs="{'invisible': [('allday','=',True)]}">
|
||||
(<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)"
|
||||
class="oe_inline"/> hours)
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<label for="date_deadline" />
|
||||
<div>
|
||||
<field name="date_deadline"
|
||||
string="End Date" attrs="{'invisible': [('allday','=',True)]}"
|
||||
on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
(<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_inline"/>
|
||||
<label for="allday" string="All Day?"/>)
|
||||
</div>
|
||||
<field name="recurrency"
|
||||
attrs="{'readonly': [('recurrent_uid','!=',False)]}"/>
|
||||
<field name="recurrency"
|
||||
attrs="{'readonly': [('recurrent_uid','!=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="alarm_id" widget="selection" />
|
||||
<field name="alarm_id" widget="selection" groups="base.group_no_one"/>
|
||||
<field name="class"/>
|
||||
<field name="show_as"/>
|
||||
<field name="rrule" invisible="1" readonly="1"/>
|
||||
@@ -136,7 +138,7 @@
|
||||
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}" class="oe_inline"/>
|
||||
</div>
|
||||
<label string="Select Weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}"/>
|
||||
<group col="4" colspan="1" name="weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
|
||||
<group col="2" colspan="1" name="weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
|
||||
<field name="mo" />
|
||||
<field name="tu" />
|
||||
<field name="we" />
|
||||
@@ -162,8 +164,6 @@
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<label for="description"/>
|
||||
<field name="description"/>
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
@@ -339,7 +339,11 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_crm_meeting" parent="base.menu_sales" sequence="8"
|
||||
name="Meetings" action="action_crm_meeting"/>
|
||||
name="Agenda" action="action_crm_meeting"/>
|
||||
|
||||
<menuitem name="Agenda"
|
||||
id="mail_menu_agenda" parent="mail.mail_my_stuff"
|
||||
sequence="10" action="action_crm_meeting"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -209,7 +209,7 @@ class document_file(osv.osv):
|
||||
default = {}
|
||||
if 'name' not in default:
|
||||
name = self.read(cr, uid, [id], ['name'])[0]['name']
|
||||
default.update({'name': name + " " + _("(copy)")})
|
||||
default.update(name=_("%s (copy)") % (name))
|
||||
return super(document_file, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
|
||||
@@ -231,7 +231,7 @@ class document_directory(osv.osv):
|
||||
if not default:
|
||||
default ={}
|
||||
name = self.read(cr, uid, [id])[0]['name']
|
||||
default.update({'name': name+ " (copy)"})
|
||||
default.update(name=_("%s (copy)") % (name))
|
||||
return super(document_directory,self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _check_duplication(self, cr, uid, vals, ids=[], op='create'):
|
||||
|
||||
@@ -215,7 +215,10 @@ class email_template(osv.osv):
|
||||
if default is None:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default['name'] = template.name + _('(copy)')
|
||||
default.update(
|
||||
name=_("%s (copy)") % (template.name),
|
||||
ref_ir_act_window=False,
|
||||
ref_ir_value=False)
|
||||
return super(email_template, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def build_expression(self, field_name, sub_field_name, null_value):
|
||||
@@ -335,7 +338,7 @@ class email_template(osv.osv):
|
||||
:param bool force_send: if True, the generated mail.message is
|
||||
immediately sent after being created, as if the scheduler
|
||||
was executed for this message only.
|
||||
:returns: id of the mail.message that was created
|
||||
:returns: id of the mail.message that was created
|
||||
"""
|
||||
if context is None: context = {}
|
||||
mail_mail = self.pool.get('mail.mail')
|
||||
|
||||
@@ -81,10 +81,9 @@ class hr_payroll_structure(osv.osv):
|
||||
"""
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({
|
||||
'code': self.browse(cr, uid, id, context=context).code + "(copy)",
|
||||
'company_id': self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
|
||||
})
|
||||
default.update(
|
||||
code=_("%s (copy)") % (self.browse(cr, uid, id, context=context).code),
|
||||
company_id=self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id)
|
||||
return super(hr_payroll_structure, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def get_all_rules(self, cr, uid, structure_ids, context=None):
|
||||
@@ -305,7 +304,7 @@ class hr_payslip(osv.osv):
|
||||
return False
|
||||
return True
|
||||
|
||||
_constraints = [(_check_dates, "Payslip 'Date From' must be before 'Date To'.", ['date_from', 'date_to'])]
|
||||
_constraints = [(_check_dates, "Payslip 'Date From' must be before 'Date To'.", ['date_from', 'date_to'])]
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if not default:
|
||||
@@ -851,7 +850,7 @@ result = rules.NET > categories.NET * 0.10''',
|
||||
"""
|
||||
:param rule_id: id of rule to compute
|
||||
:param localdict: dictionary containing the environement in which to compute the rule
|
||||
:return: returns a tuple build as the base/amount computed, the quantity and the rate
|
||||
:return: returns a tuple build as the base/amount computed, the quantity and the rate
|
||||
:rtype: (float, float, float)
|
||||
"""
|
||||
rule = self.browse(cr, uid, rule_id, context=context)
|
||||
|
||||
@@ -57,7 +57,7 @@ Wizards provided by this module:
|
||||
'base_vat',
|
||||
'base_iban',
|
||||
'account_chart',
|
||||
'account_coda',
|
||||
'l10n_be_coda',
|
||||
],
|
||||
'data': [
|
||||
'account_financial_report.xml',
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import account_coda
|
||||
import l10n_be_coda
|
||||
import wizard
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -93,14 +93,14 @@ If required, you can manually adjust the descriptions via the CODA configuration
|
||||
'depends': ['account_voucher','base_iban', 'l10n_be_invoice_bba', 'account_bank_statement_extensions'],
|
||||
'demo': [],
|
||||
'data': [
|
||||
'account_coda_trans_type.xml',
|
||||
'account_coda_trans_code.xml',
|
||||
'account_coda_trans_category.xml',
|
||||
'account_coda_comm_type.xml',
|
||||
'l10n_be_coda_trans_type.xml',
|
||||
'l10n_be_coda_trans_code.xml',
|
||||
'l10n_be_coda_trans_category.xml',
|
||||
'l10n_be_coda_comm_type.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/account_security.xml',
|
||||
'account_coda_wizard.xml',
|
||||
'account_coda_view.xml',
|
||||
'l10n_be_coda_wizard.xml',
|
||||
'l10n_be_coda_view.xml',
|
||||
],
|
||||
'auto_install': False,
|
||||
'installable': True,
|
||||
@@ -107,11 +107,12 @@ class coda_bank_account(osv.osv):
|
||||
if not default:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default.update({'journal_id': None})
|
||||
default['description1'] = cba['description1'] or ''
|
||||
default['description2'] = cba['description2'] or ''
|
||||
default['name'] = (cba['name'] or '') + ' (copy)'
|
||||
default['state'] = cba['state']
|
||||
default.update(
|
||||
journal_id=None,
|
||||
description1=cba['description1'] or '',
|
||||
description2=cba['description2'] or '',
|
||||
name=_("%s (copy)") % (cba['name'] or ''),
|
||||
state=cba['state'])
|
||||
return super(coda_bank_account, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def onchange_state(self, cr, uid, ids, state):
|
||||
+5
-5
@@ -942,7 +942,7 @@ class account_coda_import(osv.osv_memory):
|
||||
def action_open_coda_statements(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
module, xml_id = 'account_coda', 'action_coda_bank_statements'
|
||||
module, xml_id = 'l10n_be_coda', 'action_coda_bank_statements'
|
||||
res_model, res_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, module, xml_id)
|
||||
action = self.pool.get('ir.actions.act_window').read(cr, uid, res_id, context=context)
|
||||
domain = eval(action.get('domain') or '[]')
|
||||
@@ -973,9 +973,9 @@ def str2float(str):
|
||||
return 0.0
|
||||
|
||||
def list2float(lst):
|
||||
try:
|
||||
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
|
||||
except:
|
||||
return 0.0
|
||||
try:
|
||||
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
|
||||
except:
|
||||
return 0.0
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -19,6 +19,7 @@
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="update_posted" eval="True" />
|
||||
<field name="entry_posted" eval="True" />
|
||||
<field name="currency" model="res.currency" ref="base.CHF" />
|
||||
</record>
|
||||
|
||||
<record id="bank_euro_journal" model="account.journal">
|
||||
|
||||
@@ -33,7 +33,6 @@ Accounting chart and localization for Ecuador.
|
||||
'base_vat',
|
||||
'base_iban',
|
||||
'account_chart',
|
||||
'account_coda',
|
||||
],
|
||||
'data': [
|
||||
'account_tax_code.xml',
|
||||
|
||||
@@ -49,9 +49,9 @@ class account_bilan_report(osv.osv_memory):
|
||||
data = {}
|
||||
data['form'] = {}
|
||||
data['ids'] = active_ids
|
||||
data['form']['fiscalyear'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
|
||||
data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'l10n.fr.bilan', 'datas': data}
|
||||
|
||||
account_bilan_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -49,9 +49,9 @@ class account_cdr_report(osv.osv_memory):
|
||||
data = {}
|
||||
data['form'] = {}
|
||||
data['ids'] = active_ids
|
||||
data['form']['fiscalyear'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
|
||||
data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id
|
||||
return { 'type': 'ir.actions.report.xml', 'report_name': 'l10n.fr.compute_resultant', 'datas': data}
|
||||
|
||||
account_cdr_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -23,7 +23,7 @@ import openerp
|
||||
import openerp.tools as tools
|
||||
from osv import osv
|
||||
from osv import fields
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
|
||||
class mail_group(osv.Model):
|
||||
""" A mail_group is a collection of users sharing messages in a discussion
|
||||
@@ -116,7 +116,10 @@ class mail_group(osv.Model):
|
||||
model_name=self._name, context=context)
|
||||
vals['alias_id'] = alias_id
|
||||
|
||||
mail_group_id = super(mail_group, self).create(cr, uid, vals, context)
|
||||
#check access rights for the current user, then create as SUPERUSER because the object inherits
|
||||
#ir.ui.menu (for which normal users do not have creation rights)
|
||||
self.check_access_rights(cr, uid, 'create')
|
||||
mail_group_id = super(mail_group, self).create(cr, SUPERUSER_ID, vals, context=context)
|
||||
|
||||
# Create client action for this group and link the menu to it
|
||||
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'mail', 'action_mail_group_feeds')
|
||||
@@ -130,8 +133,8 @@ class mail_group(osv.Model):
|
||||
'thread_level': 1,
|
||||
}
|
||||
cobj = self.pool.get('ir.actions.client')
|
||||
newref = cobj.copy(cr, uid, ref[1], default={'params': str(params), 'name': vals['name']}, context=context)
|
||||
self.write(cr, uid, [mail_group_id], {'action': 'ir.actions.client,' + str(newref), 'mail_group_id': mail_group_id}, context=context)
|
||||
newref = cobj.copy(cr, SUPERUSER_ID, ref[1], default={'params': str(params), 'name': vals['name']}, context=context)
|
||||
self.write(cr, SUPERUSER_ID, [mail_group_id], {'action': 'ir.actions.client,' + str(newref), 'mail_group_id': mail_group_id}, context=context)
|
||||
|
||||
mail_alias.write(cr, uid, [vals['alias_id']], {"alias_force_thread_id": mail_group_id}, context)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="oe_edit_only">
|
||||
<label for="name" string="Group Name"/>
|
||||
</div>
|
||||
<h1><field name="name"/></h1>
|
||||
<h1><field name="name" readonly="0"/></h1>
|
||||
<div name="alias_box" colspan="4" attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<field name="alias_id" invisible="1" required="0"/>
|
||||
<label for="alias_name" class="oe_edit_only"/>
|
||||
|
||||
+1
-1
@@ -356,7 +356,7 @@ class mrp_bom(osv.osv):
|
||||
if default is None:
|
||||
default = {}
|
||||
bom_data = self.read(cr, uid, id, [], context=context)
|
||||
default.update({'name': bom_data['name'] + ' ' + _('Copy'), 'bom_id':False})
|
||||
default.update(name=_("%s (copy)") % (bom_data['name']), bom_id=False)
|
||||
return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
|
||||
@@ -863,6 +863,8 @@
|
||||
<form string="Point of Sale Session" version="7.0">
|
||||
<header>
|
||||
<button name="open" type="workflow" string="Validate & Open Session" states="opening_control" class="oe_highlight"/>
|
||||
<button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"
|
||||
class="oe_highlight"/>
|
||||
<button name="cashbox_control" type="workflow" string="End of Session"
|
||||
attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', '!=', 'opened')]}"
|
||||
class="oe_highlight" />
|
||||
@@ -871,7 +873,6 @@
|
||||
class="oe_highlight" />
|
||||
<button name="close" type="workflow" string="Validate Closing & Post Entries" states="closing_control"
|
||||
class="oe_highlight" />
|
||||
<button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"/>
|
||||
<div class="oe_right">
|
||||
<field name="state" widget="statusbar" statusbar_visible="opening_control,opened,closing_control,closed" nolabel="1" />
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<record id="portal_stock_picking_user_rule" model="ir.rule">
|
||||
<field name="name">Portal Personal Delivery Orders</field>
|
||||
<field ref="stock.model_stock_picking" name="model_id"/>
|
||||
<field name="model_id" ref="stock.model_stock_picking"/>
|
||||
<field name="domain_force">[('partner_id','child_of',[user.partner_id.id])]</field>
|
||||
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
|
||||
</record>
|
||||
|
||||
@@ -727,7 +727,7 @@ class product_product(osv.osv):
|
||||
context_wo_lang.pop('lang', None)
|
||||
product = self.read(cr, uid, id, ['name'], context=context_wo_lang)
|
||||
default = default.copy()
|
||||
default['name'] = product['name'] + ' (' + _('copy') + ')'
|
||||
default.update(name=_("%s (copy)") % (product['name']))
|
||||
|
||||
if context.get('variant',False):
|
||||
fields = ['product_tmpl_id', 'active', 'variants', 'default_code',
|
||||
|
||||
@@ -323,7 +323,7 @@ class project(osv.osv):
|
||||
default.pop('alias_id', None)
|
||||
proj = self.browse(cr, uid, id, context=context)
|
||||
if not default.get('name', False):
|
||||
default['name'] = proj.name + _(' (copy)')
|
||||
default.update(name=_("%s (copy)") % (proj.name))
|
||||
res = super(project, self).copy(cr, uid, id, default, context)
|
||||
self.map_tasks(cr,uid,id,res,context)
|
||||
return res
|
||||
@@ -344,7 +344,7 @@ class project(osv.osv):
|
||||
new_date_end = (datetime(*time.strptime(new_date_start,'%Y-%m-%d')[:3])+(end_date-start_date)).strftime('%Y-%m-%d')
|
||||
context.update({'copy':True})
|
||||
new_id = self.copy(cr, uid, proj.id, default = {
|
||||
'name': proj.name +_(' (copy)'),
|
||||
'name':_("%s (copy)") % (proj.name),
|
||||
'state':'open',
|
||||
'date_start':new_date_start,
|
||||
'date':new_date_end,
|
||||
@@ -694,7 +694,7 @@ class task(base_stage, osv.osv):
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name or ''
|
||||
if not context.get('copy',False):
|
||||
new_name = _("%s (copy)")%default.get('name','')
|
||||
new_name = _("%s (copy)") % (default.get('name', ''))
|
||||
default.update({'name':new_name})
|
||||
return super(task, self).copy_data(cr, uid, id, default, context)
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ class project_issue(base_stage, osv.osv):
|
||||
if not default:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default['name'] = issue['name'] + _(' (copy)')
|
||||
default.update(name=_('%s (copy)') % (issue['name']))
|
||||
return super(project_issue, self).copy(cr, uid, id, default=default,
|
||||
context=context)
|
||||
|
||||
@@ -534,7 +534,7 @@ class project(osv.osv):
|
||||
|
||||
def _get_alias_models(self, cr, uid, context=None):
|
||||
return [('project.task', "Tasks"), ("project.issue", "Issues")]
|
||||
|
||||
|
||||
def _issue_count(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = dict.fromkeys(ids, 0)
|
||||
issue_ids = self.pool.get('project.issue').search(cr, uid, [('project_id', 'in', ids)])
|
||||
@@ -557,7 +557,7 @@ class project(osv.osv):
|
||||
_constraints = [
|
||||
(_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id'])
|
||||
]
|
||||
|
||||
|
||||
project()
|
||||
|
||||
class account_analytic_account(osv.osv):
|
||||
|
||||
@@ -138,7 +138,7 @@ class project_phase(osv.osv):
|
||||
if default is None:
|
||||
default = {}
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)')
|
||||
default.update(name=_('%s (copy)') % (self.browse(cr, uid, id, context=context).name))
|
||||
return super(project_phase, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def set_draft(self, cr, uid, ids, *args):
|
||||
@@ -227,7 +227,7 @@ class project(osv.osv):
|
||||
'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"),
|
||||
'phase_count': fields.function(_phase_count, type='integer', string="Open Phases"),
|
||||
}
|
||||
|
||||
|
||||
def schedule_phases(self, cr, uid, ids, context=None):
|
||||
context = context or {}
|
||||
if type(ids) in (long, int,):
|
||||
@@ -250,7 +250,7 @@ class project(osv.osv):
|
||||
# Maybe it's better to update than unlink/create if it already exists ?
|
||||
p = getattr(project_gantt, 'Phase_%d' % (phase.id,))
|
||||
|
||||
self.pool.get('project.user.allocation').unlink(cr, uid,
|
||||
self.pool.get('project.user.allocation').unlink(cr, uid,
|
||||
[x.id for x in phase.user_ids],
|
||||
context=context
|
||||
)
|
||||
|
||||
+24
-24
@@ -45,24 +45,24 @@ class resource_calendar(osv.osv):
|
||||
def working_hours_on_day(self, cr, uid, resource_calendar_id, day, context=None):
|
||||
"""Calculates the Working Total Hours based on Resource Calendar and
|
||||
given working day (datetime object).
|
||||
|
||||
|
||||
@param resource_calendar_id: resource.calendar browse record
|
||||
@param day: datetime object
|
||||
|
||||
|
||||
@return: returns the working hours (as float) men should work on the given day if is in the attendance_ids of the resource_calendar_id (i.e if that day is a working day), returns 0.0 otherwise
|
||||
"""
|
||||
res = 0.0
|
||||
for working_day in resource_calendar_id.attendance_ids:
|
||||
if (int(working_day.dayofweek) + 1) == day.isoweekday():
|
||||
res += working_day.hour_to - working_day.hour_from
|
||||
return res
|
||||
return res
|
||||
|
||||
def _get_leaves(self, cr, uid, id, resource):
|
||||
"""Private Method to Calculate resource Leaves days
|
||||
|
||||
"""Private Method to Calculate resource Leaves days
|
||||
|
||||
@param id: resource calendar id
|
||||
@param resource: resource id for which leaves will ew calculated
|
||||
|
||||
@param resource: resource id for which leaves will ew calculated
|
||||
|
||||
@return : returns the list of dates, where resource on leave in
|
||||
resource.calendar.leaves object (e.g.['%Y-%m-%d', '%Y-%m-%d'])
|
||||
"""
|
||||
@@ -85,9 +85,9 @@ class resource_calendar(osv.osv):
|
||||
"""
|
||||
Calculates the working Schedule from supplied from date to till hours
|
||||
will be satisfied based or resource calendar id. If resource is also
|
||||
given then it will consider the resource leave also and than will
|
||||
given then it will consider the resource leave also and than will
|
||||
calculates resource working schedule
|
||||
|
||||
|
||||
@param dt_from: datetime object, start of working scheduled
|
||||
@param hours: float, total number working hours needed scheduled from
|
||||
start date
|
||||
@@ -187,29 +187,29 @@ class resource_calendar(osv.osv):
|
||||
|
||||
def interval_get(self, cr, uid, id, dt_from, hours, resource=False, byday=True):
|
||||
"""Calculates Resource Working Internal Timing Based on Resource Calendar.
|
||||
|
||||
|
||||
@param dt_from: start resource schedule calculation.
|
||||
@param hours : total number of working hours to be scheduled.
|
||||
@param resource: optional resource id, If supplied it will take care of
|
||||
@param resource: optional resource id, If supplied it will take care of
|
||||
resource leave while scheduling.
|
||||
@param byday: boolean flag bit enforce day wise scheduling
|
||||
|
||||
|
||||
@return : list of scheduled working timing based on resource calendar.
|
||||
"""
|
||||
res = self.interval_get_multi(cr, uid, [(dt_from.strftime('%Y-%m-%d %H:%M:%S'), hours, id)], resource, byday)[(dt_from.strftime('%Y-%m-%d %H:%M:%S'), hours, id)]
|
||||
return res
|
||||
|
||||
def interval_hours_get(self, cr, uid, id, dt_from, dt_to, resource=False):
|
||||
""" Calculates the Total Working hours based on given start_date to
|
||||
end_date, If resource id is supplied that it will consider the source
|
||||
""" Calculates the Total Working hours based on given start_date to
|
||||
end_date, If resource id is supplied that it will consider the source
|
||||
leaves also in calculating the hours.
|
||||
|
||||
|
||||
@param dt_from : date start to calculate hours
|
||||
@param dt_end : date end to calculate hours
|
||||
@param resource: optional resource id, If given resource leave will be
|
||||
considered.
|
||||
|
||||
@return : Total number of working hours based dt_from and dt_end and
|
||||
considered.
|
||||
|
||||
@return : Total number of working hours based dt_from and dt_end and
|
||||
resource if supplied.
|
||||
"""
|
||||
if not id:
|
||||
@@ -257,7 +257,7 @@ resource_calendar()
|
||||
class resource_calendar_attendance(osv.osv):
|
||||
_name = "resource.calendar.attendance"
|
||||
_description = "Work Detail"
|
||||
|
||||
|
||||
_columns = {
|
||||
'name' : fields.char("Name", size=64, required=True),
|
||||
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of Week', required=True, select=True),
|
||||
@@ -266,9 +266,9 @@ class resource_calendar_attendance(osv.osv):
|
||||
'hour_to' : fields.float("Work to", required=True),
|
||||
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True),
|
||||
}
|
||||
|
||||
|
||||
_order = 'dayofweek, hour_from'
|
||||
|
||||
|
||||
_defaults = {
|
||||
'dayofweek' : '0'
|
||||
}
|
||||
@@ -302,12 +302,12 @@ class resource_resource(osv.osv):
|
||||
'company_id': lambda self, cr, uid, context: self.pool.get('res.company')._company_default_get(cr, uid, 'resource.resource', context=context)
|
||||
}
|
||||
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)')
|
||||
default.update(name=_('%s (copy)') % (self.browse(cr, uid, id, context=context).name))
|
||||
return super(resource_resource, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def generate_resources(self, cr, uid, user_ids, calendar_id, context=None):
|
||||
@@ -368,7 +368,7 @@ class resource_resource(osv.osv):
|
||||
"""
|
||||
if not calendar_id:
|
||||
# Calendar is not specified: working days: 24/7
|
||||
return [('fri', '8:0-12:0','13:0-17:0'), ('thu', '8:0-12:0','13:0-17:0'), ('wed', '8:0-12:0','13:0-17:0'),
|
||||
return [('fri', '8:0-12:0','13:0-17:0'), ('thu', '8:0-12:0','13:0-17:0'), ('wed', '8:0-12:0','13:0-17:0'),
|
||||
('mon', '8:0-12:0','13:0-17:0'), ('tue', '8:0-12:0','13:0-17:0')]
|
||||
resource_attendance_pool = self.pool.get('resource.calendar.attendance')
|
||||
time_range = "8:00-8:00"
|
||||
|
||||
@@ -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-02-08 01:37+0100\n"
|
||||
"PO-Revision-Date: 2012-05-10 17:48+0000\n"
|
||||
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-09-24 13:55+0000\n"
|
||||
"Last-Translator: Erwin <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-28 05:56+0000\n"
|
||||
"X-Generator: Launchpad (build 15864)\n"
|
||||
"X-Launchpad-Export-Date: 2012-09-25 04:44+0000\n"
|
||||
"X-Generator: Launchpad (build 16019)\n"
|
||||
|
||||
#. module: stock
|
||||
#: field:product.product,track_outgoing:0
|
||||
@@ -1179,7 +1179,7 @@ msgstr "Auteur"
|
||||
#: code:addons/stock/stock.py:1332
|
||||
#, python-format
|
||||
msgid "Delivery Order"
|
||||
msgstr "Leveringsbon"
|
||||
msgstr "Uitgaande levering"
|
||||
|
||||
#. module: stock
|
||||
#: selection:stock.location,chained_auto_packing:0
|
||||
@@ -1791,7 +1791,7 @@ msgstr "Voorraadwaarde rekening (inkomend)"
|
||||
#. module: stock
|
||||
#: model:stock.location,name:stock.stock_location_14
|
||||
msgid "Shelf 2"
|
||||
msgstr "Schap 2"
|
||||
msgstr "Plank 2"
|
||||
|
||||
#. module: stock
|
||||
#: field:stock.report.tracklots,tracking_id:0
|
||||
|
||||
@@ -709,6 +709,15 @@ class stock_picking(osv.osv):
|
||||
for move in picking_obj.move_lines:
|
||||
move_obj.write(cr, uid, [move.id], {'tracking_id': False,'prodlot_id':False, 'move_history_ids2': [(6, 0, [])], 'move_history_ids': [(6, 0, [])]})
|
||||
return res
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
|
||||
if view_type == 'form' and not view_id:
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
if self._name == "stock.picking.in":
|
||||
model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_in_form')
|
||||
if self._name == "stock.picking.out":
|
||||
model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
|
||||
return super(stock_picking,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
def onchange_partner_in(self, cr, uid, context=None, partner_id=None):
|
||||
return {}
|
||||
@@ -2950,6 +2959,7 @@ class stock_picking_in(osv.osv):
|
||||
return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
|
||||
|
||||
_columns = {
|
||||
'backorder_id': fields.many2one('stock.picking.in', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
|
||||
'state': fields.selection(
|
||||
[('draft', 'Draft'),
|
||||
('auto', 'Waiting Another Operation'),
|
||||
@@ -2994,6 +3004,7 @@ class stock_picking_out(osv.osv):
|
||||
return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
|
||||
|
||||
_columns = {
|
||||
'backorder_id': fields.many2one('stock.picking.out', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
|
||||
'state': fields.selection(
|
||||
[('draft', 'Draft'),
|
||||
('auto', 'Waiting Another Operation'),
|
||||
|
||||
@@ -94,7 +94,7 @@ class survey(osv.osv):
|
||||
def copy(self, cr, uid, ids, default=None, context=None):
|
||||
vals = {}
|
||||
current_rec = self.read(cr, uid, ids, context=context)
|
||||
title = current_rec.get('title') + ' (Copy)'
|
||||
title = _("%s (copy)") % (current_rec.get('title'))
|
||||
vals.update({'title':title})
|
||||
vals.update({'history':[],'tot_start_survey':0,'tot_comp_survey':0})
|
||||
return super(survey, self).copy(cr, uid, ids, vals, context=context)
|
||||
@@ -143,7 +143,7 @@ class survey(osv.osv):
|
||||
'nodestroy':True,
|
||||
}
|
||||
return report
|
||||
|
||||
|
||||
def fill_survey(self, cr, uid, ids, context=None):
|
||||
sur_obj = self.read(cr, uid, ids,['title'], context=context)
|
||||
for sur in sur_obj:
|
||||
@@ -232,7 +232,7 @@ class survey_page(osv.osv):
|
||||
def copy(self, cr, uid, ids, default=None, context=None):
|
||||
vals = {}
|
||||
current_rec = self.read(cr, uid, ids, context=context)
|
||||
title = current_rec.get('title') + ' (Copy)'
|
||||
title = _("%s (copy)") % (current_rec.get('title'))
|
||||
vals.update({'title':title})
|
||||
return super(survey_page, self).copy(cr, uid, ids, vals, context=context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user