Permalink
Browse files

Merge branch '12.0' into 12.0-port-ir_attachment_url

  • Loading branch information...
RafiZz committed Nov 15, 2018
2 parents 8f1199b + 2f32c40 commit 5cc63ebf0b237c9cd5fe227ae0082b3f7d539e58
Showing with 398 additions and 85 deletions.
  1. +2 −0 auth_signup_confirmation/static/description/index.html
  2. +2 −0 auth_signup_confirmation_crm/static/description/index.html
  3. +3 −2 autostaging_base/static/description/index.html
  4. +2 −0 autostaging_project_task/static/description/index.html
  5. +53 −0 barcode_widget/static/description/index.html
  6. +2 −0 base_attendance/static/description/index.html
  7. +2 −0 base_import_map/static/description/index.html
  8. +2 −0 crm_next_action/static/description/index.html
  9. +25 −29 currency_rate_update/company.py
  10. +21 −31 currency_rate_update/currency_rate_update.py
  11. +2 −0 hr_public_holidays_ics_import/static/description/index.html
  12. +2 −0 invoice_sale_order_line_group/static/description/index.html
  13. +28 −0 ir_attachment_s3/doc/index.rst
  14. +2 −1 ir_attachment_s3/i18n/es_CR.po
  15. +2 −0 ir_attachment_s3/static/description/index.html
  16. +3 −1 ir_attachment_url/static/description/index.html
  17. +2 −0 ir_config_parameter_multi_company/static/description/index.html
  18. +63 −0 product_category_taxes/i18n/es_CR.po
  19. +5 −5 product_details/i18n/es_CR.po
  20. +1 −1 product_tags/__openerp__.py
  21. +8 −0 product_tags/doc/changelog.rst
  22. +14 −0 product_tags/doc/index.rst
  23. +5 −5 product_tags/i18n/es_CR.po
  24. +3 −3 product_tags/product_view.xml
  25. BIN product_tags/static/description/icon.png
  26. +2 −0 project_gantt8/static/description/index.html
  27. +2 −0 project_task_order_kanban_state/static/description/index.html
  28. +54 −0 project_task_search_custom/static/description/index.html
  29. +2 −0 project_task_subtask/static/description/index.html
  30. +2 −0 project_timelog/static/description/index.html
  31. +5 −5 reminder_base/i18n/es_CR.po
  32. +2 −0 reminder_base/static/description/index.html
  33. +2 −0 reminder_crm_next_action/static/description/index.html
  34. +2 −0 reminder_crm_next_action_time/static/description/index.html
  35. +2 −0 reminder_hr_recruitment/static/description/index.html
  36. +2 −0 reminder_issue_deadline/static/description/index.html
  37. +2 −0 reminder_task_deadline/static/description/index.html
  38. +2 −0 theme_kit/static/description/index.html
  39. +4 −2 web_debranding/README.rst
  40. +2 −0 web_gantt8/static/description/index.html
  41. +2 −0 web_preview/static/description/index.html
  42. +53 −0 web_sessions_management/static/description/index.html
  43. +2 −0 web_website/static/description/index.html
@@ -60,6 +60,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
@@ -28,6 +28,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
@@ -131,7 +131,7 @@ <h2>More information</h2>
</p>
</div>
</div>
</section>
</section>-->


<section class="oe_container">
@@ -143,9 +143,10 @@ <h2>Need our service?</h2>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">
https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
</section>

-->
@@ -53,6 +53,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
<div class="oe_span4">
@@ -39,3 +39,56 @@ <h3 class="oe_slogan">How to use it ?</h3>
</div>
</section>

