diff --git a/addons/account_full_reconcile/__init__.py b/addons/account_full_reconcile/__init__.py
index 9c0ea901d41..a4eeb6338a6 100644
--- a/addons/account_full_reconcile/__init__.py
+++ b/addons/account_full_reconcile/__init__.py
@@ -19,79 +19,90 @@ def _migrate_full_reconcile(cr, registry):
WHERE table_name = 'account_move_line'
AND column_name = 'reconcile_id'
""")
- if not cr.fetchone():
- #if no, it's a fresh v9 database and we cannot migrate anything. Rebuild the whole table based on partial
- all_partial_rec_ids = registry['account.partial.reconcile'].search(cr, SUPERUSER_ID, [])
- already_processed = {}
- for partial in registry['account.partial.reconcile'].browse(cr, SUPERUSER_ID, all_partial_rec_ids):
- partial_rec_set = OrderedDict.fromkeys([partial])
- aml_set = set()
- total_debit = 0
- total_credit = 0
- for partial_rec in partial_rec_set:
- if partial_rec in already_processed:
- continue
- for aml in [partial_rec.debit_move_id, partial_rec.credit_move_id]:
- if aml not in aml_set:
- total_debit += aml.debit
- total_credit += aml.credit
- aml_set |= set([aml])
- for x in aml.matched_debit_ids | aml.matched_credit_ids:
- partial_rec_set[x] = None
- partial_rec_ids = []
- for x in partial_rec_set.keys():
- partial_rec_ids.append(x.id)
- already_processed[x] = None
- aml_ids = [x.id for x in aml_set]
- if aml_ids and partial_rec_ids:
- #then, if the total debit and credit are equal, the reconciliation is full
- digits_rounding_precision = aml.company_id.currency_id.rounding
- if float_compare(total_debit, total_credit, precision_rounding=digits_rounding_precision) == 0:
- #in that case, mark the reference on the partial reconciliations and the entries
- registry['account.full.reconcile'].create(cr, SUPERUSER_ID, {
- 'partial_reconcile_ids': [(6, 0, partial_rec_ids)],
- 'reconciled_line_ids': [(6, 0, aml_ids)]
- }, context={'check_move_validity': False})
- return
-
- #otherwise, use the table account_move_reconcile if it exists (not dropped by migration)
- cr.execute("SELECT 1 FROM information_schema.tables WHERE table_name = 'account_move_reconcile'")
if cr.fetchone():
- #account_move_reconcile exists
- #copy old table
- cr.execute("""
- INSERT INTO account_full_reconcile (id, name, create_date)
- SELECT id, name, create_date
- FROM account_move_reconcile
- WHERE id IN (
- SELECT DISTINCT reconcile_id FROM account_move_line WHERE reconcile_id IS NOT NULL)
- """)
- else:
- #account_move_reconcile was dropped during migration, rebuild that table
- cr.execute("""
- INSERT INTO account_full_reconcile (id, name)
- SELECT DISTINCT reconcile_id, reconcile_ref FROM account_move_line WHERE reconcile_id IS NOT NULL
- """)
- #update the index of account_full_reconcile
- cr.execute("SELECT setval('account_full_reconcile_id_seq', (SELECT MAX(id) FROM account_full_reconcile))")
+ #if yes, use the table account_move_reconcile if it exists (not dropped by migration)
+ cr.execute("SELECT 1 FROM information_schema.tables WHERE table_name = 'account_move_reconcile'")
+ if cr.fetchone():
+ #account_move_reconcile exists
+ #copy old table
+ cr.execute("""
+ INSERT INTO account_full_reconcile (id, name, create_date)
+ SELECT id, name, create_date
+ FROM account_move_reconcile
+ WHERE id IN (
+ SELECT DISTINCT reconcile_id FROM account_move_line WHERE reconcile_id IS NOT NULL)
+ """)
+ else:
+ #account_move_reconcile was dropped during migration, rebuild that table
+ cr.execute("""
+ INSERT INTO account_full_reconcile (id, name)
+ SELECT DISTINCT reconcile_id, reconcile_ref FROM account_move_line WHERE reconcile_id IS NOT NULL
+ """)
+ #update the index of account_full_reconcile
+ cr.execute("SELECT setval('account_full_reconcile_id_seq', (SELECT MAX(id) FROM account_full_reconcile))")
- #copy values on account.move.line
- cr.execute("UPDATE account_move_line SET full_reconcile_id = reconcile_id WHERE reconcile_id IS NOT NULL")
- #copy the full_reconcile_id existing of account.move.line to their account.partial.reconcile
- cr.execute("""
- WITH tmp_table AS (
- SELECT rec.id AS partial_id, aml.reconcile_id AS full_id
- FROM account_move_line aml
- RIGHT JOIN account_partial_reconcile rec
- ON aml.id = rec.debit_move_id
- WHERE aml.reconcile_id IS NOT NULL
- UNION
- SELECT rec.id AS partial_id, aml.reconcile_id AS full_id
- FROM account_move_line aml
- RIGHT JOIN account_partial_reconcile rec
- ON aml.id = rec.credit_move_id
- WHERE aml.reconcile_id IS NOT NULL)
- UPDATE account_partial_reconcile p
- SET full_reconcile_id = (SELECT full_id FROM tmp_table tmp WHERE p.id = tmp.partial_id)
- WHERE p.id IN (SELECT partial_id FROM tmp_table)
- """)
+ #copy the full_reconcile_id existing of account.move.line to their account.partial.reconcile
+ cr.execute("""
+ WITH tmp_table AS (
+ SELECT partial_id, MAX(full_id) AS full_id FROM (
+ SELECT rec.id AS partial_id, aml.reconcile_id AS full_id
+ FROM account_move_line aml
+ RIGHT JOIN account_partial_reconcile rec
+ ON aml.id = rec.debit_move_id
+ WHERE aml.reconcile_id IS NOT NULL
+ UNION
+ SELECT rec.id AS partial_id, aml.reconcile_id AS full_id
+ FROM account_move_line aml
+ RIGHT JOIN account_partial_reconcile rec
+ ON aml.id = rec.credit_move_id
+ WHERE aml.reconcile_id IS NOT NULL) tmp_table_with_duplicated_recs
+ GROUP BY partial_id HAVING COUNT(partial_id) = 1)
+ UPDATE account_partial_reconcile p
+ SET full_reconcile_id = tmp.full_id FROM tmp_table tmp WHERE p.id = tmp.partial_id
+ """)
+ #if it's a fresh v9 database, or it has been used after the migration, we need to fill the table based on partial
+ all_partial_rec_ids = registry['account.partial.reconcile'].search(cr, SUPERUSER_ID, [('full_reconcile_id', '=', False)])
+ already_processed = {}
+ for partial in registry['account.partial.reconcile'].browse(cr, SUPERUSER_ID, all_partial_rec_ids):
+ partial_rec_set = OrderedDict.fromkeys([partial])
+ aml_set = set()
+ total_debit = 0
+ total_credit = 0
+ for partial_rec in partial_rec_set:
+ if partial_rec in already_processed:
+ continue
+ for aml in [partial_rec.debit_move_id, partial_rec.credit_move_id]:
+ if aml not in aml_set:
+ total_debit += aml.debit
+ total_credit += aml.credit
+ aml_set |= set([aml])
+ for x in aml.matched_debit_ids | aml.matched_credit_ids:
+ partial_rec_set[x] = None
+ partial_rec_ids = []
+ for x in partial_rec_set.keys():
+ partial_rec_ids.append(x.id)
+ already_processed[x] = None
+ aml_ids = [x.id for x in aml_set]
+ if aml_ids and partial_rec_ids:
+ #then, if the total debit and credit are equal, the reconciliation is full
+ digits_rounding_precision = aml.company_id.currency_id.rounding
+ if float_compare(total_debit, total_credit, precision_rounding=digits_rounding_precision) == 0:
+ #in that case, mark the reference on the partial reconciliations and the entries
+ registry['account.full.reconcile'].create(cr, SUPERUSER_ID, {
+ 'partial_reconcile_ids': [(6, 0, partial_rec_ids)],
+ }, context={'check_move_validity': False})
+ #copy values on account.move.line: rely on partial reconciliations only, as the reconcile_id column may not be
+ #up-to-date, as unreconciliations/new reconciliations may have been done after migration
+ cr.execute("""
+ WITH tmp_table AS (
+ SELECT debit_move_id AS aml_id, full_reconcile_id
+ FROM account_partial_reconcile rec
+ WHERE rec.full_reconcile_id IS NOT NULL
+ UNION ALL
+ SELECT credit_move_id AS aml_id, full_reconcile_id
+ FROM account_partial_reconcile rec
+ WHERE rec.full_reconcile_id IS NOT NULL)
+ UPDATE account_move_line aml
+ SET full_reconcile_id = tmp.full_reconcile_id FROM tmp_table tmp WHERE aml.id = tmp.aml_id
+ """)
+ return
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 3707e318b10..484f628c5c0 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -290,6 +290,8 @@ class crm_lead(format_address, osv.osv):
def on_change_user(self, cr, uid, ids, user_id, context=None):
""" When changing the user, also set a team_id or restrict team id
to the ones user_id is member of. """
+ if not context:
+ context = {}
if user_id and context.get('team_id'):
team = self.pool['crm.team'].browse(cr, uid, context['team_id'], context=context)
if user_id in team.member_ids.ids:
diff --git a/addons/crm/views/crm_action_views.xml b/addons/crm/views/crm_action_views.xml
index 1d46749b652..e57cf153dff 100644
--- a/addons/crm/views/crm_action_views.xml
+++ b/addons/crm/views/crm_action_views.xml
@@ -25,6 +25,7 @@
+
diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py
index 69d36def904..59ccdfdd1b8 100644
--- a/addons/gamification/models/badge.py
+++ b/addons/gamification/models/badge.py
@@ -21,9 +21,9 @@ class gamification_badge_user(osv.Model):
_rec_name = "badge_name"
_columns = {
- 'user_id': fields.many2one('res.users', string="User", required=True, ondelete="cascade"),
+ 'user_id': fields.many2one('res.users', string="User", required=True, ondelete="cascade", select=True),
'sender_id': fields.many2one('res.users', string="Sender", help="The user who has send the badge"),
- 'badge_id': fields.many2one('gamification.badge', string='Badge', required=True, ondelete="cascade"),
+ 'badge_id': fields.many2one('gamification.badge', string='Badge', required=True, ondelete="cascade", select=True),
'challenge_id': fields.many2one('gamification.challenge', string='Challenge originating', help="If this badge was rewarded through a challenge"),
'comment': fields.text('Comment'),
'badge_name': fields.related('badge_id', 'name', type="char", string="Badge Name"),
@@ -182,12 +182,12 @@ class gamification_badge(osv.Model):
'stat_count': fields.function(_get_owners_info, string='Total',
type="integer",
- multi='unique_users',
+ multi='stat_users',
help="The number of time this badge has been received."),
'stat_count_distinct': fields.function(_get_owners_info,
type="integer",
string='Number of users',
- multi='unique_users',
+ multi='stat_users',
help="The number of time this badge has been received by unique users."),
'stat_this_month': fields.function(_get_badge_user_stats,
type="integer",
diff --git a/addons/l10n_et/__openerp__.py b/addons/l10n_et/__openerp__.py
index 31b7bd983a5..4a02fbf4de7 100644
--- a/addons/l10n_et/__openerp__.py
+++ b/addons/l10n_et/__openerp__.py
@@ -5,7 +5,7 @@
{
'name': 'Ethiopia - Accounting',
- 'version': '1.0',
+ 'version': '2.0',
'category': 'Localization/Account Charts',
'description': """
Base Module for Ethiopian Localization
diff --git a/addons/l10n_et/data/account.tax.template.csv b/addons/l10n_et/data/account.tax.template.csv
index 19281193cdb..f7e763b23ee 100644
--- a/addons/l10n_et/data/account.tax.template.csv
+++ b/addons/l10n_et/data/account.tax.template.csv
@@ -1,14 +1,14 @@
id,description,chart_template_id:id,type_tax_use,name,amount,amount_type,tag_ids:id,account_id:id,refund_account_id:id
-id_tax03,tax03,l10n_et,sale,VAT 15% rated sales,15,percent,tax_tax03,l10n_et3007,l10n_et3007
-id_tax04,tax04,l10n_et,sale,VAT 0% rated sales,,percent,tax_tax04,l10n_et3007,l10n_et3007
-id_tax06,tax06,l10n_et,sale,VAT Exempt rated sales,,percent,tax_tax06,l10n_et3007,l10n_et3007
-id_tax11,tax11,l10n_et,sale,VAT Out of Scope rated sales,,percent,tax_tax11,l10n_et3007,l10n_et3007
-id_tax02,tax02,l10n_et,sale,Withholding 2% rated sales,-2,percent,tax_tax02,l10n_et3006,l10n_et3006
-id_tax13,tax13,l10n_et,sale,Withholding 35% rated sales,-35,percent,tax_tax13,l10n_et3006,l10n_et3006
-id_tax14,tax14,l10n_et,sale,Withholding VAT 15% rated sales,-15,percent,tax_tax14,l10n_et3006,l10n_et3006
-id_tax08,tax08,l10n_et,purchase,VAT 15% rated purchases,15,percent,tax_tax08,l10n_et2212,l10n_et2212
-id_tax07,tax07,l10n_et,purchase,VAT 0% rated purchases,,percent,tax_tax07,l10n_et2212,l10n_et2212
-id_tax10,tax10,l10n_et,purchase,VAT Exempt rated purchases,,percent,tax_tax10,l10n_et2212,l10n_et2212
-id_tax09,tax09,l10n_et,purchase,VAT Out of Scope rated purchases,,percent,tax_tax09,l10n_et2212,l10n_et2212
-id_tax05,tax05,l10n_et,purchase,Withholding 2% rated purchases,-2,percent,tax_tax05,l10n_et2213,l10n_et2213
-id_tax12,tax12,l10n_et,purchase,Withholding 35% rated purchases,-35,percent,tax_tax12,l10n_et2213,l10n_et2213
+id_tax03,tax03,l10n_et,sale,VAT 15% rated sales,15,percent,"tag_et_13,tag_et_22",l10n_et3007,l10n_et3007
+id_tax04,tax04,l10n_et,sale,VAT 0% rated sales,,percent,tag_et_12,l10n_et3007,l10n_et3007
+id_tax06,tax06,l10n_et,sale,VAT Exempt rated sales,,percent,tag_et_11,l10n_et3007,l10n_et3007
+id_tax11,tax11,l10n_et,sale,VAT Out of Scope rated sales,,percent,tag_et_10,l10n_et3007,l10n_et3007
+id_tax02,tax02,l10n_et,sale,Withholding 2% rated sales,-2,percent,"tag_et_15,tag_et_27",l10n_et3006,l10n_et3006
+id_tax13,tax13,l10n_et,sale,Withholding 35% rated sales,-35,percent,"tag_et_16,tag_et_28",l10n_et3006,l10n_et3006
+id_tax14,tax14,l10n_et,sale,Withholding VAT 15% rated sales,-15,percent,"tag_et_17,tag_et_29",l10n_et3006,l10n_et3006
+id_tax08,tax08,l10n_et,purchase,VAT 15% rated purchases,15,percent,"tag_et_05,tag_et_20",l10n_et2212,l10n_et2212
+id_tax07,tax07,l10n_et,purchase,VAT 0% rated purchases,,percent,tag_et_04,l10n_et2212,l10n_et2212
+id_tax10,tax10,l10n_et,purchase,VAT Exempt rated purchases,,percent,tag_et_03,l10n_et2212,l10n_et2212
+id_tax09,tax09,l10n_et,purchase,VAT Out of Scope rated purchases,,percent,tag_et_02,l10n_et2212,l10n_et2212
+id_tax05,tax05,l10n_et,purchase,Withholding 2% rated purchases,-2,percent,"tag_et_07,tag_et_24",l10n_et2213,l10n_et2213
+id_tax12,tax12,l10n_et,purchase,Withholding 35% rated purchases,-35,percent,"tag_et_08,tag_et_25",l10n_et2213,l10n_et2213
diff --git a/addons/l10n_et/data/account_account_tag.xml b/addons/l10n_et/data/account_account_tag.xml
index 13c9856c815..8d22ca80fb9 100644
--- a/addons/l10n_et/data/account_account_tag.xml
+++ b/addons/l10n_et/data/account_account_tag.xml
@@ -1,71 +1,120 @@
-
-
-
- tax03
- taxes
-
-
-
- tax04
- taxes
-
-
-
- tax06
- taxes
-
-
-
- tax11
- taxes
-
-
-
- tax02
- taxes
-
-
-
- tax13
- taxes
-
-
-
- tax14
- taxes
-
-
-
- tax08
- taxes
-
-
-
- tax07
- taxes
-
-
-
- tax10
- taxes
-
-
-
- tax09
- taxes
-
-
-
- tax05
- taxes
-
-
-
- tax12
- taxes
-
-
-
+
+ Taxable Purchases - VAT
+ taxes
+
+
+ Taxable Purchase VAT Out of Scope
+ taxes
+
+
+ Taxable Purchase VAT Exempt
+ taxes
+
+
+ Taxable Purchase VAT Rated 0%
+ taxes
+
+
+ Taxable Purchase VAT Rated 15%
+ taxes
+
+
+ Taxable Purchases - Witholding
+ taxes
+
+
+ Taxable 2% Withholding on Purchases
+ taxes
+
+
+ Taxable 35% Withholding on Purchases
+ taxes
+
+
+ Taxable Sales - VAT
+ taxes
+
+
+ Taxable Sales VAT Out of Scope (Sales)
+ taxes
+
+
+ Taxable Sales VAT Exempt
+ taxes
+
+
+ Taxable Sales VAT Rated 0%
+ taxes
+
+
+ Taxable Sales VAT Rated 15%
+ taxes
+
+
+ Taxable Sales - Withholding
+ taxes
+
+
+ Taxable 2% Withholding on Sales
+ taxes
+
+
+ Taxable 35% Withholding on Sales
+ taxes
+
+
+ Taxable VAT Withholding on Sales
+ taxes
+
+
+ Net VAT to be Paid/Reclaimed
+ taxes
+
+
+ Purchase VAT
+ taxes
+
+
+ Purchase VAT Rated 15%
+ taxes
+
+
+ Sales VAT
+ taxes
+
+
+ Sales VAT Rated 15%
+ taxes
+
+
+ Withholding on Purchases
+ taxes
+
+
+ 2% Withholding on Purchases
+ taxes
+
+
+ 35% Withholding on Purchases
+ taxes
+
+
+ Withholding on Sales
+ taxes
+
+
+ 2% Withheld on Sales
+ taxes
+
+
+ 35% Withheld on Sales
+ taxes
+
+
+ VAT Withheld on Sales
+ taxes
+
+
\ No newline at end of file
diff --git a/addons/l10n_et/migrations/2.0/post-migrate_tags_on_taxes.py b/addons/l10n_et/migrations/2.0/post-migrate_tags_on_taxes.py
new file mode 100644
index 00000000000..fa56fd00dfa
--- /dev/null
+++ b/addons/l10n_et/migrations/2.0/post-migrate_tags_on_taxes.py
@@ -0,0 +1,6 @@
+from openerp.modules.registry import RegistryManager
+
+def migrate(cr, version):
+ registry = RegistryManager.get(cr.dbname)
+ from openerp.addons.account.models.chart_template import migrate_tags_on_taxes
+ migrate_tags_on_taxes(cr, registry)
diff --git a/addons/l10n_nl/__openerp__.py b/addons/l10n_nl/__openerp__.py
index 2cd33ee3cca..81e8012de53 100644
--- a/addons/l10n_nl/__openerp__.py
+++ b/addons/l10n_nl/__openerp__.py
@@ -65,7 +65,7 @@
{
'name' : 'Netherlands - Accounting',
- 'version' : '1.5',
+ 'version' : '2.0',
'category': 'Localization/Account Charts',
'description': """
This is the module to manage the accounting chart for Netherlands in Odoo.
diff --git a/addons/l10n_nl/account_chart_netherlands.xml b/addons/l10n_nl/account_chart_netherlands.xml
index f5e68f248ee..ae9aa36f8ac 100644
--- a/addons/l10n_nl/account_chart_netherlands.xml
+++ b/addons/l10n_nl/account_chart_netherlands.xml
@@ -2,7 +2,7 @@
-
+
Overschrijvingen
@@ -3135,134 +3135,162 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
-->
-
- 0% BTW
- taxes
-
-
- 6% BTW verkopen
- taxes
-
-
- 21% BTW verkopen
- taxes
-
-
- variabel BTW verkopen
- taxes
-
-
- 6% BTW inkopen
- taxes
-
-
- 21% BTW inkopen
- taxes
-
-
- variabel BTW inkopen
- taxes
-
-
- 0% BTW verlegd
- taxes
-
-
- BTW te vorderen verlegd (inkopen1)
- taxes
-
-
- BTW af te dragen verlegd (inkopen2)
- taxes
-
-
- 21% BTW verlegd
- taxes
-
-
- Inkopen import binnen EU laag(1)
- taxes
-
-
- Inkopen import binnen EU laag(2)
- taxes
-
-
- 6% BTW import binnen EU
- taxes
-
-
- Inkopen import binnen EU hoog(1)
- taxes
-
-
- Inkopen import binnen EU hoog(2)
- taxes
-
-
- 21% BTW import binnen EU
- taxes
-
-
- Inkopen import binnen EU overig(1)
- taxes
-
-
- Inkopen import binnen EU overig(2)
- taxes
-
-
- 0% BTW import binnen EU
- taxes
-
-
- BTW export binnen EU
- taxes
-
-
- Inst./afst.verkopen binnen EU
- taxes
-
-
- Inkopen import buiten EU laag(1)
- taxes
-
-
- Inkopen import buiten EU laag(2)
- taxes
-
-
- BTW import buiten EU laag inkopen
- taxes
-
-
- Inkopen import buiten EU hoog(1)
- taxes
-
-
- Inkopen import buiten EU hoog(2)
- taxes
-
-
- BTW import buiten EU hoog inkopen
- taxes
-
-
- Inkopen import buiten EU overig(1)
- taxes
-
-
- Inkopen import buiten EU overig(2)
- taxes
-
-
- BTW import buiten EU overig inkopen
- taxes
-
-
- BTW export buiten EU
- taxes
-
+
+ Gegevens omzet
+ taxes
+
+
+ Rubriek 1: Prestaties binnenland
+ taxes
+
+
+ 1a. Leveringen/diensten belast met hoog tarief (omzet)
+ taxes
+
+
+ Leveringen/diensten belast met hoog tarief (omzet)
+ taxes
+
+
+ 1b. Leveringen/diensten belast met laag tarief (omzet)
+ taxes
+
+
+ 1c. Leveringen/diensten belast met overige tarieven behalve 0% (omzet)
+ taxes
+
+
+ 1d. Privégebruik (omzet)
+ taxes
+
+
+ 1e. Leveringen/diensten belast met 0% of niet bij u belast (omzet)
+ taxes
+
+
+ Rubriek 2: Verleggingsregelingen binnenland (omzet)
+ taxes
+
+
+ 2a. Leveringen/diensten waarbij de heffing van omzetbelasting naar u is verlegd (omzet)
+ taxes
+
+
+ Rubriek 3: Prestaties naar of in het buitenland (omzet)
+ taxes
+
+
+ 3a. Leveringen naar landen buiten de EU (uitvoer) (omzet)
+ taxes
+
+
+ 3b. Leveringen naar/diensten in landen binnen de EU (omzet)
+ taxes
+
+
+ 3c. Installatie/afstandsverkopen binnen de EU (omzet)
+ taxes
+
+
+ Rubriek 4: Prestaties vanuit het buitenland aan u verricht (omzet)
+ taxes
+
+
+ 4a. Leveringen/diensten uit landen buiten de EU (invoer) (omzet)
+ taxes
+
+
+ 4b. Leveringen/diensten uit landen binnen de EU (omzet)
+ taxes
+
+
+ Gegevens omzetbelasting (BTW)
+ taxes
+
+
+ Rubriek 1: Prestaties binnenland (BTW)
+ taxes
+
+
+ 1a. Leveringen/diensten belast met 21% (BTW)
+ taxes
+
+
+ Leveringen/diensten belast met hoog tarief (BTW)
+ taxes
+
+
+ 1b. Leveringen/diensten belast met laag tarief (BTW)
+ taxes
+
+
+ 1c. Leveringen/diensten belast met overige tarieven behalve 0% (BTW)
+ taxes
+
+
+ 1d. Privégebruik (BTW)
+ taxes
+
+
+ 1e. Leveringen/diensten belast met 0% of niet bij u belast (BTW)
+ taxes
+
+
+ Rubriek 2: Verleggingsregelingen binnenland (BTW)
+ taxes
+
+
+ 2a. Leveringen/diensten waarbij de heffing van Heffing van omzetbelasting naar u is verlegd (BTW)
+ taxes
+
+
+ Rubriek 4: Prestaties vanuit het buitenland aan u verricht (BTW)
+ taxes
+
+
+ 4a. Leveringen/diensten uit landen buiten de EU (BTW)
+ taxes
+
+
+ 4b. Leveringen/diensten uit landen binnen de EU (BTW)
+ taxes
+
+
+ Rubriek 5: Voorbelasting, kleineondernemersregeling en totaal (BTW)
+ taxes
+
+
+ 5a. Verschuldigde omzetbelasting (rubrieken 1a t/m 4b) (BTW)
+ taxes
+
+
+ 5b. Voorbelasting (BTW)
+ taxes
+
+
+ Voorbelasting (BTW) bis
+ taxes
+
+
+ 5c. Subtotaal (rubriek 5a min 5b) (BTW)
+ taxes
+
+
+ 5d. Vermindering volgens de kleineondernemersregeling (BTW)
+ taxes
+
+
+ 5e. Schatting vorige aangifte(n) (BTW)
+ taxes
+
+
+ 5f. Schatting deze aangifte (BTW)
+ taxes
+
+
+ 5g. Totaal te betalen/terug te vragen (BTW)
+ taxes
+
@@ -3276,7 +3304,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+ 10
@@ -3288,7 +3316,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+ 5
@@ -3300,7 +3328,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+
@@ -3313,7 +3341,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+
@@ -3327,7 +3355,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
purchase
-
+ 10
@@ -3352,7 +3380,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
purchase
-
+ 5
@@ -3377,7 +3405,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
purchase
-
+
@@ -3390,7 +3418,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+ 98
@@ -3402,7 +3430,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+ 99
@@ -3414,7 +3442,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+ 15
@@ -3426,7 +3454,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
purchase
-
+
@@ -3441,7 +3469,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+
@@ -3453,7 +3481,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+ 20
@@ -3463,7 +3491,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
grouppurchase
-
+
@@ -3476,7 +3504,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+
@@ -3488,7 +3516,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+
@@ -3498,7 +3526,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
grouppurchase
-
+
@@ -3511,7 +3539,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+
@@ -3523,7 +3551,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
98none
-
+ 20
@@ -3533,7 +3561,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
grouppurchase
-
+
@@ -3547,7 +3575,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+ 20
@@ -3559,7 +3587,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+
@@ -3574,7 +3602,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
21none
-
+
@@ -3586,7 +3614,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
22none
-
+ 20
@@ -3596,7 +3624,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
grouppurchase
-
+
@@ -3609,7 +3637,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
21none
-
+
@@ -3621,7 +3649,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none
-
+ 20
@@ -3631,7 +3659,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
grouppurchase
-
+
@@ -3644,7 +3672,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none21
-
+
@@ -3656,7 +3684,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
none22
-
+ 20
@@ -3666,7 +3694,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
grouppurchase
-
+
@@ -3680,7 +3708,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
sale
-
+
diff --git a/addons/l10n_nl/migrations/2.0/post-migrate_tags_on_taxes.py b/addons/l10n_nl/migrations/2.0/post-migrate_tags_on_taxes.py
new file mode 100644
index 00000000000..a37770d2c1c
--- /dev/null
+++ b/addons/l10n_nl/migrations/2.0/post-migrate_tags_on_taxes.py
@@ -0,0 +1,7 @@
+from openerp.modules.registry import RegistryManager
+
+
+def migrate(cr, version):
+ registry = RegistryManager.get(cr.dbname)
+ from openerp.addons.account.models.chart_template import migrate_tags_on_taxes
+ migrate_tags_on_taxes(cr, registry)
diff --git a/addons/l10n_nl/migrations/2.0/pre-set_tags_and_taxes_updatable.py b/addons/l10n_nl/migrations/2.0/pre-set_tags_and_taxes_updatable.py
new file mode 100644
index 00000000000..b9bdb2af7c5
--- /dev/null
+++ b/addons/l10n_nl/migrations/2.0/pre-set_tags_and_taxes_updatable.py
@@ -0,0 +1,7 @@
+from openerp.modules.registry import RegistryManager
+
+
+def migrate(cr, version):
+ registry = RegistryManager.get(cr.dbname)
+ from openerp.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable
+ migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_nl')
diff --git a/addons/pos_mercury/models/pos_mercury.py b/addons/pos_mercury/models/pos_mercury.py
index 0abf956d726..fb5b52d01d0 100644
--- a/addons/pos_mercury/models/pos_mercury.py
+++ b/addons/pos_mercury/models/pos_mercury.py
@@ -36,7 +36,7 @@ class account_bank_statement_line(models.Model):
mercury_card_owner_name = fields.Char(string='Card Owner Name', help='The name of the card owner')
mercury_ref_no = fields.Char(string='Mercury reference number', help='Payment reference number from Mercury Pay')
mercury_record_no = fields.Char(string='Mercury record number', help='Payment record number from Mercury Pay')
- mercury_invoice_no = fields.Integer(string='Mercury invoice number', help='Invoice number from Mercury Pay')
+ mercury_invoice_no = fields.Float(string='Mercury invoice number', help='Invoice number from Mercury Pay')
@api.one
def _compute_prefixed_card_number(self):
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 7e2467d3d2e..3b27a84edbf 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -319,7 +319,7 @@ class product_pricelist_item(osv.osv):
'date_start': fields.date('Start Date', help="Starting date for the pricelist item validation"),
'date_end': fields.date('End Date', help="Ending valid for the pricelist item validation"),
'compute_price': fields.selection([('fixed', 'Fix Price'), ('percentage', 'Percentage (discount)'), ('formula', 'Formula')], select=True, default='fixed'),
- 'fixed_price': fields.float('Fixed Price'),
+ 'fixed_price': fields.float('Fixed Price', digits_compute=dp.get_precision('Product Price')),
'percent_price': fields.float('Percentage Price'),
}
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 9ade73d31d9..11341e78c23 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2452,8 +2452,6 @@ class stock_move(osv.osv):
move_qty -= qty
for move in todo_moves:
- if move.linked_move_operation_ids:
- continue
#then if the move isn't totally assigned, try to find quants without any specific domain
if move.state != 'assigned':
qty_already_assigned = move.reserved_availability
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index 92782b5923a..7f5e6c54da4 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -1362,6 +1362,7 @@ var FieldBinaryImage = FieldBinary.extend({
$img.css("max-height", "" + self.options.size[1] + "px");
});
$img.on('error', function() {
+ self.on_clear();
$img.attr('src', self.placeholder);
self.do_warn(_t("Image"), _t("Could not display the selected image."));
});
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py
index a6a2e4092a5..500c93104e6 100644
--- a/addons/website/controllers/main.py
+++ b/addons/website/controllers/main.py
@@ -379,7 +379,6 @@ class Website(openerp.addons.web.controllers.main.Home):
#------------------------------------------------------
class WebsiteBinary(openerp.http.Controller):
@http.route([
- '/website/image',
'/website/image/',
'/website/image//x',
'/website/image//',
diff --git a/addons/website_portal_sale/controllers/main.py b/addons/website_portal_sale/controllers/main.py
index 79512a90c67..fc169bccd06 100644
--- a/addons/website_portal_sale/controllers/main.py
+++ b/addons/website_portal_sale/controllers/main.py
@@ -17,12 +17,15 @@ class website_account(website_account):
res_sale_order = request.env['sale.order']
res_invoices = request.env['account.invoice']
quotations = res_sale_order.search([
+ ('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]),
('state', 'in', ['sent', 'cancel'])
])
orders = res_sale_order.search([
+ ('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]),
('state', 'in', ['sale', 'done'])
])
invoices = res_invoices.search([
+ ('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]),
('state', 'in', ['open', 'paid', 'cancelled'])
])
diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js
index 3221eeba0a4..2ff25986179 100644
--- a/addons/website_quote/static/src/js/website_quotation.js
+++ b/addons/website_quote/static/src/js/website_quotation.js
@@ -212,7 +212,8 @@ odoo.define('website_quote.payment_method', function (require) {
var token = href.match(/quote\/[0-9]+\/([^\/?]*)/);
token = token ? token[1] : '';
ajax.jsonRpc('/quote/' + order_id +'/transaction/' + acquirer_id + (token ? '/' + token : ''), 'call', {}).then(function (data) {
- $(data).submit();
+ $form.html(data);
+ $form.submit();
});
});
});
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py
index e7dcd52a0b4..c6c40806f67 100644
--- a/addons/website_sale/controllers/main.py
+++ b/addons/website_sale/controllers/main.py
@@ -810,9 +810,7 @@ class website_sale(http.Controller):
tx = False
tx_id = False
elif tx.state == 'draft': # button cliked but no more info -> rewrite on tx or create a new one ?
- tx.write({
- 'amount': order.amount_total,
- })
+ tx.write(dict(transaction_obj.on_change_partner_id(cr, uid, None, order.partner_id.id, context=context).get('value', {}), amount=order.amount_total))
if not tx:
tx_id = transaction_obj.create(cr, SUPERUSER_ID, {
'acquirer_id': acquirer_id,
diff --git a/addons/website_sale/models/payment.py b/addons/website_sale/models/payment.py
index f632292e8f7..bd0a224b2ee 100644
--- a/addons/website_sale/models/payment.py
+++ b/addons/website_sale/models/payment.py
@@ -1,8 +1,11 @@
# -*- coding: utf-8 -*-
+import logging
from openerp import SUPERUSER_ID
from openerp.osv import orm, fields
+_logger = logging.getLogger(__name__)
+
class PaymentTransaction(orm.Model):
_inherit = 'payment.transaction'
@@ -19,12 +22,15 @@ class PaymentTransaction(orm.Model):
res = super(PaymentTransaction, self).form_feedback(cr, uid, data, acquirer_name, context=context)
# fetch the tx, check its state, confirm the potential SO
- tx_find_method_name = '_%s_form_get_tx_from_data' % acquirer_name
- if hasattr(self, tx_find_method_name):
- tx = getattr(self, tx_find_method_name)(cr, uid, data, context=context)
- if tx and tx.state == 'done' and tx.acquirer_id.auto_confirm == 'at_pay_confirm' and tx.sale_order_id and tx.sale_order_id.state in ['draft', 'sent']:
- self.pool['sale.order'].action_confirm(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=dict(context, send_email=True))
- elif tx and tx.state not in ['cancel', 'error'] and tx.sale_order_id and tx.sale_order_id.state in ['draft']:
- self.pool['sale.order'].force_quotation_send(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=context)
+ try:
+ tx_find_method_name = '_%s_form_get_tx_from_data' % acquirer_name
+ if hasattr(self, tx_find_method_name):
+ tx = getattr(self, tx_find_method_name)(cr, uid, data, context=context)
+ if tx and tx.state == 'done' and tx.acquirer_id.auto_confirm == 'at_pay_confirm' and tx.sale_order_id and tx.sale_order_id.state in ['draft', 'sent']:
+ self.pool['sale.order'].action_confirm(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=dict(context, send_email=True))
+ elif tx and tx.state not in ['cancel', 'error'] and tx.sale_order_id and tx.sale_order_id.state in ['draft']:
+ self.pool['sale.order'].force_quotation_send(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=context)
+ except Exception:
+ _logger.exception('Fail to confirm the order or send the confirmation email%s', tx and ' for the transaction %s' % tx.reference or '')
return res
diff --git a/addons/website_sale/static/src/js/website_sale_payment.js b/addons/website_sale/static/src/js/website_sale_payment.js
index d16a91b8b86..5b02f5b7c61 100644
--- a/addons/website_sale/static/src/js/website_sale_payment.js
+++ b/addons/website_sale/static/src/js/website_sale_payment.js
@@ -30,7 +30,8 @@ $(document).ready(function () {
return false;
}
ajax.jsonRpc('/shop/payment/transaction/' + acquirer_id, 'call', {}).then(function (data) {
- $(data).submit();
+ $form.html(data);
+ $form.submit();
});
});
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index cd4efc6a967..f8a2256bb86 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -1376,7 +1376,7 @@
The payment seems to have been canceled.
-
+
Your transaction is waiting a manual confirmation.