[MERGE] forward port branch saas-15 up to 7a45296cf1

This commit is contained in:
Christophe Simonis
2018-03-21 18:20:22 +01:00
15 changed files with 104 additions and 34 deletions
+5
View File
@@ -1173,6 +1173,11 @@ class AccountMoveLine(models.Model):
account_move_line.payment_id.write({'invoice_ids': [(3, invoice.id, None)]}) account_move_line.payment_id.write({'invoice_ids': [(3, invoice.id, None)]})
rec_move_ids += account_move_line.matched_debit_ids rec_move_ids += account_move_line.matched_debit_ids
rec_move_ids += account_move_line.matched_credit_ids rec_move_ids += account_move_line.matched_credit_ids
if self.env.context.get('invoice_id'):
current_invoice = self.env['account.invoice'].browse(self.env.context['invoice_id'])
rec_move_ids = rec_move_ids.filtered(
lambda r: (r.debit_move_id + r.credit_move_id) & current_invoice.move_id.line_ids
)
return rec_move_ids.unlink() return rec_move_ids.unlink()
#################################################### ####################################################
@@ -621,3 +621,39 @@ class TestReconciliation(AccountingTestCase):
# Checking if the direction of the move is correct # Checking if the direction of the move is correct
full_rec_payable = full_rec_move.line_ids.filtered(lambda l: l.account_id == self.account_rsa) full_rec_payable = full_rec_move.line_ids.filtered(lambda l: l.account_id == self.account_rsa)
self.assertEqual(full_rec_payable.balance, 18.75) self.assertEqual(full_rec_payable.balance, 18.75)
def test_unreconcile(self):
# Use case:
# 2 invoices paid with a single payment. Unreconcile the payment with one invoice, the
# other invoice should remain reconciled.
inv1 = self.create_invoice(invoice_amount=10, currency_id=self.currency_usd_id)
inv2 = self.create_invoice(invoice_amount=20, currency_id=self.currency_usd_id)
payment = self.env['account.payment'].create({
'payment_type': 'inbound',
'payment_method_id': self.env.ref('account.account_payment_method_manual_in').id,
'partner_type': 'customer',
'partner_id': self.partner_agrolait_id,
'amount': 100,
'currency_id': self.currency_usd_id,
'journal_id': self.bank_journal_usd.id,
})
payment.post()
credit_aml = payment.move_line_ids.filtered('credit')
# Check residual before assignation
self.assertAlmostEquals(inv1.residual, 10)
self.assertAlmostEquals(inv2.residual, 20)
# Assign credit and residual
inv1.assign_outstanding_credit(credit_aml.id)
inv2.assign_outstanding_credit(credit_aml.id)
self.assertAlmostEquals(inv1.residual, 0)
self.assertAlmostEquals(inv2.residual, 0)
# Unreconcile one invoice at a time and check residual
credit_aml.with_context(invoice_id=inv1.id).remove_move_reconcile()
self.assertAlmostEquals(inv1.residual, 10)
self.assertAlmostEquals(inv2.residual, 0)
credit_aml.with_context(invoice_id=inv2.id).remove_move_reconcile()
self.assertAlmostEquals(inv1.residual, 10)
self.assertAlmostEquals(inv2.residual, 20)
+24 -24
View File
@@ -604,7 +604,7 @@ msgstr "Bankverbindlichkeiten"
#: model:account.account,name:l10n_ch.1_ch_coa_2160 #: model:account.account,name:l10n_ch.1_ch_coa_2160
#: model:account.account.template,name:l10n_ch.ch_coa_2160 #: model:account.account.template,name:l10n_ch.ch_coa_2160
msgid "Dettes envers l'actionnaire" msgid "Dettes envers l'actionnaire"
msgstr "" msgstr "Gesellschafterverbindlichkeiten"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3806 #: model:account.account,name:l10n_ch.1_ch_coa_3806
@@ -612,7 +612,7 @@ msgstr ""
#: model:account.account.template,name:l10n_ch.ch_coa_3806 #: model:account.account.template,name:l10n_ch.ch_coa_3806
#: model:account.account.template,name:l10n_ch.ch_coa_4906 #: model:account.account.template,name:l10n_ch.ch_coa_4906
msgid "Différences de change" msgid "Différences de change"
msgstr "" msgstr "Währungsdifferenzen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_2261 #: model:account.account,name:l10n_ch.1_ch_coa_2261
@@ -624,7 +624,7 @@ msgstr "Beschlossene Ausschüttungen"
#: model:account.account,name:l10n_ch.1_ch_coa_4071 #: model:account.account,name:l10n_ch.1_ch_coa_4071
#: model:account.account.template,name:l10n_ch.ch_coa_4071 #: model:account.account.template,name:l10n_ch.ch_coa_4071
msgid "Droits de douanes à l'importation" msgid "Droits de douanes à l'importation"
msgstr "" msgstr "Einfuhrzölle"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_1109 #: model:account.account,name:l10n_ch.1_ch_coa_1109
@@ -648,7 +648,7 @@ msgstr "Abrechnungskonto MWST"
#: model:account.account,name:l10n_ch.1_ch_coa_4009 #: model:account.account,name:l10n_ch.1_ch_coa_4009
#: model:account.account.template,name:l10n_ch.ch_coa_4009 #: model:account.account.template,name:l10n_ch.ch_coa_4009
msgid "Déductions obtenues sur achats" msgid "Déductions obtenues sur achats"
msgstr "" msgstr "Einkaufsrabatte"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3009 #: model:account.account,name:l10n_ch.1_ch_coa_3009
@@ -714,7 +714,7 @@ msgstr "Unterhalt, Reparaturen, Ersatz mobile Sachanlagen"
#: model:account.account,name:l10n_ch.1_ch_coa_1570 #: model:account.account,name:l10n_ch.1_ch_coa_1570
#: model:account.account.template,name:l10n_ch.ch_coa_1570 #: model:account.account.template,name:l10n_ch.ch_coa_1570
msgid "Equipements et Installations" msgid "Equipements et Installations"
msgstr "" msgstr "Feste Einrichtungen und Installationen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3800 #: model:account.account,name:l10n_ch.1_ch_coa_3800
@@ -722,7 +722,7 @@ msgstr ""
#: model:account.account.template,name:l10n_ch.ch_coa_3800 #: model:account.account.template,name:l10n_ch.ch_coa_3800
#: model:account.account.template,name:l10n_ch.ch_coa_4900 #: model:account.account.template,name:l10n_ch.ch_coa_4900
msgid "Escomptes" msgid "Escomptes"
msgstr "" msgstr "Erlösminderungen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4530 #: model:account.account,name:l10n_ch.1_ch_coa_4530
@@ -734,31 +734,31 @@ msgstr "Benzin"
#: model:account.account,name:l10n_ch.1_ch_coa_3804 #: model:account.account,name:l10n_ch.1_ch_coa_3804
#: model:account.account.template,name:l10n_ch.ch_coa_3804 #: model:account.account.template,name:l10n_ch.ch_coa_3804
msgid "Frais d'encaissement" msgid "Frais d'encaissement"
msgstr "Frais d'encaissement" msgstr "Inkassoaufwand"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3807 #: model:account.account,name:l10n_ch.1_ch_coa_3807
#: model:account.account.template,name:l10n_ch.ch_coa_3807 #: model:account.account.template,name:l10n_ch.ch_coa_3807
msgid "Frais d'expédition" msgid "Frais d'expédition"
msgstr "Frais d'expédition" msgstr "Versandkosten"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4072 #: model:account.account,name:l10n_ch.1_ch_coa_4072
#: model:account.account.template,name:l10n_ch.ch_coa_4072 #: model:account.account.template,name:l10n_ch.ch_coa_4072
msgid "Frais de transport à l'achat" msgid "Frais de transport à l'achat"
msgstr "Frais de transport à l'achat" msgstr "Transportkosten"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4070 #: model:account.account,name:l10n_ch.1_ch_coa_4070
#: model:account.account.template,name:l10n_ch.ch_coa_4070 #: model:account.account.template,name:l10n_ch.ch_coa_4070
msgid "Frêts à l'achat" msgid "Frêts à l'achat"
msgstr "" msgstr "Frachtkosten"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4510 #: model:account.account,name:l10n_ch.1_ch_coa_4510
#: model:account.account.template,name:l10n_ch.ch_coa_4510 #: model:account.account.template,name:l10n_ch.ch_coa_4510
msgid "Gaz" msgid "Gaz"
msgstr "Gaz" msgstr "Gas"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_1770 #: model:account.account,name:l10n_ch.1_ch_coa_1770
@@ -992,7 +992,7 @@ msgstr "Beteiligungen"
#: model:account.account,name:l10n_ch.1_ch_coa_4086 #: model:account.account,name:l10n_ch.1_ch_coa_4086
#: model:account.account.template,name:l10n_ch.ch_coa_4086 #: model:account.account.template,name:l10n_ch.ch_coa_4086
msgid "Pertes de matières" msgid "Pertes de matières"
msgstr "" msgstr "Warenschwund"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3805 #: model:account.account,name:l10n_ch.1_ch_coa_3805
@@ -1125,13 +1125,13 @@ msgstr "Werbeaufwand"
#: model:account.account,name:l10n_ch.1_ch_coa_3801 #: model:account.account,name:l10n_ch.1_ch_coa_3801
#: model:account.account.template,name:l10n_ch.ch_coa_3801 #: model:account.account.template,name:l10n_ch.ch_coa_3801
msgid "Rabais et réduction de prix" msgid "Rabais et réduction de prix"
msgstr "" msgstr "Rabatte und Preisreduktionen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4901 #: model:account.account,name:l10n_ch.1_ch_coa_4901
#: model:account.account.template,name:l10n_ch.ch_coa_4901 #: model:account.account.template,name:l10n_ch.ch_coa_4901
msgid "Rabais et réductions de prix" msgid "Rabais et réductions de prix"
msgstr "" msgstr "Rabatte und Preisreduktionen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3802 #: model:account.account,name:l10n_ch.1_ch_coa_3802
@@ -1139,7 +1139,7 @@ msgstr ""
#: model:account.account.template,name:l10n_ch.ch_coa_3802 #: model:account.account.template,name:l10n_ch.ch_coa_3802
#: model:account.account.template,name:l10n_ch.ch_coa_4092 #: model:account.account.template,name:l10n_ch.ch_coa_4092
msgid "Ristournes" msgid "Ristournes"
msgstr "" msgstr "Rückvergütungen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_2940 #: model:account.account,name:l10n_ch.1_ch_coa_2940
@@ -1473,13 +1473,13 @@ msgstr "Wertschriften"
#: model:account.account,name:l10n_ch.1_transfer_account_id #: model:account.account,name:l10n_ch.1_transfer_account_id
#: model:account.account.template,name:l10n_ch.transfer_account_id #: model:account.account.template,name:l10n_ch.transfer_account_id
msgid "Transferts internes" msgid "Transferts internes"
msgstr "" msgstr "Interne Verrechnungen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_1280 #: model:account.account,name:l10n_ch.1_ch_coa_1280
#: model:account.account.template,name:l10n_ch.ch_coa_1280 #: model:account.account.template,name:l10n_ch.ch_coa_1280
msgid "Travaux en cours" msgid "Travaux en cours"
msgstr "Unfertige Erzeugnisse" msgstr "Nicht fakturierte Dienstleistungen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3940 #: model:account.account,name:l10n_ch.1_ch_coa_3940
@@ -1491,19 +1491,19 @@ msgstr "Bestandesänderungen nicht fakturierte Dienstleistungen"
#: model:account.account,name:l10n_ch.1_ch_coa_1287 #: model:account.account,name:l10n_ch.1_ch_coa_1287
#: model:account.account.template,name:l10n_ch.ch_coa_1287 #: model:account.account.template,name:l10n_ch.ch_coa_1287
msgid "Variation de la valeur des travaux en cours" msgid "Variation de la valeur des travaux en cours"
msgstr "" msgstr "Bestandesänderungen nicht fakturierte Dienstleistungen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_1277 #: model:account.account,name:l10n_ch.1_ch_coa_1277
#: model:account.account.template,name:l10n_ch.ch_coa_1277 #: model:account.account.template,name:l10n_ch.ch_coa_1277
msgid "Variation de stock produits semi-ouvrés" msgid "Variation de stock produits semi-ouvrés"
msgstr "" msgstr "Bestandesänderungen unfertige Erzeugnisse"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_1267 #: model:account.account,name:l10n_ch.1_ch_coa_1267
#: model:account.account.template,name:l10n_ch.ch_coa_1267 #: model:account.account.template,name:l10n_ch.ch_coa_1267
msgid "Variation de stocks de produits finis" msgid "Variation de stocks de produits finis"
msgstr "" msgstr "Bestandesänderungen fertige Erzeugnisse"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_1207 #: model:account.account,name:l10n_ch.1_ch_coa_1207
@@ -1511,13 +1511,13 @@ msgstr ""
#: model:account.account.template,name:l10n_ch.ch_coa_1207 #: model:account.account.template,name:l10n_ch.ch_coa_1207
#: model:account.account.template,name:l10n_ch.ch_coa_4800 #: model:account.account.template,name:l10n_ch.ch_coa_4800
msgid "Variation des stocks de marchandises" msgid "Variation des stocks de marchandises"
msgstr "" msgstr "Bestandesänderungen Handelsware"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4801 #: model:account.account,name:l10n_ch.1_ch_coa_4801
#: model:account.account.template,name:l10n_ch.ch_coa_4801 #: model:account.account.template,name:l10n_ch.ch_coa_4801
msgid "Variation des stocks de matières premières" msgid "Variation des stocks de matières premières"
msgstr "" msgstr "Bestandesänderungen Rohstoffe"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3901 #: model:account.account,name:l10n_ch.1_ch_coa_3901
@@ -1535,7 +1535,7 @@ msgstr "Bestandesänderungen unfertige Erzeugnisse"
#: model:account.account,name:l10n_ch.1_ch_coa_1217 #: model:account.account,name:l10n_ch.1_ch_coa_1217
#: model:account.account.template,name:l10n_ch.ch_coa_1217 #: model:account.account.template,name:l10n_ch.ch_coa_1217
msgid "Variation des stocks des matières premières" msgid "Variation des stocks des matières premières"
msgstr "" msgstr "Bestandesänderungen Rohstoffe"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_4008 #: model:account.account,name:l10n_ch.1_ch_coa_4008
@@ -1543,7 +1543,7 @@ msgstr ""
#: model:account.account.template,name:l10n_ch.ch_coa_4008 #: model:account.account.template,name:l10n_ch.ch_coa_4008
#: model:account.account.template,name:l10n_ch.ch_coa_4080 #: model:account.account.template,name:l10n_ch.ch_coa_4080
msgid "Variations de stocks" msgid "Variations de stocks"
msgstr "" msgstr "Inventurdifferenzen"
#. module: l10n_ch #. module: l10n_ch
#: model:account.account,name:l10n_ch.1_ch_coa_3200 #: model:account.account,name:l10n_ch.1_ch_coa_3200
@@ -719,6 +719,8 @@ class MassMailing(models.Model):
def _process_mass_mailing_queue(self): def _process_mass_mailing_queue(self):
mass_mailings = self.search([('state', 'in', ('in_queue', 'sending')), '|', ('schedule_date', '<', fields.Datetime.now()), ('schedule_date', '=', False)]) mass_mailings = self.search([('state', 'in', ('in_queue', 'sending')), '|', ('schedule_date', '<', fields.Datetime.now()), ('schedule_date', '=', False)])
for mass_mailing in mass_mailings: for mass_mailing in mass_mailings:
user = mass_mailing.write_uid or self.env.user
mass_mailing = mass_mailing.with_context(**user.sudo(user=user).context_get())
if len(mass_mailing.get_remaining_recipients()) > 0: if len(mass_mailing.get_remaining_recipients()) > 0:
mass_mailing.state = 'sending' mass_mailing.state = 'sending'
mass_mailing.send_mail() mass_mailing.send_mail()
+1 -1
View File
@@ -278,7 +278,7 @@
<select name="country_id" class="form-control"> <select name="country_id" class="form-control">
<option value="">Country...</option> <option value="">Country...</option>
<t t-foreach="countries or []" t-as="country"> <t t-foreach="countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == partner.country_id.id"> <option t-att-value="country.id" t-att-selected="country.id == int(country_id) if country_id else country.id == partner.country_id.id">
<t t-esc="country.name" /> <t t-esc="country.name" />
</option> </option>
</t> </t>
+1 -1
View File
@@ -356,7 +356,7 @@ class PricelistItem(models.Model):
'product.category', 'Product Category', ondelete='cascade', 'product.category', 'Product Category', ondelete='cascade',
help="Specify a product category if this rule only applies to products belonging to this category or its children categories. Keep empty otherwise.") help="Specify a product category if this rule only applies to products belonging to this category or its children categories. Keep empty otherwise.")
min_quantity = fields.Integer( min_quantity = fields.Integer(
'Min. Quantity', default=1, 'Min. Quantity', default=0,
help="For the rule to apply, bought/sold quantity must be greater " help="For the rule to apply, bought/sold quantity must be greater "
"than or equal to the minimum quantity specified in this field.\n" "than or equal to the minimum quantity specified in this field.\n"
"Expressed in the default unit of measure of the product.") "Expressed in the default unit of measure of the product.")
+2 -1
View File
@@ -1124,5 +1124,6 @@ class MailComposeMessage(models.TransientModel):
@api.multi @api.multi
def send_mail(self, auto_commit=False): def send_mail(self, auto_commit=False):
if self._context.get('default_model') == 'purchase.order' and self._context.get('default_res_id'): if self._context.get('default_model') == 'purchase.order' and self._context.get('default_res_id'):
self = self.with_context(mail_post_autofollow=True)
self.mail_purchase_order_on_send() self.mail_purchase_order_on_send()
return super(MailComposeMessage, self.with_context(mail_post_autofollow=True)).send_mail(auto_commit=auto_commit) return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit)
+1 -1
View File
@@ -46,7 +46,7 @@
<field name="name">Public access to user_input</field> <field name="name">Public access to user_input</field>
<field name="model_id" ref="survey.model_survey_user_input"/> <field name="model_id" ref="survey.model_survey_user_input"/>
<field name="domain_force">[('create_uid', '=', user.id)]</field> <field name="domain_force">[('create_uid', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_public'))]"/> <field name="groups" eval="[(4, ref('base.group_user')), (4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
<field eval="0" name="perm_unlink"/> <field eval="0" name="perm_unlink"/>
<field eval="0" name="perm_write"/> <field eval="0" name="perm_write"/>
<field eval="1" name="perm_read"/> <field eval="1" name="perm_read"/>
+1 -1
View File
@@ -993,7 +993,7 @@ class Binary(http.Controller):
'/web/content/<string:model>/<int:id>/<string:field>/<string:filename>'], type='http', auth="public") '/web/content/<string:model>/<int:id>/<string:field>/<string:filename>'], type='http', auth="public")
def content_common(self, xmlid=None, model='ir.attachment', id=None, field='datas', def content_common(self, xmlid=None, model='ir.attachment', id=None, field='datas',
filename=None, filename_field='datas_fname', unique=None, mimetype=None, filename=None, filename_field='datas_fname', unique=None, mimetype=None,
download=None, data=None, token=None, access_token=None): download=None, data=None, token=None, access_token=None, **kw):
status, headers, content = binary_content( status, headers, content = binary_content(
xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename, xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename,
filename_field=filename_field, download=download, mimetype=mimetype, filename_field=filename_field, download=download, mimetype=mimetype,
+2 -2
View File
@@ -124,8 +124,8 @@
and main_object.website_meta_description or website_meta_description"/> and main_object.website_meta_description or website_meta_description"/>
<t t-set="meta_keywords" t-value="main_object and 'website_meta_keywords' in main_object <t t-set="meta_keywords" t-value="main_object and 'website_meta_keywords' in main_object
and main_object.website_meta_keywords or website_meta_keywords"/> and main_object.website_meta_keywords or website_meta_keywords"/>
<meta t-if="meta_description" name="description" t-att-content="meta_description"/> <meta t-if="meta_description or editable" name="description" t-att-content="meta_description"/>
<meta t-if="meta_keywords" name="keywords" t-att-content="meta_keywords"/> <meta t-if="meta_keywords or editable" name="keywords" t-att-content="meta_keywords"/>
<!-- OpenGraph tags for Facebook sharing --> <!-- OpenGraph tags for Facebook sharing -->
<meta property="og:title" t-att-content="additional_title" /> <meta property="og:title" t-att-content="additional_title" />
+2 -1
View File
@@ -1298,7 +1298,8 @@
<div t-esc="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty" /> <div t-esc="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty" />
</td> </td>
<td class="text-center td-price"> <td class="text-center td-price">
<span t-field="line.price_unit" style="white-space: nowrap;" t-options="{'widget': 'monetary','from_currency': website_sale_order.pricelist_id.currency_id,'display_currency': website.currency_id}" /> <span t-field="line.price_reduce_taxexcl" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'from_currency': website_sale_order.pricelist_id.currency_id, 'display_currency': website.currency_id}" groups="sale.group_show_price_subtotal" />
<span t-field="line.price_reduce_taxinc" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'from_currency': website_sale_order.pricelist_id.currency_id, 'display_currency': website.currency_id}" groups="sale.group_show_price_total" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -26,7 +26,10 @@ class SaleOrder(models.Model):
@api.depends('order_line.price_unit', 'order_line.tax_id', 'order_line.discount', 'order_line.product_uom_qty') @api.depends('order_line.price_unit', 'order_line.tax_id', 'order_line.discount', 'order_line.product_uom_qty')
def _compute_amount_delivery(self): def _compute_amount_delivery(self):
for order in self: for order in self:
order.amount_delivery = sum(order.order_line.filtered('is_delivery').mapped('price_subtotal')) if self.env.user.has_group('sale.group_show_price_subtotal'):
order.amount_delivery = sum(order.order_line.filtered('is_delivery').mapped('price_subtotal'))
else:
order.amount_delivery = sum(order.order_line.filtered('is_delivery').mapped('price_total'))
@api.depends('order_line.is_delivery') @api.depends('order_line.is_delivery')
def _compute_has_delivery(self): def _compute_has_delivery(self):
+11
View File
@@ -0,0 +1,11 @@
Austria, 18th of March 2018
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,
Andreas Perhab bigbear.ap@gmx.at https://github.com/bigbear3001
+11
View File
@@ -0,0 +1,11 @@
Switzerland, 2018-03-20
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,
Andreas Hochuli a.hochuli@hispeed.ch https://github.com/Highcooley
+1 -1
View File
@@ -406,7 +406,7 @@ Source installation requires manually installing dependencies:
$ sudo npm install -g less $ sudo npm install -g less
- on Windows, `install nodejs <http://nodejs.org/download/>`_, reboot (to - on Windows, `install nodejs <https://nodejs.org/en/download/>`_, reboot (to
update the :envvar:`PATH`) and install less: update the :envvar:`PATH`) and install less:
.. code-block:: doscon .. code-block:: doscon