<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span8">
<h2>Need our service?</h2>
<p class="oe_mt32">Contact us by <a href="mailto:apps@it-projects.info">email</a> or fill out <a href="https://www.it-projects.info/page/website.contactus " target="_blank">request form</a></p>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
<div class="oe_span4">
<div class="stamp" style="width:200px;">
<div style="margin-top: 15px;
position: relative;
font-family:'Vollkorn', serif;
font-size: 16px;
line-height: 25px;
text-transform: uppercase;
font-weight: bold;
color: #75526b;
border: 3px dashed #75526b;
float: left;
padding: 4px 12px;
-webkit-transform: rotate(6deg);
-o-transform: rotate(6deg);
-moz-transform: rotate(6deg);
-ms-transform: rotate(6deg);">
Tested on Odoo<br/>12.0 community
</div>
<!--<div style="margin-top: 15px;
position: relative;
font-family:'Vollkorn', serif;
font-size: 16px;
line-height: 25px;
text-transform: uppercase;
font-weight: bold;
color: #75526b;
border: 3px dashed #75526b;
float: left;
padding: 4px 12px;
-webkit-transform: rotate(3deg);
-o-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-ms-transform: rotate(3deg);">
Tested on Odoo<br/>12.0 enterprise
</div>-->
</div>
</div>
</div>
</section>

@@ -46,6 +46,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
<div class="oe_span4">
@@ -41,6 +41,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
@@ -43,6 +43,8 @@ <h2>Need our service?</h2>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">
https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
@@ -18,36 +18,36 @@
#
#

from openerp import fields, orm
from openerp import fields, models


class ResCompany(orm.Model):
class ResCompany(models.Model):

"""override company to add currency update"""

def _multi_curr_enable(self, cr, uid, ids, field_name, arg, context=None):
def _multi_curr_enable(self, field_name, arg):
"check if multi company currency is enabled"
result = {}
if self.pool.get('ir.model.fields').search(cr, uid, [('name', '=', 'company_id'), ('model', '=', 'res.currency')]) == []:
if not self.env['ir.model.fields'].search([('name', '=', 'company_id'), ('model', '=', 'res.currency')]):
enable = 0
else:
enable = 1
for id in ids:
result[id] = enable
for company in self:
result[company.id] = enable
return result

def button_refresh_currency(self, cr, uid, ids, context=None):
def button_refresh_currency(self):
"""Refrech the currency !!for all the company
now"""
currency_updater_obj = self.pool.get('currency.rate.update')
currency_updater_obj = self.env['currency.rate.update']
try:
currency_updater_obj.run_currency_update(cr, uid)
currency_updater_obj.run_currency_update()
except Exception as e:
raise e
# print "ok"
return True

def write(self, cr, uid, ids, vals, context=None):
def write(self, vals):
"""handle the activation of the currecny update on compagnies.
There are two ways of implementing multi_company currency,
the currency is shared or not. The module take care of the two
@@ -57,41 +57,37 @@ def write(self, cr, uid, ids, vals, context=None):
If yours currency are not share you will be able to activate the
auto update on each separated company"""
save_cron = {}
for company in self.browse(cr, uid, ids, context=context):
for company in self:
if 'auto_currency_up' in vals:
enable = company.multi_company_currency_enable
compagnies = self.search(cr, uid, [])
compagnies = self.search()
activate_cron = 'f'
value = vals.get('auto_currency_up')
if not value:
for comp in compagnies:
if self.browse(cr, uid, comp).auto_currency_up:
if comp.auto_currency_up:
activate_cron = 't'
break
save_cron.update({'active': activate_cron})
else:
for comp in compagnies:
if comp != company.id and not enable:
if self.browse(cr, uid, comp).multi_company_currency_enable:
if comp.id != company.id and not enable:
if comp.multi_company_currency_enable:
raise Exception('Yon can not activate auto currency ' +
'update on more thant one company with this ' +
'multi company configuration')
for comp in compagnies:
if self.browse(cr, uid, comp).auto_currency_up:
if comp.auto_currency_up:
activate_cron = 't'
break
save_cron.update({'active': activate_cron})

if 'interval_type' in vals:
save_cron.update({'interval_type': vals.get('interval_type')})
if save_cron:
self.pool.get('currency.rate.update').save_cron(
cr,
uid,
save_cron
)
self.env['currency.rate.update'].save_cron(save_cron)

return super(ResCompany, self).write(cr, uid, ids, vals, context=context)
return super(ResCompany, self).write(vals)

_inherit = "res.company"

@@ -115,12 +111,12 @@ def write(self, cr, uid, ids, vals, context=None):
)
# function field that allows to know the
# mutli company currency implementation
multi_company_currency_enable = fields.Function(
_multi_curr_enable,
method=True,
type='boolean',
string="Multi company currency",
help='if this case is not check you can' +
' not set currency is active on two company'
multi_company_currency_enable = fields.Boolean(
compute=_multi_curr_enable,
method=True,
type='boolean',
string="Multi company currency",
help='if this case is not check you can' +
' not set currency is active on two company'
)

@@ -77,9 +77,9 @@ class CurrencyRateUpdateService(models.Model):
)
]

