[MERGE] forward port branch saas-15 up to 9cfd4a5c07
This commit is contained in:
@@ -4,6 +4,7 @@ include README.md
|
||||
recursive-include odoo *.css
|
||||
recursive-include odoo *.csv
|
||||
recursive-include odoo *.doc
|
||||
recursive-include odoo *.docx
|
||||
recursive-include odoo *.eml
|
||||
recursive-include odoo *.eot
|
||||
recursive-include odoo *.gif
|
||||
@@ -16,6 +17,8 @@ recursive-include odoo *.less
|
||||
recursive-include odoo *.md
|
||||
recursive-include odoo *.mp3
|
||||
recursive-include odoo *.ogg
|
||||
recursive-include odoo *.ods
|
||||
recursive-include odoo *.odt
|
||||
recursive-include odoo *.otf
|
||||
recursive-include odoo *.pdf
|
||||
recursive-include odoo *.png
|
||||
@@ -35,8 +38,10 @@ recursive-include odoo *.wsdl
|
||||
recursive-include odoo *.xls
|
||||
recursive-include odoo *.xsd
|
||||
recursive-include odoo *.xsl
|
||||
recursive-include odoo *.xlsx
|
||||
recursive-include odoo *.xml
|
||||
recursive-include odoo *.yml
|
||||
recursive-include odoo *.zip
|
||||
recursive-include odoo/addons/l10n_mx_edi *.xslt *.key *.cer *.txt
|
||||
recursive-include odoo/addons/l10n_mx_reports *.xslt
|
||||
recursive-exclude * *.py[co]
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="reference" position="after" >
|
||||
<field name="purchase_id" attrs="{'readonly': [('state','not in',['draft'])], 'invisible': [('state', '=', 'purchase')]}" class="oe_edit_only"
|
||||
<field name="purchase_id" attrs="{'readonly': [('state','not in',['draft'])], 'invisible': ['|', ('state', '=', 'purchase'), ('type', '=', 'in_refund')]}" class="oe_edit_only"
|
||||
options="{'no_create': True}" context="{'show_total_amount': True}"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">
|
||||
|
||||
@@ -723,7 +723,7 @@ class ResourceCalendarLeaves(models.Model):
|
||||
date_from = fields.Datetime('Start Date', required=True)
|
||||
date_to = fields.Datetime('End Date', required=True)
|
||||
tz = fields.Selection(
|
||||
_tz_get, string='Timezone', default=lambda self: self._context.get('tz', self.env.user.tz or 'UTC'),
|
||||
_tz_get, string='Timezone', default=lambda self: self._context.get('tz') or self.env.user.tz or 'UTC',
|
||||
help="Timezone used when encoding the leave. It is used to correctly "
|
||||
"localize leave hours when computing time intervals.")
|
||||
resource_id = fields.Many2one(
|
||||
|
||||
@@ -52,7 +52,15 @@ class SaleOrder(models.Model):
|
||||
return template and template.active and template or False
|
||||
|
||||
def _get_default_online_payment(self):
|
||||
return 1 if self.env['ir.config_parameter'].sudo().get_param('sale.sale_portal_confirmation_options', default='none') == 'pay' else 0
|
||||
default_template = self._get_default_template_id()
|
||||
if self.template_id:
|
||||
return self.template_id.require_payment
|
||||
elif default_template:
|
||||
return default_template.require_payment
|
||||
elif self.env['ir.config_parameter'].sudo().get_param('sale.sale_portal_confirmation_options', default='none') == 'pay':
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
template_id = fields.Many2one(
|
||||
'sale.quote.template', 'Quotation Template',
|
||||
@@ -70,16 +78,9 @@ class SaleOrder(models.Model):
|
||||
require_payment = fields.Selection([
|
||||
(0, 'Online Signature'),
|
||||
(1, 'Online Payment')], default=_get_default_online_payment, string='Confirmation Mode',
|
||||
compute='_compute_require_payment', store=True,
|
||||
help="Choose how you want to confirm an order to launch the delivery process. You can either "
|
||||
"request a digital signature or an upfront payment. With a digital signature, you can "
|
||||
"request the payment when issuing the invoice.")
|
||||
@api.one
|
||||
@api.depends('template_id')
|
||||
def _compute_require_payment(self):
|
||||
# Do not overwrite if the field is already set
|
||||
if self.template_id and (self.require_payment is None or self.require_payment is False):
|
||||
self.require_payment = self.template_id.require_payment
|
||||
|
||||
@api.multi
|
||||
def copy(self, default=None):
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Vietnam, 2018-02-10
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Duc Dao duc.dd@komit-consulting.com https://github.com/novawish
|
||||
Reference in New Issue
Block a user