[MERGE] Merge with addons
bzr revid: jar@tinyerp.com-20140408051908-qywnx2nuy68dfqcn
This commit is contained in:
commit
4cda176a63
|
@ -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: 2012-12-22 12:46+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:18+0000\n"
|
||||
"Last-Translator: Dariusz Żbikowski <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: 2014-03-27 06:26+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
|
@ -989,6 +989,8 @@ msgid ""
|
|||
" opening/closing fiscal "
|
||||
"year process."
|
||||
msgstr ""
|
||||
"Nie możesz anulować uzgodnień pozycji dziennika jeśli zostały one "
|
||||
"wygenerowane procesem zamykania/otwierania roku."
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_subscription_form_new
|
||||
|
|
|
@ -34,7 +34,7 @@ class validate_account_move(osv.osv_memory):
|
|||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids[0], context=context)
|
||||
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','in',tuple(data['journal_ids'])),('period_id','in',tuple(data['period_ids']))])
|
||||
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','in',tuple(data['journal_ids'])),('period_id','in',tuple(data['period_ids']))], order='date')
|
||||
if not ids_move:
|
||||
raise osv.except_osv(_('Warning!'), _('Specified journals do not have any account move entries in draft state for the specified periods.'))
|
||||
obj_move.button_validate(cr, uid, ids_move, context=context)
|
||||
|
|
|
@ -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:05+0000\n"
|
||||
"PO-Revision-Date: 2012-12-12 17:49+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:44+0000\n"
|
||||
"Last-Translator: Dariusz Żbikowski <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: 2014-03-27 06:16+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:email.template,subject:account_followup.email_template_account_followup_default
|
||||
|
@ -109,7 +109,7 @@ msgstr "Kroki monitowania płatności"
|
|||
#. module: account_followup
|
||||
#: field:account_followup.print,email_body:0
|
||||
msgid "Email Body"
|
||||
msgstr ""
|
||||
msgstr "Treść email"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
|
||||
|
@ -403,7 +403,7 @@ msgstr "Monity o płatność"
|
|||
#. module: account_followup
|
||||
#: field:account_followup.followup.line,delay:0
|
||||
msgid "Due Days"
|
||||
msgstr ""
|
||||
msgstr "Dni zwłoki"
|
||||
|
||||
#. module: account_followup
|
||||
#: field:account.move.line,followup_line_id:0
|
||||
|
@ -419,7 +419,7 @@ msgstr "Ostatni monit o płatność"
|
|||
#. module: account_followup
|
||||
#: model:ir.ui.menu,name:account_followup.menu_manual_reconcile_followup
|
||||
msgid "Reconcile Invoices & Payments"
|
||||
msgstr ""
|
||||
msgstr "Uzgadnianie Faktur i Płatności"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.ui.menu,name:account_followup.account_followup_s
|
||||
|
@ -429,7 +429,7 @@ msgstr "Wykonaj manualnie monit o płatność"
|
|||
#. module: account_followup
|
||||
#: report:account_followup.followup.print:0
|
||||
msgid "Li."
|
||||
msgstr ""
|
||||
msgstr "Sp."
|
||||
|
||||
#. module: account_followup
|
||||
#: field:account_followup.print,email_conf:0
|
||||
|
@ -499,6 +499,7 @@ msgstr "Monitowanie płatności"
|
|||
#, python-format
|
||||
msgid "Email not sent because of email address of partner not filled in"
|
||||
msgstr ""
|
||||
"Email nie został wysłany ponieważ adres email partnera nie został wypełniony"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.model,name:account_followup.model_account_followup_followup
|
||||
|
@ -511,6 +512,8 @@ msgid ""
|
|||
"Optionally you can assign a user to this field, which will make him "
|
||||
"responsible for the action."
|
||||
msgstr ""
|
||||
"Opcjonalnie możesz przypisać użytkownika do tego pola, który stanie się "
|
||||
"odpowiedzialny za tę akcję."
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.model,name:account_followup.model_account_followup_sending_results
|
||||
|
@ -528,7 +531,7 @@ msgstr ""
|
|||
#: code:addons/account_followup/wizard/account_followup_print.py:172
|
||||
#, python-format
|
||||
msgid " manual action(s) assigned:"
|
||||
msgstr ""
|
||||
msgstr " ręczna akcja przypisana do:"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
|
@ -548,13 +551,13 @@ msgstr "Przeszukaj monity o płatność"
|
|||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
msgid "Account Move line"
|
||||
msgstr ""
|
||||
msgstr "Pozycja zapisu"
|
||||
|
||||
#. module: account_followup
|
||||
#: code:addons/account_followup/wizard/account_followup_print.py:237
|
||||
#, python-format
|
||||
msgid "Send Letters and Emails: Actions Summary"
|
||||
msgstr ""
|
||||
msgstr "Listy i Email: Podsumowanie akcji"
|
||||
|
||||
#. module: account_followup
|
||||
#: view:account_followup.print:0
|
||||
|
@ -916,7 +919,7 @@ msgstr ""
|
|||
#. module: account_followup
|
||||
#: view:res.partner:0
|
||||
msgid "Responsible"
|
||||
msgstr ""
|
||||
msgstr "Odpowiedzialny"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:ir.ui.menu,name:account_followup.menu_finance_followup
|
||||
|
@ -945,7 +948,7 @@ msgstr "Działanie monitowania płatności"
|
|||
#. module: account_followup
|
||||
#: view:account_followup.stat:0
|
||||
msgid "Including journal entries marked as a litigation"
|
||||
msgstr ""
|
||||
msgstr "Załącz pozycje dziennika oznaczone jako sporne"
|
||||
|
||||
#. module: account_followup
|
||||
#: report:account_followup.followup.print:0
|
||||
|
|
|
@ -732,13 +732,17 @@ class account_voucher(osv.osv):
|
|||
|
||||
total_credit = 0.0
|
||||
total_debit = 0.0
|
||||
account_type = 'receivable'
|
||||
account_type = None
|
||||
if context.get('account_id'):
|
||||
account_type = self.pool['account.account'].browse(cr, uid, context['account_id'], context=context).type
|
||||
if ttype == 'payment':
|
||||
account_type = 'payable'
|
||||
if not account_type:
|
||||
account_type = 'payable'
|
||||
total_debit = price or 0.0
|
||||
else:
|
||||
total_credit = price or 0.0
|
||||
account_type = 'receivable'
|
||||
if not account_type:
|
||||
account_type = 'receivable'
|
||||
|
||||
if not context.get('move_line_ids', False):
|
||||
ids = move_line_pool.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context)
|
||||
|
@ -827,9 +831,9 @@ class account_voucher(osv.osv):
|
|||
else:
|
||||
default['value']['line_dr_ids'].append(rs)
|
||||
|
||||
if ttype == 'payment' and len(default['value']['line_cr_ids']) > 0:
|
||||
if len(default['value']['line_cr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
|
||||
elif len(default['value']['line_dr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, ttype)
|
||||
return default
|
||||
|
@ -1662,7 +1666,7 @@ class account_bank_statement_line(osv.osv):
|
|||
def _check_amount(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.voucher_id:
|
||||
diff = abs(obj.amount) - obj.voucher_id.amount
|
||||
diff = abs(obj.amount) - abs(obj.voucher_id.amount)
|
||||
if not self.pool.get('res.currency').is_zero(cr, uid, obj.statement_id.currency, diff):
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -213,10 +213,10 @@
|
|||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
|
||||
<field name="voucher_id" string="" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
|
||||
<field name="voucher_id" string="" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False, 'account_id': account_id}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="before">
|
||||
<field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
|
||||
<field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False, 'account_id': account_id}"/>
|
||||
</xpath>
|
||||
<field name="amount" position="attributes">
|
||||
<attribute name="on_change">onchange_amount(amount)</attribute>
|
||||
|
@ -230,7 +230,7 @@
|
|||
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
|
||||
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
|
||||
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'account_id': account_id}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -241,7 +241,7 @@
|
|||
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page/field[@name='line_ids']/form/group/field[@name='amount']" position="after">
|
||||
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
|
||||
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'account_id': account_id}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||
"PO-Revision-Date: 2012-12-12 18:01+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:12+0000\n"
|
||||
"Last-Translator: Dariusz Żbikowski <Unknown>\n"
|
||||
"Language-Team: Polish <pl@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: 2014-03-27 07:32+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: auth_signup
|
||||
#: field:res.partner,signup_type:0
|
||||
|
@ -80,7 +80,7 @@ msgstr "Wprowadź hasło o potwierdź je"
|
|||
#. module: auth_signup
|
||||
#: view:res.users:0
|
||||
msgid "Send an email to the user to (re)set their password."
|
||||
msgstr ""
|
||||
msgstr "Wyślij email do użytkownika w celu zresetowania hasła"
|
||||
|
||||
#. module: auth_signup
|
||||
#. openerp-web
|
||||
|
@ -99,7 +99,7 @@ msgstr "Nowy"
|
|||
#: code:addons/auth_signup/res_users.py:258
|
||||
#, python-format
|
||||
msgid "Mail sent to:"
|
||||
msgstr ""
|
||||
msgstr "Mail wysłano do:"
|
||||
|
||||
#. module: auth_signup
|
||||
#: field:res.users,state:0
|
||||
|
@ -191,7 +191,7 @@ msgstr "Proszę wprowadź nazwę użytkownika lub adres email."
|
|||
#. module: auth_signup
|
||||
#: selection:res.users,state:0
|
||||
msgid "Resetting Password"
|
||||
msgstr ""
|
||||
msgstr "Resetowane hasło"
|
||||
|
||||
#. module: auth_signup
|
||||
#. openerp-web
|
||||
|
|
|
@ -71,7 +71,7 @@ class base_gengo_translations(osv.osv_memory):
|
|||
gengo = MyGengo(
|
||||
public_key=user.company_id.gengo_public_key.encode('ascii'),
|
||||
private_key=user.company_id.gengo_private_key.encode('ascii'),
|
||||
sandbox = user.company_id.gengo_sandbox,
|
||||
sandbox=user.company_id.gengo_sandbox,
|
||||
)
|
||||
gengo.getAccountStats()
|
||||
return (True, gengo)
|
||||
|
@ -83,7 +83,7 @@ class base_gengo_translations(osv.osv_memory):
|
|||
'''
|
||||
Function called by the wizard.
|
||||
'''
|
||||
if context == None:
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
flag, gengo = self.gengo_authentication(cr, uid, context=context)
|
||||
|
@ -99,16 +99,16 @@ class base_gengo_translations(osv.osv_memory):
|
|||
ctx['gengo_language'] = wizard.lang_id.id
|
||||
if wizard.sync_limit > 200 or wizard.sync_limit < 1:
|
||||
raise osv.except_osv(_("Warning"), _('Sync limit should between 1 to 200 for Gengo translation services.'))
|
||||
if wizard.sync_type in ['send','both']:
|
||||
if wizard.sync_type in ['send', 'both']:
|
||||
self._sync_request(cr, uid, wizard.sync_limit, context=ctx)
|
||||
if wizard.sync_type in ['receive','both']:
|
||||
self._sync_response( cr, uid, wizard.sync_limit, context=ctx)
|
||||
if wizard.sync_type in ['receive', 'both']:
|
||||
self._sync_response(cr, uid, wizard.sync_limit, context=ctx)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
def _sync_response(self, cr, uid, limit=GENGO_DEFAULT_LIMIT, context=None):
|
||||
"""
|
||||
This method will be called by cron services to get translations from
|
||||
Gengo. It will read translated terms and comments from Gengo and will
|
||||
Gengo. It will read translated terms and comments from Gengo and will
|
||||
update respective ir.translation in openerp.
|
||||
"""
|
||||
translation_pool = self.pool.get('ir.translation')
|
||||
|
@ -116,31 +116,38 @@ class base_gengo_translations(osv.osv_memory):
|
|||
if not flag:
|
||||
_logger.warning("%s", gengo)
|
||||
else:
|
||||
translation_id = translation_pool.search(cr, uid, [('state', '=', 'inprogress'), ('gengo_translation', 'in', ('machine','standard','pro','ultra')), ('job_id', "!=",False)], limit=limit, context=context)
|
||||
translation_terms = translation_pool.browse(cr, uid, translation_id, context=context)
|
||||
gengo_job_id = [term.job_id for term in translation_terms]
|
||||
if gengo_job_id:
|
||||
gengo_ids = ','.join(gengo_job_id)
|
||||
job_response = gengo.getTranslationJobBatch(id=gengo_ids)
|
||||
if job_response['opstat'] == 'ok':
|
||||
job_response_dict = dict([(job['job_id'],job) for job in job_response['response']['jobs']])
|
||||
for term in translation_terms:
|
||||
up_term = up_comment = 0
|
||||
vals={}
|
||||
if job_response_dict[term.job_id]['status'] == 'approved':
|
||||
vals.update({'state': 'translated',
|
||||
'value': job_response_dict[term.job_id]['body_tgt']})
|
||||
up_term += 1
|
||||
job_comment = gengo.getTranslationJobComments(id=term.job_id)
|
||||
if job_comment['opstat']=='ok':
|
||||
gengo_comments=""
|
||||
for comment in job_comment['response']['thread']:
|
||||
gengo_comments += _('%s\n-- Commented on %s by %s.\n\n') % (comment['body'], time.ctime(comment['ctime']), comment['author'])
|
||||
vals.update({'gengo_comment': gengo_comments})
|
||||
up_comment += 1
|
||||
if vals:
|
||||
translation_pool.write(cr, uid, term.id, vals)
|
||||
_logger.info("Successfully Updated `%d` terms and %d Comments." % (up_term, up_comment ))
|
||||
offset = 0
|
||||
all_translation_ids = translation_pool.search(cr, uid, [('state', '=', 'inprogress'), ('gengo_translation', 'in', ('machine', 'standard', 'pro', 'ultra')), ('job_id', "!=", False)], context=context)
|
||||
while True:
|
||||
translation_ids = all_translation_ids[offset:offset + limit]
|
||||
if translation_ids:
|
||||
offset += limit
|
||||
translation_terms = translation_pool.browse(cr, uid, translation_ids, context=context)
|
||||
gengo_job_id = [term.job_id for term in translation_terms]
|
||||
if gengo_job_id:
|
||||
gengo_ids = ','.join(gengo_job_id)
|
||||
job_response = gengo.getTranslationJobBatch(id=gengo_ids)
|
||||
if job_response['opstat'] == 'ok':
|
||||
job_response_dict = dict([(job['job_id'], job) for job in job_response['response']['jobs']])
|
||||
for term in translation_terms:
|
||||
up_term = up_comment = 0
|
||||
vals = {}
|
||||
if job_response_dict[term.job_id]['status'] == 'approved':
|
||||
vals.update({'state': 'translated',
|
||||
'value': job_response_dict[term.job_id]['body_tgt']})
|
||||
up_term += 1
|
||||
job_comment = gengo.getTranslationJobComments(id=term.job_id)
|
||||
if job_comment['opstat'] == 'ok':
|
||||
gengo_comments = ""
|
||||
for comment in job_comment['response']['thread']:
|
||||
gengo_comments += _('%s\n-- Commented on %s by %s.\n\n') % (comment['body'], time.ctime(comment['ctime']), comment['author'])
|
||||
vals.update({'gengo_comment': gengo_comments})
|
||||
up_comment += 1
|
||||
if vals:
|
||||
translation_pool.write(cr, uid, term.id, vals)
|
||||
_logger.info("Successfully Updated `%d` terms and %d Comments." % (up_term, up_comment))
|
||||
if not len(translation_ids) == limit:
|
||||
break
|
||||
return True
|
||||
|
||||
def _update_terms(self, cr, uid, response, context=None):
|
||||
|
@ -187,7 +194,7 @@ class base_gengo_translations(osv.osv_memory):
|
|||
return {'jobs': jobs}
|
||||
|
||||
|
||||
def _send_translation_terms(self, cr, uid, term_ids, context=None):
|
||||
def _send_translation_terms(self, cr, uid, term_ids, context=None):
|
||||
"""
|
||||
Send a request to Gengo with all the term_ids in a different job, get the response and update the terms in
|
||||
database accordingly.
|
||||
|
@ -223,13 +230,17 @@ class base_gengo_translations(osv.osv_memory):
|
|||
#but if this specific key is given, then we restrict the request on terms of this language only
|
||||
lang_ids = [context.get('gengo_language')]
|
||||
langs = [lang.code for lang in language_pool.browse(cr, uid, lang_ids, context=context)]
|
||||
#search for the n first terms to translate
|
||||
term_ids = translation_pool.search(cr, uid, [('state', '=', 'to_translate'), ('gengo_translation', 'in', ('machine','standard','pro','ultra')), ('lang', 'in', langs),('job_id',"=",False)], limit=limit, context=context)
|
||||
if term_ids:
|
||||
self._send_translation_terms(cr, uid, term_ids, context=context)
|
||||
_logger.info("%s Translation terms have been posted to Gengo successfully", len(term_ids))
|
||||
else:
|
||||
_logger.info('No Translation terms to process.')
|
||||
offset = 0
|
||||
all_term_ids = translation_pool.search(cr, uid, [('state', '=', 'to_translate'), ('gengo_translation', 'in', ('machine', 'standard', 'pro', 'ultra')), ('lang', 'in', langs), ('job_id', "=", False)], context=context)
|
||||
while True:
|
||||
#search for the n first terms to translate
|
||||
term_ids = all_term_ids[offset:offset + limit]
|
||||
if term_ids:
|
||||
offset += limit
|
||||
self._send_translation_terms(cr, uid, term_ids, context=context)
|
||||
_logger.info("%s Translation terms have been posted to Gengo successfully", len(term_ids))
|
||||
if not len(term_ids) == limit:
|
||||
break
|
||||
except Exception, e:
|
||||
_logger.error("%s", e)
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ openerp.base_import = function (instance) {
|
|||
|
||||
callback(item_finder(default_value));
|
||||
},
|
||||
|
||||
placeholder: _t('Don\'t import'),
|
||||
width: 'resolve',
|
||||
dropdownCssClass: 'oe_import_selector'
|
||||
});
|
||||
|
|
|
@ -347,8 +347,7 @@
|
|||
<tr class="oe_import_fields">
|
||||
<!-- Iterate on first row to ensure we have all columns -->
|
||||
<td t-foreach="preview[0]" t-as="column">
|
||||
<input placeholder="Don't Import"
|
||||
class="oe_import_match_field"/>
|
||||
<input class="oe_import_match_field"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-foreach="preview" t-as="row" class="oe_import_grid-row">
|
||||
|
|
|
@ -126,6 +126,7 @@ class res_partner(osv.osv):
|
|||
continue
|
||||
vat_country, vat_number = self._split_vat(partner.vat)
|
||||
if not check_func(cr, uid, vat_country, vat_number, context=context):
|
||||
_logger.info(_("Importing VAT Number [%s] is not valid !" % vat_number))
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -149,7 +150,9 @@ class res_partner(osv.osv):
|
|||
vat_no = "'CC##' (CC=Country Code, ##=VAT Number)"
|
||||
if default_vat_check(vat_country, vat_number):
|
||||
vat_no = _ref_vat[vat_country] if vat_country in _ref_vat else vat_no
|
||||
return '\n' + _('This VAT number does not seem to be valid.\nNote: the expected format is %s') % vat_no
|
||||
#Retrieve the current partner for wich the VAT is not valid
|
||||
error_partner = self.browse(cr, uid, ids, context=context)
|
||||
return '\n' + _('The VAT number [%s] for partner [%s] does not seem to be valid. \nNote: the expected format is %s') % (error_partner[0].vat, error_partner[0].name, vat_no)
|
||||
|
||||
_constraints = [(check_vat, _construct_constraint_msg, ["vat"])]
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ class calendar_event(osv.Model):
|
|||
"""
|
||||
Return date and time (from to from) based on duration with timezone in string :
|
||||
eg.
|
||||
1) if user add duration for 2 hours, return : August-23-2013 at ( 04-30 To 06-30) (Europe/Brussels)
|
||||
1) if user add duration for 2 hours, return : August-23-2013 at (04-30 To 06-30) (Europe/Brussels)
|
||||
2) if event all day ,return : AllDay, July-31-2013
|
||||
"""
|
||||
if context is None:
|
||||
|
@ -733,7 +733,7 @@ class calendar_event(osv.Model):
|
|||
time = _("AllDay , %s") % (event_date)
|
||||
elif meeting.duration < 24:
|
||||
duration = date + timedelta(hours=meeting.duration)
|
||||
time = ("%s at ( %s To %s) (%s)") % (event_date, display_time, duration.strftime('%H-%M'), tz)
|
||||
time = ("%s at (%s To %s) (%s)") % (event_date, display_time, duration.strftime('%H-%M'), tz)
|
||||
else:
|
||||
time = ("%s at %s To\n %s at %s (%s)") % (event_date, display_time, date_deadline.strftime('%B-%d-%Y'), date_deadline.strftime('%H-%M'), tz)
|
||||
return time
|
||||
|
@ -1298,9 +1298,14 @@ class calendar_event(osv.Model):
|
|||
invitation['attendee'].append({'name': attendee.cn, 'status': attendee.state})
|
||||
return invitation
|
||||
|
||||
def get_interval(self, cr, uid, ids, date, interval, context=None):
|
||||
def get_interval(self, cr, uid, ids, date, interval, tz=None, context=None):
|
||||
#Function used only in calendar_event_data.xml for email template
|
||||
date = datetime.strptime(date.split('.')[0], DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
|
||||
if tz:
|
||||
timezone = pytz.timezone(tz or 'UTC')
|
||||
date = date.replace(tzinfo=pytz.timezone('UTC')).astimezone(timezone)
|
||||
|
||||
if interval == 'day':
|
||||
res = str(date.day)
|
||||
elif interval == 'month':
|
||||
|
@ -1582,6 +1587,8 @@ class mail_message(osv.Model):
|
|||
return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
|
||||
def _find_allowed_model_wise(self, cr, uid, doc_model, doc_dict, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if doc_model == 'calendar.event':
|
||||
order = context.get('order', self._order)
|
||||
for virtual_id in self.pool[doc_model].get_recurrent_ids(cr, uid, doc_dict.keys(), [], order=order, context=context):
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
${object.event_id.get_interval(object.event_id.date,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.date, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${object.event_id.get_interval(object.event_id.date, 'time')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.date, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
|
@ -212,7 +212,7 @@
|
|||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style='display:inline-block; border-radius: 50%; width:10px; height:10px;background:${ctx["color"][attendee.state]};'></div>
|
||||
<div style='display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx["color"][attendee.state] or 'white'};'></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
|
@ -227,9 +227,9 @@
|
|||
</table>
|
||||
</div>
|
||||
<div style="height: auto;width:450px; margin:0 auto;padding-top:20px;padding-bottom:40px;">
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${ctx['dbname']}&token=${object.access_token}&action=${ctx['action_id']}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${ctx['dbname']}&token=${object.access_token}&action=${ctx['action_id']}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${ctx['dbname']}&token=${object.access_token}&action=${ctx['action_id']}&id=${object.event_id.id}">View</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or '' }&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -280,7 +280,7 @@
|
|||
${object.event_id.get_interval(object.event_id.date,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.date, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${object.event_id.get_interval(object.event_id.date, 'time')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.date, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
|
@ -345,7 +345,7 @@
|
|||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style='display:inline-block; border-radius: 50%; width:10px; height:10px;background:${ctx["color"][attendee.state]};'></div>
|
||||
<div style='display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx["color"][attendee.state] or 'white'};'></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
|
@ -360,9 +360,9 @@
|
|||
</table>
|
||||
</div>
|
||||
<div style="height: auto;width:450px; margin:0 auto;padding-top:20px;padding-bottom:40px;">
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${ctx['dbname']}&token=${object.access_token}&action=${ctx['action_id']}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${ctx['dbname']}&token=${object.access_token}&action=${ctx['action_id']}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${ctx['dbname']}&token=${object.access_token}&action=${ctx['action_id']}&id=${object.event_id.id}">View</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -412,7 +412,7 @@
|
|||
${object.event_id.get_interval(object.event_id.date,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.date, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${object.event_id.get_interval(object.event_id.date, 'time')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.date, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
|
@ -477,7 +477,7 @@
|
|||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style='display:inline-block; border-radius: 50%; width:10px; height:10px;background:${ctx["color"][attendee.state]};'></div>
|
||||
<div style='display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx["color"][attendee.state] or 'white'};'></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
|
|
|
@ -241,10 +241,10 @@ class crm_lead(format_address, osv.osv):
|
|||
'opt_out': fields.boolean('Opt-Out', oldname='optout',
|
||||
help="If opt-out is checked, this contact has refused to receive emails for mass mailing and marketing campaign. "
|
||||
"Filter 'Available for Mass Mailing' allows users to filter the leads when performing mass mailing."),
|
||||
'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
'type': fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', select=True, help="Type is used to separate Leads and Opportunities"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', track_visibility='onchange',
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', track_visibility='onchange', select=True,
|
||||
domain="['&', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"),
|
||||
'user_id': fields.many2one('res.users', 'Salesperson', select=True, track_visibility='onchange'),
|
||||
'referred': fields.char('Referred By', size=64),
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
openerp.crm_partner_assign = function (instance) {
|
||||
instance.crm_partner_assign = instance.crm_partner_assign || {};
|
||||
instance.crm_partner_assign.next_or_list = function(parent) {
|
||||
var view = parent.inner_widget.active_view;
|
||||
var controller = parent.inner_widget.views[view].controller;
|
||||
if (view === "form"){
|
||||
if (controller.dataset.size()) {
|
||||
controller.execute_pager_action('next');
|
||||
} else {
|
||||
controller.do_action('history_back');
|
||||
}
|
||||
}
|
||||
controller.do_action({ type: 'ir.actions.act_window_close' });
|
||||
if (view === "list"){
|
||||
controller.records.remove(controller.records.get(parent.dialog_widget.action.context.active_id));
|
||||
}
|
||||
};
|
||||
instance.web.client_actions.add("next_or_list", "instance.crm_partner_assign.next_or_list");
|
||||
}
|
|
@ -63,15 +63,12 @@ class crm_lead_forward_to_partner(osv.TransientModel):
|
|||
if wizard.comment:
|
||||
message += '<p>%s</p>' % wizard.comment
|
||||
for active_id in context.get('active_ids', []):
|
||||
lead_obj.message_post(cr, uid, active_id, body=message, context=context)
|
||||
lead_obj.message_post(cr, uid, active_id, body=message, subtype="mail.mt_comment", context=context)
|
||||
if values:
|
||||
lead_obj.write(cr, SUPERUSER_ID, context.get('active_ids', []), values)
|
||||
if wizard.interested:
|
||||
for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context):
|
||||
lead_obj.convert_opportunity(cr, SUPERUSER_ID, [lead.id], lead.partner_id and lead.partner_id.id or None, context=None)
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'next_or_list',
|
||||
'params': {
|
||||
},
|
||||
'type': 'ir.actions.act_window_close',
|
||||
}
|
||||
|
|
|
@ -58,20 +58,18 @@ class sale_order(osv.Model):
|
|||
result.update(carrier_id=order.carrier_id.id)
|
||||
return result
|
||||
|
||||
def _delivery_unset(self, cr, uid, order, context=None):
|
||||
line_ids = [line.id for line in order.order_line if line.is_delivery]
|
||||
self.pool['sale.order.line'].unlink(cr, uid, line_ids, context=context)
|
||||
order.refresh()
|
||||
return True
|
||||
def _delivery_unset(self, cr, uid, ids, context=None):
|
||||
sale_obj = self.pool['sale.order.line']
|
||||
line_ids = sale_obj.search(cr, uid, [('order_id', 'in', ids), ('is_delivery', '=', True)],context=context)
|
||||
sale_obj.unlink(cr, uid, line_ids, context=context)
|
||||
|
||||
def delivery_set(self, cr, uid, ids, context=None):
|
||||
line_obj = self.pool.get('sale.order.line')
|
||||
grid_obj = self.pool.get('delivery.grid')
|
||||
carrier_obj = self.pool.get('delivery.carrier')
|
||||
acc_fp_obj = self.pool.get('account.fiscal.position')
|
||||
|
||||
self._delivery_unset(cr, uid, ids, context=context)
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
self._delivery_unset(cr, uid, order, context=context)
|
||||
grid_id = carrier_obj.grid_get(cr, uid, [order.carrier_id.id], order.partner_shipping_id.id)
|
||||
if not grid_id:
|
||||
raise osv.except_osv(_('No Grid Available!'), _('No grid matching for this carrier!'))
|
||||
|
|
|
@ -111,16 +111,30 @@ class event_event(osv.osv):
|
|||
"""Get reserved, available, reserved but unconfirmed and used seats.
|
||||
@return: Dictionary of function field values.
|
||||
"""
|
||||
res = dict([(id, {}) for id in ids])
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
res[event.id]['seats_reserved'] = sum(reg.nb_register for reg in event.registration_ids if reg.state == "open")
|
||||
res[event.id]['seats_used'] = sum(reg.nb_register for reg in event.registration_ids if reg.state == "done")
|
||||
res[event.id]['seats_unconfirmed'] = sum(reg.nb_register for reg in event.registration_ids if reg.state == "draft")
|
||||
keys = {'draft': 'seats_unconfirmed', 'open':'seats_reserved', 'done': 'seats_used'}
|
||||
res = {}
|
||||
for event_id in ids:
|
||||
res[event_id] = {key:0 for key in keys.values()}
|
||||
query = "SELECT state, sum(nb_register) FROM event_registration WHERE event_id = %s AND state IN ('draft','open','done') GROUP BY state"
|
||||
for event in self.pool.get('event.event').browse(cr, uid, ids, context=context):
|
||||
cr.execute(query, (event.id,))
|
||||
reg_states = cr.fetchall()
|
||||
for reg_state in reg_states:
|
||||
res[event.id][keys[reg_state[0]]] = reg_state[1]
|
||||
res[event.id]['seats_available'] = event.seats_max - \
|
||||
(res[event.id]['seats_reserved'] + res[event.id]['seats_used']) \
|
||||
if event.seats_max > 0 else None
|
||||
return res
|
||||
|
||||
def _get_events_from_registrations(self, cr, uid, ids, context=None):
|
||||
"""Get reserved, available, reserved but unconfirmed and used seats, of the event related to a registration.
|
||||
@return: Dictionary of function field values.
|
||||
"""
|
||||
event_ids=set()
|
||||
for registration in self.browse(cr, uid, ids, context=context):
|
||||
event_ids.add(registration.event_id.id)
|
||||
return list(event_ids)
|
||||
|
||||
def _subscribe_fnc(self, cr, uid, ids, fields, args, context=None):
|
||||
"""This functional fields compute if the current user (uid) is already subscribed or not to the event passed in parameter (ids)
|
||||
"""
|
||||
|
@ -142,10 +156,18 @@ class event_event(osv.osv):
|
|||
'type': fields.many2one('event.type', 'Type of Event', readonly=False, states={'done': [('readonly', True)]}),
|
||||
'seats_max': fields.integer('Maximum Avalaible Seats', oldname='register_max', help="You can for each event define a maximum registration level. If you have too much registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'seats_min': fields.integer('Minimum Reserved Seats', oldname='register_min', help="You can for each event define a minimum registration level. If you do not enough registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'seats_reserved': fields.function(_get_seats, oldname='register_current', string='Reserved Seats', type='integer', multi='seats_reserved'),
|
||||
'seats_available': fields.function(_get_seats, oldname='register_avail', string='Available Seats', type='integer', multi='seats_reserved'),
|
||||
'seats_unconfirmed': fields.function(_get_seats, oldname='register_prospect', string='Unconfirmed Seat Reservations', type='integer', multi='seats_reserved'),
|
||||
'seats_used': fields.function(_get_seats, oldname='register_attended', string='Number of Participations', type='integer', multi='seats_reserved'),
|
||||
'seats_reserved': fields.function(_get_seats, oldname='register_current', string='Reserved Seats', type='integer', multi='seats_reserved',
|
||||
store={'event.registration': (_get_events_from_registrations, ['state'], 10),
|
||||
'event.event': (lambda self, cr, uid, ids, c = {}: ids, ['seats_max'], 20)}),
|
||||
'seats_available': fields.function(_get_seats, oldname='register_avail', string='Available Seats', type='integer', multi='seats_reserved',
|
||||
store={'event.registration': (_get_events_from_registrations, ['state'], 10),
|
||||
'event.event': (lambda self, cr, uid, ids, c = {}: ids, ['seats_max'], 20)}),
|
||||
'seats_unconfirmed': fields.function(_get_seats, oldname='register_prospect', string='Unconfirmed Seat Reservations', type='integer', multi='seats_reserved',
|
||||
store={'event.registration': (_get_events_from_registrations, ['state'], 10),
|
||||
'event.event': (lambda self, cr, uid, ids, c = {}: ids, ['seats_max'], 20)}),
|
||||
'seats_used': fields.function(_get_seats, oldname='register_attended', string='Number of Participations', type='integer', multi='seats_reserved',
|
||||
store={'event.registration': (_get_events_from_registrations, ['state'], 10),
|
||||
'event.event': (lambda self, cr, uid, ids, c = {}: ids, ['seats_max'], 20)}),
|
||||
'registration_ids': fields.one2many('event.registration', 'event_id', 'Registrations', readonly=False, states={'done': [('readonly', True)]}),
|
||||
'date_begin': fields.datetime('Start Date', required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'date_end': fields.datetime('End Date', required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<field name="supplier" position="after">
|
||||
<field name="speaker"/>
|
||||
<label for="speaker"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
'installable': True,
|
||||
'auto_install': False,
|
||||
'js': [
|
||||
'static/lib/gapi/client.js',
|
||||
'static/src/js/gdrive.js',
|
||||
],
|
||||
'data': [
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
var gapi=window.gapi=window.gapi||{};gapi._bs=new Date().getTime();(function(){var f=null,g=encodeURIComponent,k=window,m=decodeURIComponent,n="push",r="test",t="shift",u="replace",y="length",B="split",C="join";var D=k,E=document,aa=D.location,ba=function(){},ca=/\[native code\]/,G=function(a,b,c){return a[b]=a[b]||c},da=function(a){for(var b=0;b<this[y];b++)if(this[b]===a)return b;return-1},ea=function(a){a=a.sort();for(var b=[],c=void 0,d=0;d<a[y];d++){var e=a[d];e!=c&&b[n](e);c=e}return b},H=function(){var a;if((a=Object.create)&&ca[r](a))a=a(f);else{a={};for(var b in a)a[b]=void 0}return a},I=G(D,"gapi",{});var J;J=G(D,"___jsl",H());G(J,"I",0);G(J,"hel",10);var K=function(){var a=aa.href,b;if(J.dpo)b=J.h;else{b=J.h;var c=RegExp("([#].*&|[#])jsh=([^&#]*)","g"),d=RegExp("([?#].*&|[?#])jsh=([^&#]*)","g");if(a=a&&(c.exec(a)||d.exec(a)))try{b=m(a[2])}catch(e){}}return b},fa=function(a){var b=G(J,"PQ",[]);J.PQ=[];var c=b[y];if(0===c)a();else for(var d=0,e=function(){++d===c&&a()},h=0;h<c;h++)b[h](e)},L=function(a){return G(G(J,"H",H()),a,H())};var M=G(J,"perf",H()),N=G(M,"g",H()),ga=G(M,"i",H());G(M,"r",[]);H();H();var O=function(a,b,c){var d=M.r;"function"===typeof d?d(a,b,c):d[n]([a,b,c])},Q=function(a,b,c){b&&0<b[y]&&(b=P(b),c&&0<c[y]&&(b+="___"+P(c)),28<b[y]&&(b=b.substr(0,28)+(b[y]-28)),c=b,b=G(ga,"_p",H()),G(b,c,H())[a]=(new Date).getTime(),O(a,"_p",c))},P=function(a){return a[C]("__")[u](/\./g,"_")[u](/\-/g,"_")[u](/\,/g,"_")};var S=H(),T=[],U=function(a){throw Error("Bad hint"+(a?": "+a:""));};T[n](["jsl",function(a){for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b)){var c=a[b];"object"==typeof c?J[b]=G(J,b,[]).concat(c):G(J,b,c)}if(b=a.u)a=G(J,"us",[]),a[n](b),(b=/^https:(.*)$/.exec(b))&&a[n]("http:"+b[1])}]);var ha=/^(\/[a-zA-Z0-9_\-]+)+$/,ia=/^[a-zA-Z0-9\-_\.!]+$/,ja=/^gapi\.loaded_[0-9]+$/,ka=/^[a-zA-Z0-9,._-]+$/,oa=function(a,b,c,d){var e=a[B](";"),h=S[e[t]()],l=f;h&&(l=h(e,b,c,d));if(!(b=!l))b=l,c=b.match(la),d=b.match(ma),b=!(d&&1===d[y]&&na[r](b)&&c&&1===c[y]);b&&U(a);return l},qa=function(a,b,c,d){a=pa(a);ja[r](c)||U("invalid_callback");b=V(b);d=d&&d[y]?V(d):f;var e=function(a){return g(a)[u](/%2C/g,",")};return[g(a.d)[u](/%2C/g,",")[u](/%2F/g,"/"),"/k=",e(a.version),"/m=",e(b),d?"/exm="+e(d):
|
||||
"","/rt=j/sv=1/d=1/ed=1",a.a?"/am="+e(a.a):"",a.b?"/rs="+e(a.b):"","/cb=",e(c)][C]("")},pa=function(a){"/"!==a.charAt(0)&&U("relative path");for(var b=a.substring(1)[B]("/"),c=[];b[y];){a=b[t]();if(!a[y]||0==a.indexOf("."))U("empty/relative directory");else if(0<a.indexOf("=")){b.unshift(a);break}c[n](a)}a={};for(var d=0,e=b[y];d<e;++d){var h=b[d][B]("="),l=m(h[0]),p=m(h[1]);2!=h[y]||(!l||!p)||(a[l]=a[l]||p)}b="/"+c[C]("/");ha[r](b)||U("invalid_prefix");c=W(a,"k",!0);d=W(a,"am");a=W(a,"rs");return{d:b,
|
||||
version:c,a:d,b:a}},V=function(a){for(var b=[],c=0,d=a[y];c<d;++c){var e=a[c][u](/\./g,"_")[u](/-/g,"_");ka[r](e)&&b[n](e)}return b[C](",")},W=function(a,b,c){a=a[b];!a&&c&&U("missing: "+b);if(a){if(ia[r](a))return a;U("invalid: "+b)}return f},na=/^https?:\/\/[a-z0-9_.-]+\.google\.com(:\d+)?\/[a-zA-Z0-9_.,!=\-\/]+$/,ma=/\/cb=/g,la=/\/\//g,ra=function(){var a=K();if(!a)throw Error("Bad hint");return a};S.m=function(a,b,c,d){(a=a[0])||U("missing_hint");return"https://apis.google.com"+qa(a,b,c,d)};var X=decodeURI("%73cript"),Y=function(a,b){for(var c=[],d=0;d<a[y];++d){var e=a[d];e&&0>da.call(b,e)&&c[n](e)}return c},sa=function(a){"loading"!=E.readyState?Z(a):E.write("<"+X+' src="'+encodeURI(a)+'"></'+X+">")},Z=function(a){var b=E.createElement(X);b.setAttribute("src",a);b.async="true";(a=E.getElementsByTagName(X)[0])?a.parentNode.insertBefore(b,a):(E.head||E.body||E.documentElement).appendChild(b)},ta=function(a,b){var c=b&&b._c;if(c)for(var d=0;d<T[y];d++){var e=T[d][0],h=T[d][1];h&&Object.prototype.hasOwnProperty.call(c,
|
||||
e)&&h(c[e],a,b)}},ua=function(a,b){$(function(){var c;c=b===K()?G(I,"_",H()):H();c=G(L(b),"_",c);a(c)})},wa=function(a,b){var c=b||{};"function"==typeof b&&(c={},c.callback=b);ta(a,c);var d=a?a[B](":"):[],e=c.h||ra(),h=G(J,"ah",H());if(!h["::"]||!d[y])va(d||[],c,e);else{for(var l=[],p=f;p=d[t]();){var v=p[B]("."),v=h[p]||h[v[1]&&"ns:"+v[0]||""]||e,s=l[y]&&l[l[y]-1]||f,z=s;if(!s||s.hint!=v)z={hint:v,c:[]},l[n](z);z.c[n](p)}var A=l[y];if(1<A){var F=c.callback;F&&(c.callback=function(){0==--A&&F()})}for(;d=
|
||||
l[t]();)va(d.c,c,d.hint)}},va=function(a,b,c){a=ea(a)||[];var d=b.callback,e=b.config,h=b.timeout,l=b.ontimeout,p=f,v=!1;if(h&&!l||!h&&l)throw"Timeout requires both the timeout parameter and ontimeout parameter to be set";var s=G(L(c),"r",[]).sort(),z=G(L(c),"L",[]).sort(),A=[].concat(s),F=function(a,b){if(v)return 0;D.clearTimeout(p);z[n].apply(z,q);var d=((I||{}).config||{}).update;d?d(e):e&&G(J,"cu",[])[n](e);if(b){Q("me0",a,A);try{ua(b,c)}finally{Q("me1",a,A)}}return 1};0<h&&(p=D.setTimeout(function(){v=
|
||||
!0;l()},h));var q=Y(a,z);if(q[y]){var q=Y(a,s),w=G(J,"CP",[]),x=w[y];w[x]=function(a){if(!a)return 0;Q("ml1",q,A);var b=function(b){w[x]=f;F(q,a)&&fa(function(){d&&d();b()})},c=function(){var a=w[x+1];a&&a()};0<x&&w[x-1]?w[x]=function(){b(c)}:b(c)};if(q[y]){var R="loaded_"+J.I++;I[R]=function(a){w[x](a);I[R]=f};a=oa(c,q,"gapi."+R,s);s[n].apply(s,q);Q("ml0",q,A);b.sync||D.___gapisync?sa(a):Z(a)}else w[x](ba)}else F(q)&&d&&d()};var $=function(a){if(J.hee&&0<J.hel)try{return a()}catch(b){J.hel--,wa("debug_error",function(){k.___jsl.hefn(b)})}else return a()};I.load=function(a,b){return $(function(){return wa(a,b)})};N.bs0=k.gapi._bs||(new Date).getTime();O("bs0");N.bs1=(new Date).getTime();O("bs1");delete k.gapi._bs;})();
|
||||
gapi.load("client",{callback:window["gapi_onload"],_c:{"jsl":{"ci":{"services":{},"deviceType":"desktop","lexps":[102,103,100,71,98,96,110,108,79,106,45,17,86,81,112,61,30],"inline":{"css":1},"report":{},"oauth-flow":{"disableOpt":true,"authUrl":"https://accounts.google.com/o/oauth2/auth","proxyUrl":"https://accounts.google.com/o/oauth2/postmessageRelay","persist":true},"isLoggedIn":true,"isPlusUser":true,"iframes":{"additnow":{"methods":["launchurl"],"url":"https://apis.google.com/additnow/additnow.html?bsv"},"shortlists":{"url":"?bsv"},"plus":{"methods":["onauth"],"url":":socialhost:/u/:session_index:/_/pages/badge?bsv"},":socialhost:":"https://plusone.google.com","recobox":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/recobox?bsv"},"plus_followers":{"params":{"url":""},"url":":socialhost:/_/im/_/widget/render/plus/followers?bsv"},"autocomplete":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/autocomplete?bsv"},"plus_share":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/+1/sharebutton?plusShare\u003dtrue\u0026bsv"},"savetowallet":{"url":"https://clients5.google.com/s2w/o/savetowallet?bsv"},"panoembed":{"url":"https://ssl.gstatic.com/pano/embed/?bsv"},"signin":{"methods":["onauth"],"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/signin?bsv"},"appcirclepicker":{"url":":socialhost:/:session_prefix:_/widget/render/appcirclepicker?bsv"},"commentcount":{"url":":socialhost:/:session_prefix:_/widget/render/commentcount?bsv"},"hangout":{"url":"https://talkgadget.google.com/:session_prefix:talkgadget/_/widget?bsv"},"plus_circle":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/plus/circle?bsv"},"savetodrive":{"methods":["save"],"url":"https://drive.google.com/savetodrivebutton?usegapi\u003d1\u0026bsv"},"card":{"url":":socialhost:/:session_prefix:_/hovercard/card?bsv"},"evwidget":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/events/widget?bsv"},"zoomableimage":{"url":"https://ssl.gstatic.com/microscope/embed/?bsv"},":signuphost:":"https://plus.google.com","plusone":{"preloadUrl":["https://ssl.gstatic.com/s2/oz/images/stars/po/Publisher/sprite4-a67f741843ffc4220554c34bd01bb0bb.png"],"params":{"count":"","size":"","url":""},"url":":socialhost:/:session_prefix:_/+1/fastbutton?bsv"},"comments":{"methods":["scroll","openwindow"],"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/comments?bsv"}},"debug":{"host":"https://plusone.google.com","reportExceptionRate":0.05,"rethrowException":true},"csi":{"rate":0.01},"googleapis.config":{"mobilesignupurl":"https://m.google.com/app/plus/oob?"}},"h":"m;/_/scs/apps-static/_/js/k\u003doz.gapi.en.02N985CHyyc.O/m\u003d__features__/am\u003dIQ/rt\u003dj/d\u003d1/rs\u003dAItRSTPZZ0JVQCv9Qljsu0NQlsb1ZzD2zQ","u":"https://apis.google.com/js/client.js","hee":true,"fp":"e2aa6cd0095417dbec61deca3abed1394160dab3","dpo":false},"fp":"e2aa6cd0095417dbec61deca3abed1394160dab3","annotation":["autocomplete","profile","interactivepost"],"bimodal":["signin"]}});
|
|
@ -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-06-22 10:54+0000\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:21+0000\n"
|
||||
"Last-Translator: Dariusz Kubiak <d.kubiak@macopedia.pl>\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: 2014-03-27 06:53+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: selection:hr.holidays.status,color_name:0
|
||||
|
@ -680,7 +680,7 @@ msgstr "Podsumowanie"
|
|||
#. module: hr_holidays
|
||||
#: model:hr.holidays.status,name:hr_holidays.holiday_status_unpaid
|
||||
msgid "Unpaid"
|
||||
msgstr "Bezpłatny"
|
||||
msgstr "Urlop bezpłatny"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: xsl:holidays.summary:0
|
||||
|
|
|
@ -571,7 +571,7 @@ class hr_payslip(osv.osv):
|
|||
payslip_obj = Payslips(self.pool, cr, uid, payslip.employee_id.id, payslip)
|
||||
rules_obj = BrowsableObject(self.pool, cr, uid, payslip.employee_id.id, rules)
|
||||
|
||||
localdict = {'categories': categories_obj, 'rules': rules_obj, 'payslip': payslip_obj, 'worked_days': worked_days_obj, 'inputs': input_obj}
|
||||
baselocaldict = {'categories': categories_obj, 'rules': rules_obj, 'payslip': payslip_obj, 'worked_days': worked_days_obj, 'inputs': input_obj}
|
||||
#get the ids of the structures on the contracts and their parent id as well
|
||||
structure_ids = self.pool.get('hr.contract').get_all_structures(cr, uid, contract_ids, context=context)
|
||||
#get the rules of the structure and thier children
|
||||
|
@ -581,11 +581,12 @@ class hr_payslip(osv.osv):
|
|||
|
||||
for contract in self.pool.get('hr.contract').browse(cr, uid, contract_ids, context=context):
|
||||
employee = contract.employee_id
|
||||
localdict.update({'employee': employee, 'contract': contract})
|
||||
localdict = dict(baselocaldict, employee=employee, contract=contract)
|
||||
for rule in obj_rule.browse(cr, uid, sorted_rule_ids, context=context):
|
||||
key = rule.code + '-' + str(contract.id)
|
||||
localdict['result'] = None
|
||||
localdict['result_qty'] = 1.0
|
||||
localdict['result_rate'] = 100
|
||||
#check if the rule can be applied
|
||||
if obj_rule.satisfy_condition(cr, uid, rule.id, localdict, context=context) and rule.id not in blacklist:
|
||||
#compute the amount of the rule
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
<h3 class="oe_slogan">Organize your vacancies and applications</h3>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=website_hr">
|
||||
<img src="">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
|
|
|
@ -54,11 +54,10 @@ class EscposDriver(Thread):
|
|||
return connected
|
||||
|
||||
def lockedstart(self):
|
||||
self.lock.acquire()
|
||||
if not self.isAlive():
|
||||
self.daemon = True
|
||||
self.start()
|
||||
self.lock.release()
|
||||
with self.lock:
|
||||
if not self.isAlive():
|
||||
self.daemon = True
|
||||
self.start()
|
||||
|
||||
def get_escpos_printer(self):
|
||||
try:
|
||||
|
|
|
@ -88,10 +88,10 @@ class Scanner(Thread):
|
|||
}
|
||||
|
||||
def lockedstart(self):
|
||||
self.lock.acquire()
|
||||
if not self.isAlive():
|
||||
self.start()
|
||||
self.lock.release()
|
||||
with self.lock:
|
||||
if not self.isAlive():
|
||||
self.daemon = True
|
||||
self.start()
|
||||
|
||||
def set_status(self, status, message = None):
|
||||
if status == self.status['status']:
|
||||
|
|
|
@ -2052,6 +2052,8 @@
|
|||
<field name="description">VAT-IN-V82-CAR-EXC-C1</field>
|
||||
<field name="name">Frais de voiture - VAT 50% Non Deductible</field>
|
||||
<field name="parent_id" ref="attn_VAT-IN-V82-CAR-EXC"/>
|
||||
<field name="account_collected_id" ref="a64012"/>
|
||||
<field name="account_paid_id" ref="a64012"/>
|
||||
<field name="price_include" eval="0"/>
|
||||
<field name="amount">0.105</field>
|
||||
<field name="type">percent</field>
|
||||
|
|
|
@ -40,11 +40,6 @@
|
|||
<field name="tax_src_id" ref="tva_normale" />
|
||||
<field name="tax_dest_id" ref="tva_intra_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_vt_normale_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_normale_temp" />
|
||||
<field name="tax_dest_id" ref="tva_intra_0" />
|
||||
</record>
|
||||
<!-- Taux DOM-TOM -->
|
||||
<record id="fp_tax_template_intraeub2b_vt_specifique" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
|
@ -57,22 +52,12 @@
|
|||
<field name="tax_src_id" ref="tva_intermediaire" />
|
||||
<field name="tax_dest_id" ref="tva_intra_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_vt_intermediaire_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_intermediaire_temp" />
|
||||
<field name="tax_dest_id" ref="tva_intra_0" />
|
||||
</record>
|
||||
<!-- Taux réduit -->
|
||||
<record id="fp_tax_template_intraeub2b_vt_reduite" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_reduite" />
|
||||
<field name="tax_dest_id" ref="tva_intra_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_vt_reduite_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_reduite_temp" />
|
||||
<field name="tax_dest_id" ref="tva_intra_0" />
|
||||
</record>
|
||||
<!-- Taux super réduit -->
|
||||
<record id="fp_tax_template_intraeub2b_vt_super_reduite" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
|
@ -91,17 +76,6 @@
|
|||
<field name="tax_src_id" ref="tva_acq_normale" />
|
||||
<field name="tax_dest_id" ref="tva_acq_intra_normale" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_ha_normale_deduc_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_acq_normale_temp" />
|
||||
<field name="tax_dest_id" ref="tva_intra_normale_temp" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_ha_normale_acq_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_acq_normale_temp" />
|
||||
<field name="tax_dest_id" ref="tva_acq_intra_normale_temp" />
|
||||
</record>
|
||||
|
||||
<!-- Taux DOM-TOM -->
|
||||
<record id="fp_tax_template_intraeub2b_ha_specifique_deduc" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
|
@ -124,17 +98,6 @@
|
|||
<field name="tax_src_id" ref="tva_acq_intermediaire" />
|
||||
<field name="tax_dest_id" ref="tva_acq_intra_intermediaire" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_ha_intermediaire_deduc_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_acq_intermediaire_temp" />
|
||||
<field name="tax_dest_id" ref="tva_intra_intermediaire_temp" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_ha_intermediaire_acq_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_acq_intermediaire_temp" />
|
||||
<field name="tax_dest_id" ref="tva_acq_intra_intermediaire_temp" />
|
||||
</record>
|
||||
|
||||
<!-- Taux réduit -->
|
||||
<record id="fp_tax_template_intraeub2b_ha_reduite_deduc" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
|
@ -146,17 +109,6 @@
|
|||
<field name="tax_src_id" ref="tva_acq_reduite" />
|
||||
<field name="tax_dest_id" ref="tva_acq_intra_reduite" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_ha_reduite_deduc_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_acq_reduite_temp" />
|
||||
<field name="tax_dest_id" ref="tva_intra_reduite_temp" />
|
||||
</record>
|
||||
<record id="fp_tax_template_intraeub2b_ha_reduite_acq_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
<field name="tax_src_id" ref="tva_acq_reduite_temp" />
|
||||
<field name="tax_dest_id" ref="tva_acq_intra_reduite_temp" />
|
||||
</record>
|
||||
|
||||
<!-- Taux super réduit -->
|
||||
<record id="fp_tax_template_intraeub2b_ha_super_reduite_deduc" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
|
||||
|
@ -177,11 +129,6 @@
|
|||
<field name="tax_src_id" ref="tva_normale" />
|
||||
<field name="tax_dest_id" ref="tva_export_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_impexp_vt_normale_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_normale_temp" />
|
||||
<field name="tax_dest_id" ref="tva_export_0" />
|
||||
</record>
|
||||
<!-- Taux DOM-TOM -->
|
||||
<record id="fp_tax_template_impexp_vt_specifique" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
|
@ -194,22 +141,12 @@
|
|||
<field name="tax_src_id" ref="tva_intermediaire" />
|
||||
<field name="tax_dest_id" ref="tva_export_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_impexp_vt_intermediaire_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_intermediaire_temp" />
|
||||
<field name="tax_dest_id" ref="tva_export_0" />
|
||||
</record>
|
||||
<!-- Taux Réduit -->
|
||||
<record id="fp_tax_template_impexp_vt_reduite" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_reduite" />
|
||||
<field name="tax_dest_id" ref="tva_export_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_impexp_vt_reduite_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_reduite_temp" />
|
||||
<field name="tax_dest_id" ref="tva_export_0" />
|
||||
</record>
|
||||
<!-- Taux super réduit -->
|
||||
<record id="fp_tax_template_impexp_vt_super_reduite" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
|
@ -224,11 +161,6 @@
|
|||
<field name="tax_src_id" ref="tva_acq_normale" />
|
||||
<field name="tax_dest_id" ref="tva_import_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_impexp_ha_normale_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_acq_normale_temp" />
|
||||
<field name="tax_dest_id" ref="tva_import_0" />
|
||||
</record>
|
||||
<!-- Taux DOM-TOM -->
|
||||
<record id="fp_tax_template_impexp_ha_specifique" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
|
@ -241,23 +173,12 @@
|
|||
<field name="tax_src_id" ref="tva_acq_intermediaire" />
|
||||
<field name="tax_dest_id" ref="tva_import_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_impexp_ha_intermediaire_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_acq_intermediaire_temp" />
|
||||
<field name="tax_dest_id" ref="tva_import_0" />
|
||||
</record>
|
||||
<!-- Taux Réduit -->
|
||||
<record id="fp_tax_template_impexp_ha_reduite" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_acq_reduite" />
|
||||
<field name="tax_dest_id" ref="tva_import_0" />
|
||||
</record>
|
||||
<record id="fp_tax_template_impexp_ha_reduite_temp" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
<field name="tax_src_id" ref="tva_acq_reduite_temp" />
|
||||
<field name="tax_dest_id" ref="tva_import_0" />
|
||||
</record>
|
||||
|
||||
<!-- Taux super réduit -->
|
||||
<record id="fp_tax_template_impexp_ha_super_reduite" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import_export" />
|
||||
|
|
|
@ -29,28 +29,6 @@
|
|||
<field name="sequence" eval="1"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_normale_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA collectée (vente) 19,6%</field>
|
||||
<field name="description">19.6</field>
|
||||
<field name="amount" eval="0.196"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_col_196_ht"/>
|
||||
<field name="base_sign" eval="1"/>
|
||||
<field name="tax_code_id" ref="tax_col_196"/>
|
||||
<field name="tax_sign" eval="1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445711"/>
|
||||
<field name="account_paid_id" ref="pcg_445711"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_col_196_ht"/>
|
||||
<field name="ref_base_sign" eval="-1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_col_196"/>
|
||||
<field name="ref_tax_sign" eval="-1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_specifique">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
|
@ -96,51 +74,7 @@
|
|||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_intermediaire_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA collectée (vente) 7,0%</field>
|
||||
<field name="description">7.0</field>
|
||||
<field name="amount" eval="0.07"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_col_70_ht"/>
|
||||
<field name="base_sign" eval="1"/>
|
||||
<field name="tax_code_id" ref="tax_col_70"/>
|
||||
<field name="tax_sign" eval="1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445712"/>
|
||||
<field name="account_paid_id" ref="pcg_445712"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_col_70_ht"/>
|
||||
<field name="ref_base_sign" eval="-1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_col_70"/>
|
||||
<field name="ref_tax_sign" eval="-1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_reduite">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA collectée (vente) 5,0%</field>
|
||||
<field name="description">5.0</field>
|
||||
<field name="amount" eval="0.050"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_col_50_ht"/>
|
||||
<field name="base_sign" eval="1"/>
|
||||
<field name="tax_code_id" ref="tax_col_50"/>
|
||||
<field name="tax_sign" eval="1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445713"/>
|
||||
<field name="account_paid_id" ref="pcg_445713"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_col_50_ht"/>
|
||||
<field name="ref_base_sign" eval="-1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_col_50"/>
|
||||
<field name="ref_tax_sign" eval="-1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_reduite_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA collectée (vente) 5,5%</field>
|
||||
<field name="description">5.5</field>
|
||||
|
@ -208,28 +142,6 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_normale_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 19,6%</field>
|
||||
<field name="description">ACH-19.6</field>
|
||||
<field name="amount" eval="0.196"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_acq_196_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_acq_196"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_196_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_acq_196"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_specifique">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 8,5%</field>
|
||||
|
@ -274,51 +186,7 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intermediaire_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 7,0%</field>
|
||||
<field name="description">ACH-7.0</field>
|
||||
<field name="amount" eval="0.07"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_acq_70_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_acq_70"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_70_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_acq_70"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_reduite">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 5,0%</field>
|
||||
<field name="description">ACH-5.0</field>
|
||||
<field name="amount" eval="0.050"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_acq_50_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_acq_50"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_50_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_acq_50"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_reduite_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 5,5%</field>
|
||||
<field name="description">ACH-5.5</field>
|
||||
|
@ -387,29 +255,6 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_normale_TTC_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 19,6% TTC</field>
|
||||
<field name="description">ACH-19.6-TTC</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="0.196"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_acq_196_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_acq_196"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_196_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_acq_196"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_specifique_TTC">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 8,5% TTC</field>
|
||||
|
@ -456,53 +301,7 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intermediaire_TTC_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 7,0% TTC</field>
|
||||
<field name="description">ACH-7.0-TTC</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="0.07"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_acq_70_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_acq_70"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_70_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_acq_70"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_reduite_TTC">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 5,0% TTC</field>
|
||||
<field name="description">ACH-5.0-TTC</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="0.050"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_acq_50_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_acq_50"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_50_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_acq_50"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_reduite_TTC_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déductible (achat) 5,5% TTC</field>
|
||||
<field name="description">ACH-5.5-TTC</field>
|
||||
|
@ -573,28 +372,6 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_imm_normale_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd./immobilisation (achat) 19,6%</field>
|
||||
<field name="description">IMMO-19.6</field>
|
||||
<field name="amount" eval="0.196"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_imm_196_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_imm_196"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44562"/>
|
||||
<field name="account_paid_id" ref="pcg_44562"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_imm_196_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_imm_196"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_imm_specifique">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd./immobilisation (achat) 8,5%</field>
|
||||
|
@ -639,51 +416,7 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_imm_intermediaire_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd./immobilisation (achat) 7,0%</field>
|
||||
<field name="description">IMMO-7.0</field>
|
||||
<field name="amount" eval="0.07"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_imm_70_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_imm_70"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44562"/>
|
||||
<field name="account_paid_id" ref="pcg_44562"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_imm_70_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_imm_70"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_imm_reduite">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd./immobilisation (achat) 5,0%</field>
|
||||
<field name="description">IMMO-5.0</field>
|
||||
<field name="amount" eval="0.050"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_imm_50_ht"/>
|
||||
<field name="base_sign" eval="-1"/>
|
||||
<field name="tax_code_id" ref="tax_imm_50"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44562"/>
|
||||
<field name="account_paid_id" ref="pcg_44562"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_imm_50_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_imm_50"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_imm_reduite_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd./immobilisation (achat) 5,5%</field>
|
||||
<field name="description">IMMO-5.5</field>
|
||||
|
@ -751,28 +484,6 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_intra_normale_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA due s/ acq. intracommunautaire (achat) 19,6%</field> <!-- ventes -->
|
||||
<field name="description">ACH_UE_due-19.6</field>
|
||||
<field name="amount" eval="-0.196"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_intra_196_ht"/>
|
||||
<field name="base_sign" eval="-1" />
|
||||
<field name="tax_code_id" ref="tax_intra_196"/>
|
||||
<field name="tax_sign" eval="-1" />
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445201"/>
|
||||
<field name="account_paid_id" ref="pcg_445201"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_intra_196_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_intra_196"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_intra_specifique">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA due s/ acq. intracommunautaire (achat) 8,5%</field>
|
||||
|
@ -817,51 +528,7 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_intra_intermediaire_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA due s/ acq. intracommunautaire (achat) 7,0%</field>
|
||||
<field name="description">ACH_UE_due-7.0</field>
|
||||
<field name="amount" eval="-0.07"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_intra_70_ht"/>
|
||||
<field name="base_sign" eval="-1" />
|
||||
<field name="tax_code_id" ref="tax_intra_70"/>
|
||||
<field name="tax_sign" eval="-1" />
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445202"/>
|
||||
<field name="account_paid_id" ref="pcg_445202"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_intra_70_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_intra_70"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_intra_reduite">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA due s/ acq. intracommunautaire (achat) 5,0%</field>
|
||||
<field name="description">ACH_UE_due-5.0</field>
|
||||
<field name="amount" eval="-0.050"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="tax_intra_50_ht"/>
|
||||
<field name="base_sign" eval="-1" />
|
||||
<field name="tax_code_id" ref="tax_intra_50"/>
|
||||
<field name="tax_sign" eval="-1" />
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445203"/>
|
||||
<field name="account_paid_id" ref="pcg_445203"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_intra_50_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
<field name="ref_tax_code_id" ref="tax_intra_50"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_intra_reduite_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA due s/ acq. intracommunautaire (achat) 5,5%</field>
|
||||
<field name="description">ACH_UE_due-5.5</field>
|
||||
|
@ -925,24 +592,6 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intra_normale_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 19,6%</field>
|
||||
<field name="description">ACH_UE_ded.-19.6</field>
|
||||
<field name="amount" eval="0.196"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="tax_code_id" ref="tax_intra_acq_196"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445662"/>
|
||||
<field name="account_paid_id" ref="pcg_445662"/>
|
||||
|
||||
<field name="ref_tax_code_id" ref="tax_intra_acq_196"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intra_specifique">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 8,5%</field>
|
||||
|
@ -979,43 +628,7 @@
|
|||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intra_intermediaire_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 7,0%</field>
|
||||
<field name="description">ACH_UE_ded.-7.0</field>
|
||||
<field name="amount" eval="0.07"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="tax_code_id" ref="tax_intra_acq_70"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445662"/>
|
||||
<field name="account_paid_id" ref="pcg_445662"/>
|
||||
|
||||
<field name="ref_tax_code_id" ref="tax_intra_acq_70"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intra_reduite">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 5,0%</field>
|
||||
<field name="description">ACH_UE_ded.-5.0</field>
|
||||
<field name="amount" eval="0.050"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="tax_code_id" ref="tax_intra_acq_50"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_445662"/>
|
||||
<field name="account_paid_id" ref="pcg_445662"/>
|
||||
|
||||
<field name="ref_tax_code_id" ref="tax_intra_acq_50"/>
|
||||
<field name="ref_tax_sign" eval="1"/>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="tva_acq_intra_reduite_temp">
|
||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 5,5%</field>
|
||||
<field name="description">ACH_UE_ded.-5.5</field>
|
||||
|
|
|
@ -44,8 +44,6 @@ Con la Colaboración de
|
|||
],
|
||||
"demo_xml": [
|
||||
],
|
||||
"data": [
|
||||
],
|
||||
"active": False,
|
||||
"installable": True,
|
||||
"certificate" : "",
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||
"PO-Revision-Date: 2012-12-17 19:55+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:25+0000\n"
|
||||
"Last-Translator: Dariusz Żbikowski <Unknown>\n"
|
||||
"Language-Team: Polish <pl@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: 2014-03-27 07:26+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: mail
|
||||
#: view:mail.followers:0
|
||||
|
@ -1363,7 +1363,7 @@ msgstr "Wiadomość Rich-text/HTML"
|
|||
#. module: mail
|
||||
#: view:mail.mail:0
|
||||
msgid "Creation Month"
|
||||
msgstr "Miesiąc tworzenia"
|
||||
msgstr "Miesiąc utworzenia"
|
||||
|
||||
#. module: mail
|
||||
#. openerp-web
|
||||
|
@ -1509,7 +1509,7 @@ msgstr ""
|
|||
#: code:addons/mail/static/src/xml/mail.xml:213
|
||||
#, python-format
|
||||
msgid "Please, wait while the file is uploading."
|
||||
msgstr ""
|
||||
msgstr "Poczekaj, aż plik zostanie załadowany."
|
||||
|
||||
#. module: mail
|
||||
#: view:mail.group:0
|
||||
|
|
|
@ -76,8 +76,6 @@ Dashboard / Reports for MRP will include:
|
|||
'views/report_mrpbomstructure.xml',
|
||||
],
|
||||
'demo': ['mrp_demo.xml'],
|
||||
#TODO: This yml tests are needed to be completely reviewed again because the product wood panel is removed in product demo as it does not suit for new demo context of computer and consultant company
|
||||
# so the ymls are too complex to change at this stage
|
||||
'test': [
|
||||
'test/bom_with_service_type_product.yml',
|
||||
'test/mrp_users.yml',
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_account_analytic_line_user,account.analytic.line,account.model_account_analytic_line,group_mrp_user,1,1,1,0
|
||||
access_mrp_workcenter,mrp.workcenter,model_mrp_workcenter,mrp.group_mrp_user,1,0,0,0
|
||||
access_mrp_routing,mrp.routing,model_mrp_routing,mrp.group_mrp_user,1,0,0,0
|
||||
access_mrp_routing_workcenter,mrp.routing.workcenter,model_mrp_routing_workcenter,mrp.group_mrp_user,1,0,0,0
|
||||
|
|
|
|
@ -52,8 +52,15 @@ class PaymentAcquirer(osv.Model):
|
|||
_name = 'payment.acquirer'
|
||||
_description = 'Payment Acquirer'
|
||||
|
||||
def _get_providers(self, cr, uid, context=None):
|
||||
return []
|
||||
|
||||
# indirection to ease inheritance
|
||||
_provider_selection = lambda self, *args, **kwargs: self._get_providers(*args, **kwargs)
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', required=True),
|
||||
'provider': fields.selection(_provider_selection, string='Provider', required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'pre_msg': fields.html('Message', help='Message displayed to explain and help the payment process.'),
|
||||
'post_msg': fields.html('Thanks Message', help='Message displayed after having done the payment process.'),
|
||||
|
@ -84,10 +91,10 @@ class PaymentAcquirer(osv.Model):
|
|||
}
|
||||
|
||||
def _check_required_if_provider(self, cr, uid, ids, context=None):
|
||||
""" If the field has 'required_if_provider="<name>"' attribute, then it
|
||||
required if record.name is <name>. """
|
||||
""" If the field has 'required_if_provider="<provider>"' attribute, then it
|
||||
required if record.provider is <provider>. """
|
||||
for acquirer in self.browse(cr, uid, ids, context=context):
|
||||
if any(c for c, f in self._all_columns.items() if getattr(f.column, 'required_if_provider', None) == acquirer.name and not acquirer[c]):
|
||||
if any(c for c, f in self._all_columns.items() if getattr(f.column, 'required_if_provider', None) == acquirer.provider and not acquirer[c]):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -98,8 +105,8 @@ class PaymentAcquirer(osv.Model):
|
|||
def get_form_action_url(self, cr, uid, id, context=None):
|
||||
""" Returns the form action URL, for form-based acquirer implementations. """
|
||||
acquirer = self.browse(cr, uid, id, context=context)
|
||||
if hasattr(self, '%s_get_form_action_url' % acquirer.name):
|
||||
return getattr(self, '%s_get_form_action_url' % acquirer.name)(cr, uid, id, context=context)
|
||||
if hasattr(self, '%s_get_form_action_url' % acquirer.provider):
|
||||
return getattr(self, '%s_get_form_action_url' % acquirer.provider)(cr, uid, id, context=context)
|
||||
return False
|
||||
|
||||
def form_preprocess_values(self, cr, uid, id, reference, amount, currency_id, tx_id, partner_id, partner_values, tx_values, context=None):
|
||||
|
@ -178,7 +185,7 @@ class PaymentAcquirer(osv.Model):
|
|||
})
|
||||
|
||||
# compute fees
|
||||
fees_method_name = '%s_compute_fees' % acquirer.name
|
||||
fees_method_name = '%s_compute_fees' % acquirer.provider
|
||||
if hasattr(self, fees_method_name):
|
||||
fees = getattr(self, fees_method_name)(
|
||||
cr, uid, id, tx_data['amount'], tx_data['currency_id'], partner_data['country_id'], context=None)
|
||||
|
@ -237,7 +244,7 @@ class PaymentAcquirer(osv.Model):
|
|||
partner_values, tx_values, context=context)
|
||||
|
||||
# call <name>_form_generate_values to update the tx dict with acqurier specific values
|
||||
cust_method_name = '%s_form_generate_values' % (acquirer.name)
|
||||
cust_method_name = '%s_form_generate_values' % (acquirer.provider)
|
||||
if hasattr(self, cust_method_name):
|
||||
method = getattr(self, cust_method_name)
|
||||
partner_values, tx_values = method(cr, uid, id, partner_values, tx_values, context=context)
|
||||
|
@ -383,14 +390,14 @@ class PaymentTransaction(osv.Model):
|
|||
acquirer = self.pool['payment.acquirer'].browse(cr, uid, values.get('acquirer_id'), context=context)
|
||||
|
||||
# compute fees
|
||||
custom_method_name = '%s_compute_fees' % acquirer.name
|
||||
custom_method_name = '%s_compute_fees' % acquirer.provider
|
||||
if hasattr(Acquirer, custom_method_name):
|
||||
fees = getattr(Acquirer, custom_method_name)(
|
||||
cr, uid, acquirer.id, values.get('amount', 0.0), values.get('currency_id'), values.get('country_id'), context=None)
|
||||
values['fees'] = float_round(fees, 2)
|
||||
|
||||
# custom create
|
||||
custom_method_name = '%s_create' % acquirer.name
|
||||
custom_method_name = '%s_create' % acquirer.provider
|
||||
if hasattr(self, custom_method_name):
|
||||
values.update(getattr(self, custom_method_name)(cr, uid, values, context=context))
|
||||
|
||||
|
@ -469,7 +476,7 @@ class PaymentTransaction(osv.Model):
|
|||
|
||||
if values.get('acquirer_id'):
|
||||
acquirer = self.pool['payment.acquirer'].browse(cr, uid, values.get('acquirer_id'), context=context)
|
||||
custom_method_name = '_%s_s2s_send' % acquirer.name
|
||||
custom_method_name = '_%s_s2s_send' % acquirer.provider
|
||||
if hasattr(self, custom_method_name):
|
||||
tx_id, result = getattr(self, custom_method_name)(cr, uid, values, cc_values, context=context)
|
||||
|
||||
|
@ -482,7 +489,7 @@ class PaymentTransaction(osv.Model):
|
|||
tx = self.browse(cr, uid, tx_id, context=context)
|
||||
invalid_parameters = None
|
||||
|
||||
invalid_param_method_name = '_%s_s2s_get_invalid_parameters' % tx.acquirer_id.name
|
||||
invalid_param_method_name = '_%s_s2s_get_invalid_parameters' % tx.acquirer_id.provider
|
||||
if hasattr(self, invalid_param_method_name):
|
||||
invalid_parameters = getattr(self, invalid_param_method_name)(cr, uid, tx, data, context=context)
|
||||
|
||||
|
@ -493,7 +500,7 @@ class PaymentTransaction(osv.Model):
|
|||
_logger.error(_error_message)
|
||||
return False
|
||||
|
||||
feedback_method_name = '_%s_s2s_validate' % tx.acquirer_id.name
|
||||
feedback_method_name = '_%s_s2s_validate' % tx.acquirer_id.provider
|
||||
if hasattr(self, feedback_method_name):
|
||||
return getattr(self, feedback_method_name)(cr, uid, tx, data, context=context)
|
||||
|
||||
|
@ -503,7 +510,7 @@ class PaymentTransaction(osv.Model):
|
|||
""" Get the tx status. """
|
||||
tx = self.browse(cr, uid, tx_id, context=context)
|
||||
|
||||
invalid_param_method_name = '_%s_s2s_get_tx_status' % tx.acquirer_id.name
|
||||
invalid_param_method_name = '_%s_s2s_get_tx_status' % tx.acquirer_id.provider
|
||||
if hasattr(self, invalid_param_method_name):
|
||||
return getattr(self, invalid_param_method_name)(cr, uid, tx, context=context)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
parent='base.menu_administration'/>
|
||||
|
||||
<record id="acquirer_form" model="ir.ui.view">
|
||||
<field name="name">acquirer.form</field>
|
||||
<field name="name">payment.acquirer.form</field>
|
||||
<field name="model">payment.acquirer</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Acquirer" version="7.0">
|
||||
|
@ -16,6 +16,7 @@
|
|||
<group name="acquirer_base">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="provider"/>
|
||||
<field name="company_id"/>
|
||||
<field name="website_published"/>
|
||||
<field name="env"/>
|
||||
|
@ -62,10 +63,12 @@
|
|||
</record>
|
||||
|
||||
<record id="acquirer_list" model="ir.ui.view">
|
||||
<field name="name">payment.acquirer.list</field>
|
||||
<field name="model">payment.acquirer</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Payment Acquirers">
|
||||
<field name="name"/>
|
||||
<field name="provider"/>
|
||||
<field name="website_published"/>
|
||||
<field name="env"/>
|
||||
</tree>
|
||||
|
@ -73,10 +76,15 @@
|
|||
</record>
|
||||
|
||||
<record id="acquirer_search" model="ir.ui.view">
|
||||
<field name="name">payment.acquirer.search</field>
|
||||
<field name="model">payment.acquirer</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="provider"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Provider" name="provider" domain="[]" context="{'group_by': 'provider'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -95,6 +103,7 @@
|
|||
sequence='10' />
|
||||
|
||||
<record id="transaction_form" model="ir.ui.view">
|
||||
<field name="name">payment.transaction.form</field>
|
||||
<field name="model">payment.transaction</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Transactions" version="7.0">
|
||||
|
@ -138,6 +147,7 @@
|
|||
</record>
|
||||
|
||||
<record id="transaction_list" model="ir.ui.view">
|
||||
<field name="name">payment.transaction.list</field>
|
||||
<field name="model">payment.transaction</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Payment Transactions">
|
||||
|
@ -151,6 +161,7 @@
|
|||
</record>
|
||||
|
||||
<record id="transaction" model="ir.ui.view">
|
||||
<field name="name">payment.transaction.search</field>
|
||||
<field name="model">payment.transaction</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<record id="payment_acquirer_adyen" model="payment.acquirer">
|
||||
<field name="name">adyen</field>
|
||||
<field name="name">Adyen</field>
|
||||
<field name="provider">adyen</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="view_template_id" ref="adyen_acquirer_button"/>
|
||||
<field name="env">test</field>
|
||||
|
|
|
@ -26,14 +26,14 @@ class AcquirerAdyen(osv.Model):
|
|||
|
||||
- yhpp: hosted payment page: pay.shtml for single, select.shtml for multiple
|
||||
"""
|
||||
if env == 'prod':
|
||||
return {
|
||||
'adyen_form_url': 'https://prod.adyen.com/hpp/pay.shtml',
|
||||
}
|
||||
else:
|
||||
return {
|
||||
'adyen_form_url': 'https://test.adyen.com/hpp/pay.shtml',
|
||||
}
|
||||
return {
|
||||
'adyen_form_url': 'https://%s.adyen.com/hpp/pay.shtml' % env,
|
||||
}
|
||||
|
||||
def _get_providers(self, cr, uid, context=None):
|
||||
providers = super(AcquirerAdyen, self)._get_providers(cr, uid, context=context)
|
||||
providers.append(['adyen', 'Adyen'])
|
||||
return providers
|
||||
|
||||
_columns = {
|
||||
'adyen_merchant_account': fields.char('Merchant Account', required_if_provider='adyen'),
|
||||
|
@ -54,7 +54,7 @@ class AcquirerAdyen(osv.Model):
|
|||
:return string: shasign
|
||||
"""
|
||||
assert inout in ('in', 'out')
|
||||
assert acquirer.name == 'adyen'
|
||||
assert acquirer.provider == 'adyen'
|
||||
|
||||
if inout == 'in':
|
||||
keys = "paymentAmount currencyCode shipBeforeDate merchantReference skinCode merchantAccount sessionValidity shopperEmail shopperReference recurringContract allowedMethods blockedMethods shopperStatement merchantReturnData billingAddressType deliveryAddressType offset".split()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="inherit_id" ref="payment.acquirer_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//group[@name="acquirer_display"]' position='after'>
|
||||
<group attrs="{'invisible': [('name', '!=', 'adyen')]}">
|
||||
<group attrs="{'invisible': [('provider', '!=', 'adyen')]}">
|
||||
<field name="adyen_merchant_account"/>
|
||||
<field name="adyen_skin_code"/>
|
||||
<field name="adyen_skin_hmac_key"/>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<record id="payment_acquirer_ogone" model="payment.acquirer">
|
||||
<field name="name">ogone</field>
|
||||
<field name="name">Credit Card</field>
|
||||
<field name="provider">ogone</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="view_template_id" ref="ogone_acquirer_button"/>
|
||||
<field name="env">test</field>
|
||||
|
|
|
@ -36,6 +36,11 @@ class PaymentAcquirerOgone(osv.Model):
|
|||
'ogone_afu_agree_url': 'https://secure.ogone.com/ncol/%s/AFU_agree.asp' % (env,),
|
||||
}
|
||||
|
||||
def _get_providers(self, cr, uid, context=None):
|
||||
providers = super(PaymentAcquirerOgone, self)._get_providers(cr, uid, context=context)
|
||||
providers.append(['ogone', 'Ogone'])
|
||||
return providers
|
||||
|
||||
_columns = {
|
||||
'ogone_pspid': fields.char('PSPID', required_if_provider='ogone'),
|
||||
'ogone_userid': fields.char('API User ID', required_if_provider='ogone'),
|
||||
|
@ -57,7 +62,7 @@ class PaymentAcquirerOgone(osv.Model):
|
|||
:return string: shasign
|
||||
"""
|
||||
assert inout in ('in', 'out')
|
||||
assert acquirer.name == 'ogone'
|
||||
assert acquirer.provider == 'ogone'
|
||||
key = getattr(acquirer, 'ogone_shakey_' + inout)
|
||||
|
||||
def filter_key(key):
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="inherit_id" ref="payment.acquirer_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//group[@name="acquirer_display"]' position='after'>
|
||||
<group attrs="{'invisible': [('name', '!=', 'ogone')]}">
|
||||
<group attrs="{'invisible': [('provider', '!=', 'ogone')]}">
|
||||
<field name="ogone_pspid"/>
|
||||
<field name="ogone_userid"/>
|
||||
<field name="ogone_password"/>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<record id="payment_acquirer_paypal" model="payment.acquirer">
|
||||
<field name="name">paypal</field>
|
||||
<field name="name">Paypal</field>
|
||||
<field name="provider">paypal</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="view_template_id" ref="paypal_acquirer_button"/>
|
||||
<field name="env">test</field>
|
||||
|
|
|
@ -34,6 +34,11 @@ class AcquirerPaypal(osv.Model):
|
|||
'paypal_rest_url': 'https://api.sandbox.paypal.com/v1/oauth2/token',
|
||||
}
|
||||
|
||||
def _get_providers(self, cr, uid, context=None):
|
||||
providers = super(AcquirerPaypal, self)._get_providers(cr, uid, context=context)
|
||||
providers.append(['paypal', 'Paypal'])
|
||||
return providers
|
||||
|
||||
_columns = {
|
||||
'paypal_email_account': fields.char('Paypal Email ID', required_if_provider='paypal'),
|
||||
'paypal_seller_account': fields.char(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="inherit_id" ref="payment.acquirer_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//group[@name="acquirer_display"]' position='after'>
|
||||
<group attrs="{'invisible': [('name', '!=', 'paypal')]}">
|
||||
<group attrs="{'invisible': [('provider', '!=', 'paypal')]}">
|
||||
<group>
|
||||
<group>
|
||||
<field name="paypal_email_account"/>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<record id="payment_acquirer_transfer" model="payment.acquirer">
|
||||
<field name="name">transfer</field>
|
||||
<field name="name">Wire Transfer</field>
|
||||
<field name="provider">transfer</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="view_template_id" ref="transfer_acquirer_button"/>
|
||||
<field name="validation">manual</field>
|
||||
|
|
|
@ -14,6 +14,11 @@ _logger = logging.getLogger(__name__)
|
|||
class TransferPaymentAcquirer(osv.Model):
|
||||
_inherit = 'payment.acquirer'
|
||||
|
||||
def _get_providers(self, cr, uid, context=None):
|
||||
providers = super(TransferPaymentAcquirer, self)._get_providers(cr, uid, context=context)
|
||||
providers.append(['transfer', 'Wire Transfer'])
|
||||
return providers
|
||||
|
||||
def transfer_get_form_action_url(self, cr, uid, id, context=None):
|
||||
return '/payment/transfer/feedback'
|
||||
|
||||
|
|
|
@ -517,7 +517,8 @@ class pos_order(osv.osv):
|
|||
|
||||
# Keep only new orders
|
||||
submitted_references = [o['data']['name'] for o in orders]
|
||||
existing_orders = self.search_read(cr, uid, domain=[('pos_reference', 'in', submitted_references)], fields=['pos_reference'], context=context)
|
||||
existing_order_ids = self.search(cr, uid, [('pos_reference', 'in', submitted_references)], context=context)
|
||||
existing_orders = self.read(cr, uid, existing_order_ids, ['pos_reference'], context=context)
|
||||
existing_references = set([o['pos_reference'] for o in existing_orders])
|
||||
orders_to_save = [o for o in orders if o['data']['name'] not in existing_references]
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@ 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: 2012-12-16 20:56+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:08+0000\n"
|
||||
"Last-Translator: Dariusz Żbikowski <Unknown>\n"
|
||||
"Language-Team: Polish <pl@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: 2014-03-27 07:18+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: procurement
|
||||
#: model:ir.ui.menu,name:procurement.menu_stock_sched
|
||||
|
@ -493,7 +493,7 @@ msgstr "Nieprzeczytane wiadomości"
|
|||
#. module: procurement
|
||||
#: selection:mrp.property,composition:0
|
||||
msgid "plus"
|
||||
msgstr ""
|
||||
msgstr "plus"
|
||||
|
||||
#. module: procurement
|
||||
#: help:procurement.order,state:0
|
||||
|
@ -515,6 +515,8 @@ msgid ""
|
|||
"If the active field is set to False, it will allow you to hide the "
|
||||
"orderpoint without removing it."
|
||||
msgstr ""
|
||||
"Jeśli pole nie jest aktywne, pozwoli ci ukryć punkt zamawiania bez jego "
|
||||
"kasowania."
|
||||
|
||||
#. module: procurement
|
||||
#: view:product.product:0
|
||||
|
@ -547,8 +549,8 @@ msgid ""
|
|||
"You have to select a product unit of measure in the same category than the "
|
||||
"default unit of measure of the product"
|
||||
msgstr ""
|
||||
"Musisz wybrać jednostkę miary z tej samej kategorii do domyślna jednostka "
|
||||
"produktu."
|
||||
"Musisz wybrać jednostkę miary z tej samej kategorii, co domyślna jednostka "
|
||||
"produktu"
|
||||
|
||||
#. module: procurement
|
||||
#: view:procurement.order:0
|
||||
|
@ -589,7 +591,7 @@ msgstr "Projekt"
|
|||
#: model:ir.ui.menu,name:procurement.menu_stock_proc_schedulers
|
||||
#: view:procurement.order.compute.all:0
|
||||
msgid "Run Schedulers"
|
||||
msgstr "uruchom planowanie"
|
||||
msgstr "Uruchom planowanie"
|
||||
|
||||
#. module: procurement
|
||||
#: view:procurement.order.compute:0
|
||||
|
@ -1027,7 +1029,7 @@ msgstr "Zapotrzbowanie uruchomione późno"
|
|||
#. module: procurement
|
||||
#: selection:mrp.property,composition:0
|
||||
msgid "min"
|
||||
msgstr ""
|
||||
msgstr "min."
|
||||
|
||||
#. module: procurement
|
||||
#: view:make.procurement:0
|
||||
|
|
|
@ -439,7 +439,8 @@ class procurement_order(osv.osv):
|
|||
if len(to_cancel):
|
||||
move_obj.action_cancel(cr, uid, to_cancel)
|
||||
if len(to_assign):
|
||||
move_obj.write(cr, uid, to_assign, {'state': 'assigned'})
|
||||
move_obj.write(cr, uid, to_assign, {'state': 'confirmed'})
|
||||
move_obj.action_assign(cr, uid, to_assign)
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
for id in ids:
|
||||
workflow.trg_trigger(uid, 'procurement.order', id, cr)
|
||||
|
|
|
@ -10,7 +10,7 @@ Add email templates to products to be send on invoice confirmation
|
|||
==================================================================
|
||||
|
||||
With this module, link your products to a template to send complete information and tools to your customer.
|
||||
For instance when invoicing a training, the training agenda and materials will automatically be send to your customers.'
|
||||
For instance when invoicing a training, the training agenda and materials will automatically be sent to your customers.'
|
||||
""",
|
||||
'website': 'http://www.openerp.com',
|
||||
'demo': [
|
||||
|
|
|
@ -13,7 +13,7 @@ class product_template(osv.Model):
|
|||
_columns = {
|
||||
'email_template_id': fields.many2one(
|
||||
'email.template', 'Product Email Template',
|
||||
help='When validating an invoice, an email will be send to the customer'
|
||||
help='When validating an invoice, an email will be sent to the customer'
|
||||
'based on this template. The customer will receive an email for each'
|
||||
'product linked to an email template.'),
|
||||
}
|
||||
|
|
|
@ -287,7 +287,9 @@ class project(osv.osv):
|
|||
"- Followers Only: employees see only the followed tasks or issues; if portal\n"
|
||||
" is activated, portal users see the followed tasks or issues."),
|
||||
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
|
||||
'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int')
|
||||
'doc_count': fields.function(
|
||||
_get_attached_docs, string="Number of documents attached", type='integer'
|
||||
)
|
||||
}
|
||||
|
||||
def _get_type_common(self, cr, uid, context):
|
||||
|
@ -723,9 +725,10 @@ class task(osv.osv):
|
|||
context = {}
|
||||
if default is None:
|
||||
default = {}
|
||||
stage = self._get_default_stage_id(cr, uid, context=context)
|
||||
if stage:
|
||||
default['stage_id'] = stage
|
||||
if not context.get('copy', False):
|
||||
stage = self._get_default_stage_id(cr, uid, context=context)
|
||||
if stage:
|
||||
default['stage_id'] = stage
|
||||
return super(task, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def _is_template(self, cr, uid, ids, field_name, arg, context=None):
|
||||
|
@ -749,7 +752,7 @@ class task(osv.osv):
|
|||
'description': fields.text('Description'),
|
||||
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
|
||||
'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange',
|
||||
'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange', select=True,
|
||||
domain="[('project_ids', '=', project_id)]"),
|
||||
'categ_ids': fields.many2many('project.category', string='Tags'),
|
||||
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
|
||||
|
@ -765,7 +768,7 @@ class task(osv.osv):
|
|||
'date_end': fields.datetime('Ending Date',select=True),
|
||||
'date_deadline': fields.date('Deadline',select=True),
|
||||
'date_last_stage_update': fields.datetime('Last Stage Update', select=True),
|
||||
'project_id': fields.many2one('project.project', 'Project', ondelete='set null', select="1", track_visibility='onchange', change_default=True),
|
||||
'project_id': fields.many2one('project.project', 'Project', ondelete='set null', select=True, track_visibility='onchange', change_default=True),
|
||||
'parent_ids': fields.many2many('project.task', 'project_task_parent_rel', 'task_id', 'parent_id', 'Parent Tasks'),
|
||||
'child_ids': fields.many2many('project.task', 'project_task_parent_rel', 'parent_id', 'task_id', 'Delegated Tasks'),
|
||||
'notes': fields.text('Notes'),
|
||||
|
@ -791,7 +794,7 @@ class task(osv.osv):
|
|||
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours'], 10),
|
||||
'project.task.work': (_get_task, ['hours'], 10),
|
||||
}),
|
||||
'user_id': fields.many2one('res.users', 'Assigned to', track_visibility='onchange'),
|
||||
'user_id': fields.many2one('res.users', 'Assigned to', select=True, track_visibility='onchange'),
|
||||
'delegated_user_id': fields.related('child_ids', 'user_id', type='many2one', relation='res.users', string='Delegated To'),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer'),
|
||||
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
|
||||
|
@ -1045,7 +1048,7 @@ class task(osv.osv):
|
|||
if vals.get('project_id') and not context.get('default_project_id'):
|
||||
context['default_project_id'] = vals.get('project_id')
|
||||
# user_id change: update date_start
|
||||
if vals.get('user_id'):
|
||||
if vals.get('user_id') and not vals.get('start_date'):
|
||||
vals['date_start'] = fields.datetime.now()
|
||||
|
||||
# context: no_log, because subtype already handle this
|
||||
|
@ -1062,7 +1065,7 @@ class task(osv.osv):
|
|||
if 'stage_id' in vals:
|
||||
vals['date_last_stage_update'] = fields.datetime.now()
|
||||
# user_id change: update date_start
|
||||
if vals.get('user_id'):
|
||||
if vals.get('user_id') and 'date_start' not in vals:
|
||||
vals['date_start'] = fields.datetime.now()
|
||||
|
||||
# Overridden to reset the kanban_state to normal whenever
|
||||
|
|
|
@ -381,7 +381,7 @@
|
|||
</h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="project_id" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
|
||||
<field name="project_id" domain="[('state', '!=', 'close')]" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
|
||||
<field name="user_id"
|
||||
options='{"no_open": True}'
|
||||
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
|
||||
|
|
|
@ -264,9 +264,9 @@ class project_issue(osv.Model):
|
|||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
|
||||
'version_id': fields.many2one('project.issue.version', 'Version'),
|
||||
'stage_id': fields.many2one ('project.task.type', 'Stage',
|
||||
track_visibility='onchange',
|
||||
track_visibility='onchange', select=True,
|
||||
domain="[('project_ids', '=', project_id)]"),
|
||||
'project_id':fields.many2one('project.project', 'Project', track_visibility='onchange'),
|
||||
'project_id': fields.many2one('project.project', 'Project', track_visibility='onchange', select=True),
|
||||
'duration': fields.float('Duration'),
|
||||
'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
|
||||
'day_open': fields.function(_compute_day, string='Days to Open', \
|
||||
|
|
|
@ -62,7 +62,7 @@ class purchase_config_settings(osv.osv_memory):
|
|||
}
|
||||
|
||||
_defaults = {
|
||||
'default_invoice_method': 'manual',
|
||||
'default_invoice_method': 'order',
|
||||
}
|
||||
|
||||
def onchange_purchase_analytic_plans(self, cr, uid, ids, module_purchase_analytic_plans, context=None):
|
||||
|
|
|
@ -107,7 +107,7 @@ class purchase_requisition(osv.osv):
|
|||
seller_delay = product_supplier.delay
|
||||
seller_qty = product_supplier.qty
|
||||
supplier_pricelist = supplier.property_product_pricelist_purchase or False
|
||||
seller_price = pricelist.price_get(cr, uid, [supplier_pricelist.id], product.id, qty, False, {'uom': default_uom_po_id})[supplier_pricelist.id]
|
||||
seller_price = pricelist.price_get(cr, uid, [supplier_pricelist.id], product.id, qty, supplier.id, {'uom': default_uom_po_id})[supplier_pricelist.id]
|
||||
if seller_qty:
|
||||
qty = max(qty,seller_qty)
|
||||
date_planned = self._planned_date(requisition_line.requisition_id, seller_delay)
|
||||
|
|
|
@ -500,7 +500,7 @@ class sale_order(osv.osv):
|
|||
lines.append(line.id)
|
||||
created_lines = obj_sale_order_line.invoice_line_create(cr, uid, lines)
|
||||
if created_lines:
|
||||
invoices.setdefault(o.partner_id.id, []).append((o, created_lines))
|
||||
invoices.setdefault(o.partner_invoice_id.id or o.partner_id.id, []).append((o, created_lines))
|
||||
if not invoices:
|
||||
for o in self.browse(cr, uid, ids, context=context):
|
||||
for i in o.invoice_ids:
|
||||
|
|
|
@ -101,7 +101,6 @@ class sale_order_line_make_invoice(osv.osv_memory):
|
|||
break
|
||||
if flag:
|
||||
workflow.trg_validate(uid, 'sale.order', order.id, 'manual_invoice', cr)
|
||||
sales_order_obj.write(cr, uid, [order.id], {'state': 'progress'})
|
||||
|
||||
if not invoices:
|
||||
raise osv.except_osv(_('Warning!'), _('Invoice cannot be created for this Sales Order Line due to one of the following reasons:\n1.The state of this sales order line is either "draft" or "cancel"!\n2.The Sales Order Line is Invoiced!'))
|
||||
|
|
|
@ -19,21 +19,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
class res_groups(osv.osv):
|
||||
_name = "res.groups"
|
||||
_inherit = 'res.groups'
|
||||
_columns = {
|
||||
'share': fields.boolean('Share Group', readonly=True,
|
||||
help="Group created to set access rights for sharing data with some users.")
|
||||
}
|
||||
|
||||
def get_application_groups(self, cr, uid, domain=None, context=None):
|
||||
if domain is None:
|
||||
domain = []
|
||||
domain.append(('share', '=', False))
|
||||
return super(res_groups, self).get_application_groups(cr, uid, domain=domain, context=context)
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
|
||||
class res_users(osv.osv):
|
||||
_name = 'res.users'
|
||||
|
@ -59,4 +45,28 @@ class res_users(osv.osv):
|
|||
}, help="External user with limited access, created only for the purpose of sharing data."),
|
||||
}
|
||||
|
||||
|
||||
class res_groups(osv.osv):
|
||||
_name = "res.groups"
|
||||
_inherit = 'res.groups'
|
||||
_columns = {
|
||||
'share': fields.boolean('Share Group', readonly=True,
|
||||
help="Group created to set access rights for sharing data with some users.")
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
# force re-generation of the user groups view without the shared groups
|
||||
self.update_user_groups_view(cr, SUPERUSER_ID)
|
||||
parent_class = super(res_groups, self)
|
||||
if hasattr(parent_class, 'init'):
|
||||
parent_class.init(cr)
|
||||
|
||||
def get_application_groups(self, cr, uid, domain=None, context=None):
|
||||
if domain is None:
|
||||
domain = []
|
||||
domain.append(('share', '=', False))
|
||||
return super(res_groups, self).get_application_groups(cr, uid, domain=domain, context=context)
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -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: 2012-12-22 15:56+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
|
||||
"PO-Revision-Date: 2014-04-04 19:47+0000\n"
|
||||
"Last-Translator: Dariusz Żbikowski <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: 2014-03-27 05:52+0000\n"
|
||||
"X-Generator: Launchpad (build 16967)\n"
|
||||
"X-Launchpad-Export-Date: 2014-04-05 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16976)\n"
|
||||
|
||||
#. module: stock
|
||||
#: field:stock.inventory.line.split,line_exist_ids:0
|
||||
|
@ -1420,7 +1420,7 @@ msgstr "Zapas fizyczny"
|
|||
#: code:addons/stock/wizard/stock_move.py:214
|
||||
#, python-format
|
||||
msgid "Processing Error!"
|
||||
msgstr ""
|
||||
msgstr "Błąd przetwarzania!"
|
||||
|
||||
#. module: stock
|
||||
#: help:stock.location,chained_company_id:0
|
||||
|
|
|
@ -66,7 +66,7 @@ class ir_http(orm.AbstractModel):
|
|||
|
||||
def reroute(self, path):
|
||||
if not hasattr(request, 'rerouting'):
|
||||
request.rerouting = []
|
||||
request.rerouting = [request.httprequest.path]
|
||||
if path in request.rerouting:
|
||||
raise Exception("Rerouting loop is forbidden")
|
||||
request.rerouting.append(path)
|
||||
|
|
|
@ -157,7 +157,7 @@ class DateTime(orm.AbstractModel):
|
|||
value = datetime.datetime.strptime(
|
||||
value, DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
if value:
|
||||
value = column.context_timestamp(
|
||||
value = fields.datetime.context_timestamp(
|
||||
cr, uid, timestamp=value, context=context)
|
||||
value = value.strftime(openerp.tools.DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
|
||||
|
|
|
@ -511,13 +511,13 @@
|
|||
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_button.png"/>
|
||||
<span class="oe_snippet_thumbnail_title">Button</span>
|
||||
</div>
|
||||
<section class="oe_snippet_body jumbotron oe_dark">
|
||||
<section class="oe_snippet_body jumbotron">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-9 text-muted">
|
||||
<p class="mb0">
|
||||
<strong>50,000+ companies run Odoo to grow their businesses.</strong>
|
||||
</p><p class="mb0 text-muted">
|
||||
</p><p class="mb0">
|
||||
Join us and make your company a better place.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=website_blog">
|
||||
<img src="blog_cover.png">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
<img src="blog_cover.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=website">
|
||||
<img src="contact.png">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
<img src="contact.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=website_event">
|
||||
<img src="event_top.png">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
<img src="event_top.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
|
|
|
@ -25,12 +25,14 @@ from openerp.addons.website.models.website import slug
|
|||
|
||||
class event_track_tag(osv.osv):
|
||||
_name = "event.track.tag"
|
||||
_order = 'name'
|
||||
_columns = {
|
||||
'name': fields.char('Event Track Tag')
|
||||
}
|
||||
|
||||
class event_tag(osv.osv):
|
||||
_name = "event.tag"
|
||||
_order = 'name'
|
||||
_columns = {
|
||||
'name': fields.char('Event Tag')
|
||||
}
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=website_event">
|
||||
<img src="event.png">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
<img src="event.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=website_hr">
|
||||
<img src="jobs.png">
|
||||
</a>
|
||||
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||
<img src="jobs.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.tools import html2plaintext
|
||||
from openerp.tools.translate import _
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
from openerp.osv import osv, fields, expression
|
||||
|
||||
class MailMessage(osv.Model):
|
||||
_inherit = 'mail.message'
|
||||
|
@ -63,10 +63,11 @@ class MailMessage(osv.Model):
|
|||
context=None, count=False, access_rights_uid=None):
|
||||
""" Override that adds specific access rights of mail.message, to restrict
|
||||
messages to published messages for public users. """
|
||||
group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
|
||||
group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_public')[1]
|
||||
if group_user_id in [group.id for group in group_ids]:
|
||||
args = ['&', ('website_published', '=', True)] + list(args)
|
||||
if uid != SUPERUSER_ID:
|
||||
group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
|
||||
group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_public')[1]
|
||||
if group_user_id in [group.id for group in group_ids]:
|
||||
args = expression.AND([[('website_published', '=', True)], list(args)])
|
||||
|
||||
return super(MailMessage, self)._search(cr, uid, args, offset=offset, limit=limit, order=order,
|
||||
context=context, count=count, access_rights_uid=access_rights_uid)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
|
||||
# TODO for trunk, remove me
|
||||
class MailThread(osv.Model):
|
||||
_inherit = 'mail.thread'
|
||||
|
||||
|
@ -35,3 +35,7 @@ class MailThread(osv.Model):
|
|||
help="Website communication history",
|
||||
),
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
default['website_message_ids'] = []
|
||||
return super(MailThread, self).copy(cr, uid, id, default=default, context=context)
|
|
@ -131,6 +131,8 @@ class sale_order(osv.osv):
|
|||
}
|
||||
|
||||
def onchange_template_id(self, cr, uid, ids, template_id, partner=False, fiscal_position=False, context=None):
|
||||
if not template_id:
|
||||
return True
|
||||
lines = []
|
||||
quote_template = self.pool.get('sale.quote.template').browse(cr, uid, template_id, context=context)
|
||||
for line in quote_template.quote_line:
|
||||
|
|
|
@ -14,6 +14,7 @@ OpenERP E-Commerce
|
|||
'data/website_sale_data.xml',
|
||||
'views/website_sale.xml',
|
||||
'views/website_sale_backend.xml',
|
||||
'views/payment.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/website_sale.xml',
|
||||
],
|
||||
|
|
|
@ -275,6 +275,7 @@ class Ecommerce(http.Controller):
|
|||
all_categories.add(parent)
|
||||
parent = parent.parent_id
|
||||
categories = list(all_categories)
|
||||
categories.sort(key=lambda x: x.sequence)
|
||||
|
||||
values = {
|
||||
'products': products,
|
||||
|
@ -584,6 +585,7 @@ class Ecommerce(http.Controller):
|
|||
"""
|
||||
cr, uid, context = request.cr, request.uid, request.context
|
||||
payment_obj = request.registry.get('payment.acquirer')
|
||||
sale_order_obj = request.registry['sale.order']
|
||||
|
||||
# if no sale order at this stage: back to checkout beginning
|
||||
order = self.get_order()
|
||||
|
@ -602,30 +604,31 @@ class Ecommerce(http.Controller):
|
|||
else:
|
||||
shipping_partner_id = order.partner_invoice_id.id
|
||||
|
||||
values = {
|
||||
'order': request.registry['sale.order'].browse(cr, SUPERUSER_ID, order.id, context=context)
|
||||
}
|
||||
values.update(request.registry.get('sale.order')._get_website_data(cr, uid, order, context))
|
||||
values = {}
|
||||
values['website_sale_order'] = values['order'] = sale_order_obj.browse(cr, SUPERUSER_ID, order.id, context=context)
|
||||
values['errors'] = sale_order_obj._get_errors(cr, uid, order, context=context)
|
||||
values.update(sale_order_obj._get_website_data(cr, uid, order, context=context))
|
||||
|
||||
# fetch all registered payment means
|
||||
if tx:
|
||||
acquirer_ids = [tx.acquirer_id.id]
|
||||
else:
|
||||
acquirer_ids = payment_obj.search(cr, SUPERUSER_ID, [('website_published', '=', True), '|', ('company_id', '=', order.company_id.id), ('company_id', '=', False)], context=context)
|
||||
values['acquirers'] = payment_obj.browse(cr, uid, acquirer_ids, context=context)
|
||||
render_ctx = dict(context, submit_class='btn btn-primary', submit_txt='Pay Now')
|
||||
for acquirer in values['acquirers']:
|
||||
render_ctx['tx_url'] = '/shop/payment/transaction/%s' % acquirer.id
|
||||
acquirer.button = payment_obj.render(
|
||||
cr, SUPERUSER_ID, acquirer.id,
|
||||
order.name,
|
||||
order.amount_total,
|
||||
order.pricelist_id.currency_id.id,
|
||||
partner_id=shipping_partner_id,
|
||||
tx_values={
|
||||
'return_url': '/shop/payment/validate',
|
||||
},
|
||||
context=render_ctx)
|
||||
if not values['errors']:
|
||||
# fetch all registered payment means
|
||||
if tx:
|
||||
acquirer_ids = [tx.acquirer_id.id]
|
||||
else:
|
||||
acquirer_ids = payment_obj.search(cr, SUPERUSER_ID, [('website_published', '=', True), '|', ('company_id', '=', order.company_id.id), ('company_id', '=', False)], context=context)
|
||||
values['acquirers'] = payment_obj.browse(cr, uid, acquirer_ids, context=context)
|
||||
render_ctx = dict(context, submit_class='btn btn-primary', submit_txt='Pay Now')
|
||||
for acquirer in values['acquirers']:
|
||||
render_ctx['tx_url'] = '/shop/payment/transaction/%s' % acquirer.id
|
||||
acquirer.button = payment_obj.render(
|
||||
cr, SUPERUSER_ID, acquirer.id,
|
||||
order.name,
|
||||
order.amount_total,
|
||||
order.pricelist_id.currency_id.id,
|
||||
partner_id=shipping_partner_id,
|
||||
tx_values={
|
||||
'return_url': '/shop/payment/validate',
|
||||
},
|
||||
context=render_ctx)
|
||||
|
||||
return request.website.render("website_sale.payment", values)
|
||||
|
||||
|
@ -709,7 +712,8 @@ class Ecommerce(http.Controller):
|
|||
message = '<p>The payment seems to have been canceled.</p>'
|
||||
elif state == 'pending' and tx.acquirer_id.validation == 'manual':
|
||||
message = '<p>Your transaction is waiting confirmation.</p>'
|
||||
message += tx.acquirer_id.post_msg
|
||||
if tx.acquirer_id.post_msg:
|
||||
message += tx.acquirer_id.post_msg
|
||||
else:
|
||||
message = '<p>Your transaction is waiting confirmation.</p>'
|
||||
validation = tx.acquirer_id.validation
|
||||
|
|
|
@ -16,6 +16,9 @@ class SaleOrder(osv.Model):
|
|||
),
|
||||
}
|
||||
|
||||
def _get_errors(self, cr, uid, order, context=None):
|
||||
return []
|
||||
|
||||
def _get_website_data(self, cr, uid, order, context):
|
||||
return {
|
||||
'partner': order.partner_id.id,
|
||||
|
|
|
@ -73,11 +73,11 @@
|
|||
},
|
||||
{
|
||||
title: "select payment",
|
||||
element: '#payment_method label:has(img[title="transfer"]) input',
|
||||
element: '#payment_method label:has(img[title="Wire Transfer"]) input',
|
||||
},
|
||||
{
|
||||
title: "Pay Now",
|
||||
waitFor: '#payment_method label:has(input:checked):has(img[title="transfer"])',
|
||||
waitFor: '#payment_method label:has(input:checked):has(img[title="Wire Transfer"])',
|
||||
element: '.oe_sale_acquirer_button .btn[name="submit"]:visible',
|
||||
},
|
||||
{
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="transaction_form_website_sale" model="ir.ui.view">
|
||||
<field name="name">payment.transaction.form.website_sale</field>
|
||||
<field name="model">payment.transaction</field>
|
||||
<field name="inherit_id" ref="payment.transaction_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='reference']" position="after">
|
||||
<field name="sale_order_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -443,14 +443,20 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div class="css_editable_mode_hidden">
|
||||
<form id="comment" t-attf-action="/shop/product/#{product.id}/comment"
|
||||
method="POST">
|
||||
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
|
||||
<div class="pull-left mb32" style="width: 75%%">
|
||||
<textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
|
||||
<a class="btn btn-primary mt8 a-submit">Post</a>
|
||||
</div>
|
||||
</form>
|
||||
<t groups="base.group_public">
|
||||
<a class="btn btn-primary mt8" t-attf-href="/web/login?redirect=/shop/product/#{product.id}%23comment">Log in </a> <span>to post comments</span>
|
||||
</t>
|
||||
<t groups="base.group_user,base.group_portal">
|
||||
<form id="comment" t-attf-action="/shop/product/#{product.id}/comment"
|
||||
method="POST">
|
||||
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
|
||||
<div class="pull-left mb32" style="width: 75%%">
|
||||
|
||||
<textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
|
||||
<a class="btn btn-primary mt8 a-submit">Post</a>
|
||||
</div>
|
||||
</form>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -886,6 +892,12 @@
|
|||
<li class="text-muted">Confirmation<span class="chevron"></span></li>
|
||||
</ul>
|
||||
<h1 class="mb32">Validate Order</h1>
|
||||
<t t-foreach="errors" t-as="error">
|
||||
<div class="alert alert-danger" t-if="error">
|
||||
<h4><t t-esc="error[0]"/></h4>
|
||||
<t t-esc="error[1]"/>
|
||||
</div>
|
||||
</t>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-sm-9 oe_mycart">
|
||||
<table class='table table-striped table-condensed' id="mycart_products" t-if="website_sale_order and website_sale_order.website_order_line">
|
||||
|
@ -958,7 +970,7 @@
|
|||
<input t-att-value="acquirer.id" type="radio" name="acquirer" t-att-checked="acquirers[0] == acquirer"/>
|
||||
<img class="media-object" style="width: 60px; display: inline-block;"
|
||||
t-att-title="acquirer.name"
|
||||
t-att-src="'/payment_%s/static/src/img/%s_icon.png' % (acquirer.name, acquirer.name)"/>
|
||||
t-att-src="'/payment_%s/static/src/img/%s_icon.png' % (acquirer.provider, acquirer.provider)"/>
|
||||
<span t-field="acquirer.name"/>
|
||||
</label>
|
||||
</li>
|
||||
|
@ -973,7 +985,7 @@
|
|||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js_payment mb64 row" t-if="not website_sale_order.amount_total" id="payment_method">
|
||||
<div class="js_payment mb64 row" t-if="not website_sale_order.amount_total and not errors" id="payment_method">
|
||||
<div class="col-lg-8 col-sm-8">
|
||||
<form target="_self" action="/shop/payment/validate" method="post" class="pull-right">
|
||||
<a style="width:100px;" class="btn btn-primary a-submit">
|
||||
|
|
|
@ -12,11 +12,12 @@ class Ecommerce(Ecommerce):
|
|||
cr, uid, context = request.cr, request.uid, request.context
|
||||
order = self.get_order()
|
||||
carrier_id = post.get('carrier_id')
|
||||
|
||||
if order and carrier_id:
|
||||
# recompute delivery costs
|
||||
request.registry['website']._check_carrier_quotation(cr,uid,order,carrier_id,context=context)
|
||||
return request.redirect("/shop/payment")
|
||||
if carrier_id:
|
||||
carrier_id = int(carrier_id)
|
||||
if order:
|
||||
request.registry['sale.order']._check_carrier_quotation(cr, uid, order, force_carrier_id=carrier_id, context=context)
|
||||
if carrier_id:
|
||||
return request.redirect("/shop/payment")
|
||||
|
||||
res = super(Ecommerce, self).payment(**post)
|
||||
return res
|
||||
|
|
|
@ -56,6 +56,57 @@ class SaleOrder(orm.Model):
|
|||
),
|
||||
}
|
||||
|
||||
def _check_carrier_quotation(self, cr, uid, order, force_carrier_id=None, context=None):
|
||||
carrier_obj = self.pool.get('delivery.carrier')
|
||||
|
||||
# check to add or remove carrier_id
|
||||
if not order:
|
||||
return False
|
||||
if all(line.product_id.type == "service" for line in order.website_order_line):
|
||||
order.write({'carrier_id': None}, context=context)
|
||||
self.pool['sale.order']._delivery_unset(cr, SUPERUSER_ID, [order.id], context=context)
|
||||
return True
|
||||
else:
|
||||
carrier_id = force_carrier_id or order.carrier_id.id
|
||||
carrier_ids = self._get_delivery_methods(cr, uid, order, context=context)
|
||||
if carrier_id:
|
||||
if carrier_id not in carrier_ids:
|
||||
carrier_id = False
|
||||
else:
|
||||
carrier_ids.remove(carrier_id)
|
||||
carrier_ids.insert(0, carrier_id)
|
||||
if force_carrier_id or not carrier_id or not carrier_id in carrier_ids:
|
||||
for delivery_id in carrier_ids:
|
||||
grid_id = carrier_obj.grid_get(cr, SUPERUSER_ID, [delivery_id], order.partner_shipping_id.id)
|
||||
if grid_id:
|
||||
carrier_id = delivery_id
|
||||
break
|
||||
order.write({'carrier_id': carrier_id}, context=context)
|
||||
if carrier_id:
|
||||
order.delivery_set(context=context)
|
||||
else:
|
||||
order._delivery_unset(context=context)
|
||||
|
||||
return bool(carrier_id)
|
||||
|
||||
def _get_delivery_methods(self, cr, uid, order, context=None):
|
||||
carrier_obj = self.pool.get('delivery.carrier')
|
||||
delivery_ids = carrier_obj.search(cr, uid, [('website_published','=',True)], context=context)
|
||||
# Following loop is done to avoid displaying delivery methods who are not available for this order
|
||||
# This can surely be done in a more efficient way, but at the moment, it mimics the way it's
|
||||
# done in delivery_set method of sale.py, from delivery module
|
||||
for delivery_id in list(delivery_ids):
|
||||
grid_id = carrier_obj.grid_get(cr, SUPERUSER_ID, [delivery_id], order.partner_shipping_id.id)
|
||||
if not grid_id:
|
||||
delivery_ids.remove(delivery_id)
|
||||
return delivery_ids
|
||||
|
||||
def _get_errors(self, cr, uid, order, context=None):
|
||||
errors = super(SaleOrder, self)._get_errors(cr, uid, order, context=context)
|
||||
if not self._get_delivery_methods(cr, uid, order, context=context):
|
||||
errors.append(('No delivery method available', 'There is no available delivery method for your order'))
|
||||
return errors
|
||||
|
||||
def _get_website_data(self, cr, uid, order, context=None):
|
||||
""" Override to add delivery-related website data. """
|
||||
values = super(SaleOrder, self)._get_website_data(cr, uid, order, context=context)
|
||||
|
@ -69,6 +120,7 @@ class SaleOrder(orm.Model):
|
|||
|
||||
delivery_ctx = dict(context, order_id=order.id)
|
||||
DeliveryCarrier = self.pool.get('delivery.carrier')
|
||||
delivery_ids = DeliveryCarrier.search(cr, uid, [('website_published','=',True)], context=context)
|
||||
delivery_ids = self._get_delivery_methods(cr, uid, order, context=context)
|
||||
|
||||
values['deliveries'] = DeliveryCarrier.browse(cr, SUPERUSER_ID, delivery_ids, context=delivery_ctx)
|
||||
return values
|
||||
|
|
|
@ -9,7 +9,7 @@ class Website(orm.Model):
|
|||
def _ecommerce_create_quotation(self, cr, uid, context=None):
|
||||
order_id = super(Website, self)._ecommerce_create_quotation(cr, uid, context=context)
|
||||
order = self.pool['sale.order'].browse(cr, SUPERUSER_ID, order_id, context=context)
|
||||
self._check_carrier_quotation(cr, uid, order, force_carrier_id=None, context=context)
|
||||
self.pool['sale.order']._check_carrier_quotation(cr, uid, order, force_carrier_id=None, context=context)
|
||||
return order_id
|
||||
|
||||
def _ecommerce_add_product_to_cart(self, cr, uid, product_id=0, order_line_id=0, number=1, set_number=-1, context=None):
|
||||
|
@ -17,31 +17,4 @@ class Website(orm.Model):
|
|||
product_id=product_id, order_line_id=order_line_id, number=number, set_number=set_number,
|
||||
context=context)
|
||||
order = self.ecommerce_get_current_order(cr, uid, context=context)
|
||||
return self._check_carrier_quotation(cr, uid, order, force_carrier_id=None, context=context) and quantity or None
|
||||
|
||||
def _check_carrier_quotation(self, cr, uid, order, force_carrier_id=None, context=None):
|
||||
# check to add or remove carrier_id
|
||||
carrier_id = False
|
||||
for line in order.website_order_line:
|
||||
if line.product_id.type != "service":
|
||||
carrier_id = True
|
||||
break
|
||||
|
||||
if not carrier_id:
|
||||
order.write({'carrier_id': None}, context=context)
|
||||
self.pool['sale.order']._delivery_unset(cr, SUPERUSER_ID, order, context=context)
|
||||
return True
|
||||
else:
|
||||
if order.carrier_id:
|
||||
self.pool['sale.order']._delivery_unset(cr, SUPERUSER_ID, order, context=context)
|
||||
|
||||
carrier_ids = self.pool.get('delivery.carrier').search(cr, uid, [('website_published','=',True)], context=context)
|
||||
carrier_id = force_carrier_id or (carrier_ids and carrier_ids[0])
|
||||
order.write({'carrier_id': carrier_id}, context=context)
|
||||
#If carrier_id have no grid, we don't have delivery !
|
||||
if carrier_id:
|
||||
order.delivery_set(context=context)
|
||||
else:
|
||||
self.pool['sale.order']._delivery_unset(cr, SUPERUSER_ID, order, context=context)
|
||||
|
||||
return bool(carrier_id)
|
||||
return self.pool['sale.order']._check_carrier_quotation(cr, uid, order, force_carrier_id=None, context=context) and quantity or None
|
||||
|
|
Loading…
Reference in New Issue