def _check_max_delta_days(self, cr, uid, ids):
for company in self.read(cr, uid, ids, ['max_delta_days']):
if company['max_delta_days'] >= 0:
def _check_max_delta_days(self):
for company in self:
if self.max_delta_days >= 0:
continue
else:
return False
@@ -112,25 +112,20 @@ class CurrencyRateUpdate(models.Model):
LOG_NAME = 'cron-rates'
MOD_NAME = 'currency_rate_update: '

def get_cron_id(self, cr, uid, context):
def get_cron_id(self):
"""return the updater cron's id. Create one if the cron does not exists """

cron_id = 0
cron_obj = self.pool.get('ir.cron')
cron_obj = self.env['ir.cron']
try:
# find the cron that send messages
cron_id = cron_obj.search(
cr,
uid,
cron_id = cron_obj.with_context(active_test=False).search(
[
('function', 'ilike', self.cron['function']),
('model', 'ilike', self.cron['model'])
],
context={
'active_test': False
}
]
)
cron_id = int(cron_id[0])
cron_id = cron_id[0].id
except Exception:
_logger.info('warning cron not found one will be created')
pass # ignore if the cron is missing cause we are going to create it in db
@@ -139,36 +134,35 @@ def get_cron_id(self, cr, uid, context):
if not cron_id:
# translate
self.cron['name'] = _('Currency Rate Update')
cron_id = cron_obj.create(cr, uid, self.cron, context)
cron_id = cron_obj.create(self.cron)

return cron_id

def save_cron(self, cr, uid, datas, context=None):
def save_cron(self, datas):
"""save the cron config data should be a dict"""
context = context or {}
# modify the cron
cron_id = self.get_cron_id(cr, uid, context)
self.pool.get('ir.cron').write(cr, uid, [cron_id], datas)
cron_id = self.get_cron_id()
self.env['ir.cron'].write([cron_id], datas)

def run_currency_update(self, cr, uid):
def run_currency_update(self):
"update currency at the given frequence"
factory = CurrencyGetterFactory()
curr_obj = self.pool.get('res.currency')
rate_obj = self.pool.get('res.currency.rate')
companies = self.pool.get('res.company').search(cr, uid, [])
for comp in self.pool.get('res.company').browse(cr, uid, companies):
curr_obj = self.env['res.currency']
rate_obj = self.env['res.currency.rate']
companies = self.env['res.company'].search()
for comp in companies:
# the multi company currency can beset or no so we handle
# the two case
if not comp.auto_currency_up:
continue
# we initialise the multi compnay search filter or not serach filter
# we fetch the main currency looking for currency with base = true. The main rate should be set at 1.00
main_curr_ids = curr_obj.search(cr, uid, [('base', '=', True), ('company_id', '=', comp.id)])
main_curr_ids = curr_obj.search([('base', '=', True), ('company_id', '=', comp.id)])
if not main_curr_ids:
# If we can not find a base currency for this company we look for one with no company set
main_curr_ids = curr_obj.search(cr, uid, [('base', '=', True), ('company_id', '=', False)])
main_curr_ids = curr_obj.search([('base', '=', True), ('company_id', '=', False)])
if main_curr_ids:
main_curr_rec = curr_obj.browse(cr, uid, main_curr_ids[0])
main_curr_rec = main_curr_ids[0]
else:
raise orm.except_orm(_('Error!'), ('There is no base currency set!'))
if main_curr_rec.rate != 1:
@@ -200,11 +194,7 @@ def run_currency_update(self, cr, uid):
'rate': res[curr.name],
'name': rate_name
}
rate_obj.create(
cr,
uid,
vals,
)
rate_obj.create(vals)

# show the most recent note at the top
note = "\n%s currency updated. "\
@@ -78,6 +78,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
@@ -55,6 +55,8 @@ <h2>Need our service?</h2>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
</div>
Oops, something went wrong.

0 comments on commit 5cc63eb

Please sign in to comment.