[Merge]with: lp:openobject-addons

bzr revid: dbr@tinyerp.com-20111118053709-gftm4uarjwi1y0ik
This commit is contained in:
DBR (OpenERP)
2011-11-18 11:07:09 +05:30
32 changed files with 311 additions and 266 deletions
+3
View File
@@ -286,6 +286,9 @@ class account_invoice(osv.osv):
'internal_number': False,
'user_id': lambda s, cr, u, c: u,
}
_sql_constraints = [
('number_uniq', 'unique(number, company_id)', 'Invoice Number must be unique per Company!'),
]
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
journal_obj = self.pool.get('account.journal')
+1 -1
View File
@@ -28,7 +28,7 @@ class followup(osv.osv):
'name': fields.char('Name', size=64, required=True),
'description': fields.text('Description'),
'followup_line': fields.one2many('account_followup.followup.line', 'followup_id', 'Follow-Up'),
'company_id': fields.many2one('res.company', 'Company'),
'company_id': fields.many2one('res.company', 'Company', required=True),
}
_defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
@@ -35,45 +35,44 @@ class report_rappel(report_sxw.rml_parse):
'get_text': self._get_text
})
def _ids_to_objects(self, partner_ids):
def _ids_to_objects(self, ids):
pool = pooler.get_pool(self.cr.dbname)
all_partners = []
for partner in pool.get('res.partner').browse(self.cr, self.uid, partner_ids):
if partner not in all_partners:
all_partners.append(partner)
return all_partners
all_lines = []
for line in pool.get('account_followup.stat.by.partner').browse(self.cr, self.uid, ids):
if line not in all_lines:
all_lines.append(line)
return all_lines
def _adr_get(self, partner, type):
def _adr_get(self, stat_line, type):
res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')
adr = res_partner.address_get(self.cr, self.uid, [partner.id], [type])[type]
adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type]
return adr and res_partner_address.read(self.cr, self.uid, [adr]) or [{}]
def _lines_get(self, partner):
def _lines_get(self, stat_by_partner_line):
pool = pooler.get_pool(self.cr.dbname)
moveline_obj = pool.get('account.move.line')
company_obj = pool.get('res.company')
obj_currency = pool.get('res.currency')
#FIXME: search on company accounting entries only
movelines = moveline_obj.search(self.cr, self.uid,
[('partner_id', '=', partner.id),
[('partner_id', '=', stat_by_partner_line.partner_id.id),
('account_id.type', '=', 'receivable'),
('reconcile_id', '=', False), ('state', '<>', 'draft')])
('reconcile_id', '=', False), ('state', '<>', 'draft'),('company_id','=', stat_by_partner_line.company_id.id)])
movelines = moveline_obj.browse(self.cr, self.uid, movelines)
base_currency = movelines[0].company_id.currency_id
final_res = []
line_cur = {base_currency.id: {'line': []}}
for line in movelines:
if line.currency_id and (not line.currency_id.id in line_cur):
line_cur[line.currency_id.id] = {'line': []}
currency = line.currency_id or line.company_id.currency_id
if line.account_id.currency_id and (not line.account_id.currency_id.id in line_cur):
line_cur[line.account_id.currency_id.id] = {'line': []}
currency = line.account_id.currency_id or line.company_id.currency_id
line_data = {
'name': line.move_id.name,
'ref': line.ref,
'date':line.date,
'date_maturity': line.date_maturity,
'balance': line.currency_id and line.amount_currency or (line.debit - line.credit),
'balance': currency.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),
'blocked': line.blocked,
'currency_id': currency.symbol or currency.name,
}
@@ -85,7 +84,7 @@ class report_rappel(report_sxw.rml_parse):
return final_res
def _get_text(self, partner, followup_id, context=None):
def _get_text(self, stat_line, followup_id, context=None):
if context is None:
context = {}
fp_obj = pooler.get_pool(self.cr.dbname).get('account_followup.followup')
@@ -96,10 +95,10 @@ class report_rappel(report_sxw.rml_parse):
li_delay.sort(reverse=True)
text = ""
a = {}
partner_line = pooler.get_pool(self.cr.dbname).get('account.move.line').search(self.cr, self.uid, [('partner_id','=',partner.id),('reconcile_id','=',False)])
partner_line_ids = pooler.get_pool(self.cr.dbname).get('account.move.line').search(self.cr, self.uid, [('partner_id','=',stat_line.partner_id.id),('reconcile_id','=',False),('company_id','=',stat_line.company_id.id)])
partner_delay = []
context.update({'lang': partner.lang})
for i in pooler.get_pool(self.cr.dbname).get('account.move.line').browse(self.cr, self.uid, partner_line, context):
context.update({'lang': stat_line.partner_id.lang})
for i in pooler.get_pool(self.cr.dbname).get('account.move.line').browse(self.cr, self.uid, partner_line_ids, context):
for delay in li_delay:
if i.followup_line_id and str(i.followup_line_id.delay)==str(delay):
text = i.followup_line_id.description
@@ -108,16 +107,16 @@ class report_rappel(report_sxw.rml_parse):
text = partner_delay and a[max(partner_delay)] or ''
if text:
text = text % {
'partner_name': partner.name,
'partner_name': stat_line.partner_id.name,
'date': time.strftime('%Y-%m-%d'),
'company_name': fp_obj.browse(self.cr, self.uid, followup_id).company_id.name,
'company_name': stat_line.company_id.name,
'user_signature': pooler.get_pool(self.cr.dbname).get('res.users').browse(self.cr, self.uid, self.uid, context).signature or '',
}
return text
report_sxw.report_sxw('report.account_followup.followup.print',
'res.partner', 'addons/account_followup/report/account_followup_print.rml',
'account_followup.stat.by.partner', 'addons/account_followup/report/account_followup_print.rml',
parser=report_rappel)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -124,7 +124,7 @@
</stylesheet>
<story>
<para style="terp_default_8">[[ repeatIn(ids_to_objects(data['form']['partner_ids']),'o') ]] </para>
<para style="terp_default_8">[[ setLang(o.lang) ]]</para>
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
<blockTable colWidths="298.0,234.0" style="Tableau2">
<tr>
@@ -132,7 +132,7 @@
<para style="terp_default_9">[[ repeatIn(adr_get(o,'invoice'),'a' )]]</para>
</td>
<td>
<para style="terp_default_9">[[ o.name or '' ]]</para>
<para style="terp_default_9">[[ o.partner_id.name or '' ]]</para>
<para style="terp_default_9">[[ a['street'] or '']]</para>
<para style="terp_default_9">[[ a['street2'] or removeParentNode('para') ]]</para>
<para style="terp_default_9">[[ a['zip'] or '' ]] [[ a['city'] or '' ]]</para>
@@ -141,7 +141,7 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">VAT: [[ o.vat or removeParentNode('para') ]]</para>
<para style="terp_default_9">VAT: [[ o.partner_id.vat or removeParentNode('para') ]]</para>
</td>
</tr>
</blockTable>
@@ -150,7 +150,7 @@
</para>
<para style="terp_default_9">Document : Customer account statement</para>
<para style="terp_default_9">Date : [[ formatLang(data['form']['date'],date=True) ]]</para>
<para style="terp_default_9">Customer Ref : [[ o.ref or '' ]]</para>
<para style="terp_default_9">Customer Ref : [[ o.partner_id.ref or '' ]]</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
@@ -68,7 +68,7 @@ class account_followup_stat(osv.osv):
cr.execute("""
create or replace view account_followup_stat as (
SELECT
l.partner_id as id,
l.id as id,
l.partner_id AS partner_id,
min(l.date) AS date_move,
max(l.date) AS date_move_last,
@@ -105,4 +105,5 @@
self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US',
"active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")],
"tz": False, "date": time.strftime('%Y-%m-%d'), "followup_id": ref("account_followup_followup_testfollowups0"), "active_id": ref("account_followup.account_followup_print_menu"),
"company_id": ref('base.main_company'),
})
@@ -31,7 +31,7 @@ class account_followup_print(osv.osv_memory):
_description = 'Print Followup & Send Mail to Customers'
_columns = {
'date': fields.date('Follow-up Sending Date', required=True, help="This field allow you to select a forecast date to plan your follow-ups"),
'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True)
'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True),
}
def _get_followup(self, cr, uid, context=None):
@@ -51,7 +51,7 @@ class account_followup_print(osv.osv_memory):
data = self.browse(cr, uid, ids, context=context)[0]
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
context.update({'followup_id': data.followup_id.id, 'date':data.date})
context.update({'followup_id': data.followup_id.id, 'date': data.date, 'company_id': data.followup_id.company_id.id})
return {
'name': _('Select Partners'),
'view_type': 'form',
@@ -87,10 +87,13 @@ class account_followup_stat_by_partner(osv.osv):
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_followup_stat_by_partner')
# Here we don't have other choice but to create a virtual ID based on the concatenation
# of the partner_id and the company_id. An assumption that the number of companies will
# not reach 10 000 records is made, what should be enough for a time.
cr.execute("""
create or replace view account_followup_stat_by_partner as (
SELECT
l.partner_id AS id,
l.partner_id * 10000 + l.company_id as id,
l.partner_id AS partner_id,
min(l.date) AS date_move,
max(l.date) AS date_move_last,
@@ -148,6 +151,8 @@ class account_followup_print_all(osv.osv_memory):
context = {}
if ids:
data = self.browse(cr, uid, ids, context=context)[0]
company_id = 'company_id' in context and context['company_id'] or data.company_id.id
cr.execute(
"SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\
"FROM account_move_line AS l "\
@@ -159,7 +164,8 @@ class account_followup_print_all(osv.osv_memory):
"AND (l.partner_id is NOT NULL) "\
"AND (a.active) "\
"AND (l.debit > 0) "\
"ORDER BY l.date")
"AND (l.company_id = %s) "\
"ORDER BY l.date", (company_id,))
move_lines = cr.fetchall()
old = None
fups = {}
@@ -189,16 +195,16 @@ class account_followup_print_all(osv.osv_memory):
continue
if followup_line_id not in fups:
continue
stat_line_id = partner_id * 10000 + company_id
if date_maturity:
if date_maturity <= fups[followup_line_id][0].strftime('%Y-%m-%d'):
if partner_id not in partner_list:
partner_list.append(partner_id)
partner_list.append(stat_line_id)
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id}
elif date and date <= fups[followup_line_id][0].strftime('%Y-%m-%d'):
if partner_id not in partner_list:
partner_list.append(partner_id)
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id}
partner_list.append(stat_line_id)
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
return {'partner_ids': partner_list, 'to_update': to_update}
def do_mail(self ,cr, uid, ids, context=None):
@@ -225,7 +231,7 @@ class account_followup_print_all(osv.osv_memory):
partners.append(line.partner_id)
dict_lines[line.partner_id.id] =line
for partner in partners:
ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable'])])
ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable']),('company_id','=',context.get('company_id', False))])
data_lines = move_obj.browse(cr, uid, ids_lines, context=context)
followup_data = dict_lines[partner.id]
dest = False
@@ -13,7 +13,6 @@
<group col="4" colspan="6">
<field name="followup_id"/>
<field name="date"/>
<newline/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
@@ -81,7 +80,7 @@
<notebook>
<page string="Partner Selection">
<separator string="Select Partners to Remind" colspan="4"/>
<field name="partner_ids" colspan="4" nolabel="1" context="{'search_default_balance_positive': 1}"/>
<field name="partner_ids" colspan="4" nolabel="1" context="{'search_default_balance_positive': 1}" domain="[('company_id','=',context.get('company_id',False))]"/>
</page>
<page string="Email Settings">
<field name="email_conf" colspan="4"/>
@@ -137,7 +136,5 @@
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
@@ -48,7 +48,7 @@
-
Now I create a Vendor Voucher
-
!record {model: account.voucher, id: account_voucher_voucheraxelor0}:
!record {model: account.voucher, id: account_voucher_voucheraxelor0, view: False}:
account_id: account.cash
amount: 1000.0
company_id: base.main_company
+8 -1
View File
@@ -18,10 +18,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import logging
import models
import edi_service
from models.edi import EDIMixin, edi_document
# web
import controllers
try:
import controllers
except ImportError:
logging.getLogger('init.load').warn(
"""Could not load openerp-web section of EDI, EDI will not behave correctly
To fix, launch openerp-web in embedded mode""")
-1
View File
@@ -1,5 +1,4 @@
openerp.edi = function(openerp) {
openerp.web.qweb.add_template("/web/static/src/xml/base.xml");
openerp.web.qweb.add_template("/edi/static/src/xml/edi.xml");
openerp.web.qweb.add_template("/edi/static/src/xml/edi_account.xml");
openerp.web.qweb.add_template("/edi/static/src/xml/edi_sale_purchase.xml");
@@ -39,7 +39,13 @@ class hr_payslip(osv.osv):
'journal_id': fields.many2one('account.journal', 'Expense Journal',states={'draft': [('readonly', False)]}, readonly=True, required=True),
'move_id': fields.many2one('account.move', 'Accounting Entry', readonly=True),
}
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default['move_id'] = False
return super(hr_payslip, self).copy(cr, uid, id, default, context=context)
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
@@ -95,9 +101,9 @@ class hr_payslip(osv.osv):
partner_id = False
debit_account_id = line.salary_rule_id.account_debit.id
credit_account_id = line.salary_rule_id.account_credit.id
if debit_account_id:
debit_line = (0, 0, {
'name': line.name,
'date': timenow,
@@ -113,9 +119,9 @@ class hr_payslip(osv.osv):
})
line_ids.append(debit_line)
debit_sum += debit_line[2]['debit'] - debit_line[2]['credit']
if credit_account_id:
credit_line = (0, 0, {
'name': line.name,
'date': timenow,
@@ -147,7 +153,7 @@ class hr_payslip(osv.osv):
'credit': debit_sum - credit_sum,
})
line_ids.append(adjust_credit)
elif debit_sum < credit_sum:
acc_id = slip.journal_id.default_debit_account_id.id
if not acc_id:
+1 -1
View File
@@ -54,7 +54,7 @@ system to store and search in your CV base.
'hr_recruitment_data.xml'
],
'demo_xml': [
'hr_recruitment_demo.xml',
'hr_recruitment_demo.yml',
],
'test':['test/test_hr_recruitment.yml'],
'installable': True,
+12 -1
View File
@@ -440,7 +440,18 @@ class hr_applicant(crm.crm_case, osv.osv):
})
else:
raise osv.except_osv(_('Warning!'),_('You must define Applied Job for Applicant !'))
return self.case_close(cr, uid, ids, *args)
self.case_close(cr, uid, ids, *args)
mod_obj = self.pool.get('ir.model.data')
act = mod_obj.get_object_reference(cr, uid, 'hr', 'open_view_employee_list')
act_obj = self.pool.get('ir.actions.act_window')
act_win = act_obj.read(cr, uid, act[1], [])
act_win['domain'] = [('id','=',emp_id)]
act_win['view_mode'] = 'form,tree'
act_win['res_id'] = emp_id
return act_win
def case_reset(self, cr, uid, ids, *args):
"""Resets case as draft
@@ -19,19 +19,6 @@
</record>
<!-- CASE CATEGORY(categ_id) -->
<record model="crm.case.categ" id="categ_job1">
<field name="name">Salesman</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_job2">
<field name="name">Junior Developer</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
</record>
<!-- Resource(type_id) -->
<record model="hr.recruitment.degree" id="degree_graduate">
@@ -1,178 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
<!--For Jobs Requests-->
<record id="hr_case_salesman0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-01 10:35:50')" name="date"/>
<field eval="time.strftime('%Y-%m-03')" name="date_deadline"/>
<field name="type_id" ref="degree_graduate"/>
<field name="partner_id" ref="base.res_partner_asus"/>
<field eval="'2'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'Enrique Jones'" name="partner_name"/>
<field eval="'draft'" name="state"/>
<field eval="'enrique@rediff.com'" name="partner_name2"/>
<field eval="'9963214587'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field eval="9.0" name="duration"/>
<field name="categ_id" ref="categ_job1"/>
<field name="stage_id" ref="stage_job1"/>
<field eval="'Salesman'" name="name"/>
<field eval="'1236547890'" name="partner_phone"/>
</record>
<record id="hr_case_traineemca0" model="hr.applicant">
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field eval="time.strftime('%Y-%m-10 18:15:00')" name="date"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'Marie Justine'" name="partner_name"/>
<field eval="'open'" name="state"/>
<field eval="5.15" name="duration"/>
<field eval="'marie@gmail.com'" name="partner_name2"/>
<field eval="'9988774455'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="categ_job2"/>
<field name="stage_id" ref="stage_job4"/>
<field eval="'Trainee - MCA'" name="name"/>
<field eval="time.strftime('%Y-%m-15')" name="date_deadline"/>
<field eval="'6633225'" name="partner_phone"/>
</record>
<record id="hr_case_fresher0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-15 16:10:00')" name="date"/>
<field eval="time.strftime('%Y-%m-18')" name="date_deadline"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="1.45" name="duration"/>
<field eval="'Jose'" name="partner_name"/>
<field eval="'pending'" name="state"/>
<field eval="'jose@timesgroup.com'" name="partner_name2"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="categ_job1"/>
<field name="stage_id" ref="stage_job3"/>
<field eval="'Fresher'" name="name"/>
<field eval="'999666735'" name="partner_phone"/>
</record>
<record id="hr_case_yrsexperienceinphp0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-25 16:25:52')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="categ_id" ref="categ_job2"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="1.35" name="duration"/>
<field eval="'Sandra Elvis'" name="partner_name"/>
<field eval="'sandra@example.com'" name="partner_name2"/>
<field eval="'cancel'" name="state"/>
<field eval="1" name="active"/>
<field name="stage_id" ref="stage_job6"/>
<field eval="'More than 5 yrs Experience in PHP'" name="name"/>
</record>
<record id="hr_case_marketingjob0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:15:32')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="2.0" name="duration"/>
<field eval="'John Bruno'" name="partner_name"/>
<field eval="'done'" name="state"/>
<field eval="'john@market.edu'" name="partner_name2"/>
<field eval="'9966332214'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="categ_job1"/>
<field name="stage_id" ref="stage_job5"/>
<field eval="'Marketing Job'" name="name"/>
<field eval="'33968745'" name="partner_phone"/>
</record>
<record id="hr_case_financejob0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'David Armstrong'" name="partner_name"/>
<field eval="'done'" name="state"/>
<field eval="'david@market.edu'" name="partner_name2"/>
<field eval="'9966332214'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field eval="2.20" name="duration"/>
<field name="categ_id" ref="categ_job1"/>
<field name="stage_id" ref="stage_job5"/>
<field eval="'Finance Job'" name="name"/>
<field eval="'33968745'" name="partner_phone"/>
</record>
<record id="hr_case_traineemca1" model="hr.applicant">
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field eval="time.strftime('%Y-%m-12 17:49:19')" name="date"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'Tina Augustie'" name="partner_name"/>
<field eval="'open'" name="state"/>
<field eval="1.15" name="duration"/>
<field eval="'tina_augustie@example.com'" name="partner_name2"/>
<field eval="'9898745745'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="categ_job2"/>
<field name="stage_id" ref="stage_job4"/>
<field eval="'Trainee - MCA'" name="name"/>
<field eval="time.strftime('%Y-%m-15')" name="date_deadline"/>
<field eval="'6630125'" name="partner_phone"/>
</record>
<record id="hr_case_programmer" model="hr.applicant">
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field eval="time.strftime('%Y-%m-12 17:49:19')" name="date"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'Shane Williams'" name="partner_name"/>
<field eval="'open'" name="state"/>
<field eval="1.15" name="duration"/>
<field eval="'tina_augustie@example.com'" name="partner_name2"/>
<field eval="'9812398524'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="categ_job2"/>
<field name="stage_id" ref="stage_job4"/>
<field eval="'Programmer'" name="name"/>
<field eval="time.strftime('%Y-%m-15')" name="date_deadline"/>
<field eval="'6630125'" name="partner_phone"/>
<field name="job_id" ref="hr.job_jr_appli"/>
<field name="department_id" ref="hr.dep_it"/>
<field eval="11000.0" name="salary_expected"/>
</record>
<record id="hr_case_advertisement" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'David Armstrong'" name="partner_name"/>
<field eval="'done'" name="state"/>
<field eval="'david@market.edu'" name="partner_name2"/>
<field eval="'9925741564'" name="partner_mobile"/>
<field eval="1" name="active"/>
<field eval="2.20" name="duration"/>
<field name="categ_id" ref="categ_job1"/>
<field name="stage_id" ref="stage_job5"/>
<field eval="'Advertisement'" name="name"/>
<field eval="'25968745'" name="partner_phone"/>
<field eval="11000.0" name="salary_expected"/>
</record>
</data>
</openerp>
@@ -0,0 +1,109 @@
-
!record {model: hr.applicant, id: hr_case_salesman0}:
date: !eval time.strftime('%Y-%m-01 10:35:50')
type_id: degree_graduate
priority: '2'
partner_name: 'Enrique Jones'
partner_mobile: '9963214587'
job_id: hr.job_jr_appli
stage_id: stage_job1
name: 'Salesman'
partner_phone: '1236547890'
-
!record {model: hr.applicant, id: hr_case_traineemca0}:
partner_address_id: base.res_partner_address_14
date: !eval time.strftime('%Y-%m-10 18:15:00')
type_id: degree_bac5
priority: '3'
user_id: base.user_demo
partner_name: 'Marie Justine'
state: 'open'
partner_mobile: '9988774455'
job_id: hr.job_jr_appli
stage_id: stage_job4
name: 'Trainee - MCA'
partner_phone: '6633225'
-
!record {model: hr.applicant, id: hr_case_fresher0}:
date: !eval time.strftime('%Y-%m-15 16:10:00')
type_id: degree_licenced
priority: '1'
user_id: base.user_root
partner_name: 'Jose'
job_id: hr.job_jr_appli
stage_id: stage_job3
name: 'Fresher'
partner_phone: '999666735'
-
!record {model: hr.applicant, id: hr_case_yrsexperienceinphp0}:
date: !eval time.strftime('%Y-%m-25 16:25:52')
job_id: hr.job_jr_appli
type_id: degree_bac5
user_id: base.user_root
partner_name: 'Sandra Elvis'
state: 'cancel'
stage_id: stage_job6
name: 'More than 5 yrs Experience in PHP'
-
!record {model: hr.applicant, id: hr_case_marketingjob0}:
date: !eval time.strftime('%Y-%m-26 17:15:32')
type_id: degree_licenced
user_id: base.user_demo
partner_name: 'John Bruno'
state: 'done'
job_id: hr.job_jr_appli
stage_id: stage_job5
name: 'Marketing Job'
-
!record {model: hr.applicant, id: hr_case_financejob0}:
date: !eval time.strftime('%Y-%m-26 17:39:42')
type_id: degree_licenced
priority: '4'
partner_name: 'David Armstrong'
state: 'pending'
state: open
partner_mobile: '9966332214'
job_id: hr.job_jr_appli
stage_id: stage_job2
name: 'Finance Job'
partner_phone: '33968745'
-
!record {model: hr.applicant, id: hr_case_traineemca1}:
partner_address_id: base.res_partner_address_14
date: !eval time.strftime('%Y-%m-12 17:49:19')
type_id: degree_bac5
partner_name: 'Tina Augustie'
state: 'open'
partner_mobile: '9898745745'
job_id: hr.job_jr_appli
stage_id: stage_job4
name: 'Trainee - MCA'
partner_phone: '6630125'
-
!record {model: hr.applicant, id: hr_case_programmer}:
partner_address_id: base.res_partner_address_14
date: !eval time.strftime('%Y-%m-12 17:49:19')
type_id: degree_bac5
partner_name: 'Shane Williams'
state: 'open'
partner_mobile: '9812398524'
stage_id: stage_job4
name: 'Programmer'
partner_phone: '6630125'
job_id: hr.job_jr_appli
department_id: hr.dep_it
salary_expected: 11000.0
-
!record {model: hr.applicant, id: hr_case_advertisement}:
date: !eval time.strftime('%Y-%m-26 17:39:42')
type_id: degree_licenced
partner_id: base.res_partner_11
partner_name: 'David Armstrong'
job_id: hr.job_jr_appli
stage_id: stage_job2
name: 'Advertisement'
salary_expected: 11000.0
@@ -48,8 +48,7 @@ class hired_employee(osv.osv_memory):
"""
if context is None:
context = {}
self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
return {}
return self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
hired_employee()
+5 -3
View File
@@ -2,9 +2,6 @@
<openerp>
<data>
<record id="hr.employee" model="hr.employee">
<field name="product_id" ref="product.product_consultant"/>
</record>
<record id="analytic_journal" model="account.analytic.journal">
<field name="code">TS</field>
@@ -12,5 +9,10 @@
<field name="type">general</field>
</record>
<record id="hr.employee" model="hr.employee">
<field name="product_id" ref="product.product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
</data>
</openerp>
+1 -1
View File
@@ -63,7 +63,7 @@ TODO :
""",
"version" : "6.1",
"author" : "Camptocamp",
"category" : "Finance",
'category': 'Localization/Account Charts',
"website": "http://www.camptocamp.com",
"depends" : [
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-11-17 05:22+0000\n"
"X-Generator: Launchpad (build 14291)\n"
"X-Launchpad-Export-Date: 2011-11-18 05:13+0000\n"
"X-Generator: Launchpad (build 14299)\n"
#. module: l10n_th
#: model:ir.actions.todo,note:l10n_th.config_call_account_template_th
+3
View File
@@ -491,6 +491,9 @@ class mrp_production(osv.osv):
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
}
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'),
]
_order = 'priority desc, date_planned asc';
def _check_qty(self, cr, uid, ids, context=None):
-2
View File
@@ -179,11 +179,9 @@
-
!record {model: mrp.production, id: mrp_production_mo0}:
bom_id: mrp.mrp_bom_orangejuice0
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_output
location_src_id: stock.stock_location_stock
name: MO/00002
product_id: mrp.product_product_orangejuice0
product_lines:
- name: Orange
@@ -106,14 +106,11 @@
-
!record {model: mrp.production, id: mrp_production_mo0}:
bom_id: mrp_bom_woodenchair0
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
name: MO/00004
product_id: product_product_woodenchair0
product_qty: 10.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
-
I compute the data of production order.
@@ -74,7 +74,7 @@
-
I click on the "Make Payment" wizard to pay the PoS order with a partial amount of 100.0 EUR
-
!record {model: pos.make.payment, id: pos_make_payment_0, context: {'active_id': ref('pos_order_pos0'), 'active_ids': [ref('pos_order_pos0')]} }:
!record {model: pos.make.payment, id: pos_make_payment_0, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }:
amount: 100.0
-
I click on the validate button to register the payment.
@@ -95,7 +95,7 @@
-
I pay the remaining balance.
-
!record {model: pos.make.payment, id: pos_make_payment_1, context: {'active_id': [ref('pos_order_pos0')], 'active_ids': [ref('pos_order_pos0')]} }:
!record {model: pos.make.payment, id: pos_make_payment_1, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }:
amount: !eval >
(450*2 + 300*3*1.05)*0.95-100.0
-
@@ -18,7 +18,7 @@
-
I click on the "Make Payment" wizard to pay the PoS order
-
!record {model: pos.make.payment, id: pos_make_payment_2, context: {'active_id': ref('pos_order_pos1'), 'active_ids': [ref('pos_order_pos1')]} }:
!record {model: pos.make.payment, id: pos_make_payment_2, context: '{"active_id": ref("pos_order_pos1"), "active_ids": [ref("pos_order_pos1")]}' }:
amount: !eval >
(450*2 + 300*3*1.05)*0.95
-
+1 -1
View File
@@ -78,7 +78,7 @@ class project(osv.osv):
return {'value':{'contact_id': False}}
addr = partner_obj.address_get(cr, uid, [part], ['contact'])
val = {'contact_id': addr['contact']}
if pricelist_id in self._columns:
if 'pricelist_id' in self.fields_get(cr, uid, context=context):
pricelist = partner_obj.read(cr, uid, part, ['property_product_pricelist'], context=context)
pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False
val['pricelist_id'] = pricelist_id
+1 -1
View File
@@ -227,7 +227,7 @@ class purchase_order(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'purchase.order', context=c),
}
_sql_constraints = [
('name_uniq', 'unique(name)', 'Order Reference must be unique !'),
('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'),
]
_name = "purchase.order"
_description = "Purchase Order"
+98
View File
@@ -0,0 +1,98 @@
# Thai translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2011-11-17 07:34+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: 2011-11-18 05:13+0000\n"
"X-Generator: Launchpad (build 14299)\n"
#. module: report_designer
#: model:ir.actions.act_window,name:report_designer.action_report_designer_installer
#: view:report_designer.installer:0
msgid "Reporting Tools Configuration"
msgstr ""
#. module: report_designer
#: field:report_designer.installer,base_report_creator:0
msgid "Query Builder"
msgstr ""
#. module: report_designer
#: view:report_designer.installer:0
msgid "Configure"
msgstr ""
#. module: report_designer
#: view:report_designer.installer:0
msgid "title"
msgstr ""
#. module: report_designer
#: model:ir.model,name:report_designer.model_report_designer_installer
msgid "report_designer.installer"
msgstr ""
#. module: report_designer
#: field:report_designer.installer,config_logo:0
msgid "Image"
msgstr ""
#. module: report_designer
#: field:report_designer.installer,base_report_designer:0
msgid "OpenOffice Report Designer"
msgstr ""
#. module: report_designer
#: model:ir.module.module,shortdesc:report_designer.module_meta_information
msgid "Reporting Tools"
msgstr ""
#. module: report_designer
#: view:report_designer.installer:0
msgid ""
"OpenERP's built-in reporting abilities can be improved even further with "
"some of the following applications"
msgstr ""
#. module: report_designer
#: view:report_designer.installer:0
msgid "Configure Reporting Tools"
msgstr ""
#. module: report_designer
#: help:report_designer.installer,base_report_creator:0
msgid ""
"Allows you to create any statistic reports on several objects. It's a SQL "
"query builder and browser for end users."
msgstr ""
#. module: report_designer
#: help:report_designer.installer,base_report_designer:0
msgid ""
"Adds wizards to Import/Export .SXW report which you can modify in "
"OpenOffice.Once you have modified it you can upload the report using the "
"same wizard."
msgstr ""
#. module: report_designer
#: model:ir.module.module,description:report_designer.module_meta_information
msgid ""
"Installer for reporting tools selection\n"
" "
msgstr ""
#. module: report_designer
#: field:report_designer.installer,progress:0
msgid "Configuration Progress"
msgstr ""
+1 -1
View File
@@ -280,7 +280,7 @@ class sale_order(osv.osv):
'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'],
}
_sql_constraints = [
('name_uniq', 'unique(name)', 'Order Reference must be unique !'),
('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'),
]
_order = 'name desc'
+4 -1
View File
@@ -661,6 +661,9 @@ class stock_picking(osv.osv):
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.picking', context=c)
}
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'),
]
def action_process(self, cr, uid, ids, context=None):
if context is None: context = {}
@@ -1525,7 +1528,7 @@ class stock_move(osv.osv):
return True
_columns = {
'name': fields.char('Name', size=64, required=True, select=True),
'name': fields.char('Name', size=250, required=True, select=True),
'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'),
'create_date': fields.datetime('Creation Date', readonly=True, select=True),
'date': fields.datetime('Date', required=True, select=True, help="Move date: scheduled date until move is done, then date of actual move processing", states={'done': [('readonly', True)]}),
@@ -142,11 +142,9 @@
product_uos_qty: 0.0
bom_id: mrp_bom_cupoftea0
routing_id: mrp_routing_productionrouting0
company_id: base.main_company
date_planned: !eval time.strftime('%Y-%m-%d %H:%M:%S')
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
name: MO/00002
-
I compute the data of production order.
-