Browse Source

Merge pull request #1 from OCA/10.0

10.0
pull/150/head
Carlos Almeida 7 years ago
committed by GitHub
parent
commit
657d0af306
  1. 15
      .travis.yml
  2. 10
      README.md
  3. 75
      agreement_account/README.rst
  4. 3
      agreement_account/__init__.py
  5. 22
      agreement_account/__manifest__.py
  6. 59
      agreement_account/demo/demo.xml
  7. 4
      agreement_account/models/__init__.py
  8. 26
      agreement_account/models/account_invoice.py
  9. 48
      agreement_account/models/agreement.py
  10. 17
      agreement_account/security/agreement_security.xml
  11. 3
      agreement_account/security/ir.model.access.csv
  12. 51
      agreement_account/views/account_invoice.xml
  13. 87
      agreement_account/views/agreement.xml
  14. 49
      agreement_sale/README.rst
  15. 4
      agreement_sale/__init__.py
  16. 23
      agreement_sale/__manifest__.py
  17. 4
      agreement_sale/models/__init__.py
  18. 14
      agreement_sale/models/agreement.py
  19. 20
      agreement_sale/models/sale_order.py
  20. 24
      agreement_sale/views/agreement.xml
  21. 35
      agreement_sale/views/sale_order.xml
  22. 3
      agreement_sale/wizard/__init__.py
  23. 17
      agreement_sale/wizard/sale_make_invoice_advance.py
  24. 8
      contract/README.rst
  25. 13
      contract/__manifest__.py
  26. 64
      contract/data/mail_template.xml
  27. 6
      contract/i18n/ca.po
  28. 139
      contract/i18n/de.po
  29. 6
      contract/i18n/el_GR.po
  30. 185
      contract/i18n/es.po
  31. 6
      contract/i18n/es_MX.po
  32. 139
      contract/i18n/fr.po
  33. 489
      contract/i18n/hi_IN.po
  34. 139
      contract/i18n/hr.po
  35. 144
      contract/i18n/hr_HR.po
  36. 139
      contract/i18n/it.po
  37. 139
      contract/i18n/nl.po
  38. 489
      contract/i18n/nl_NL.po
  39. 231
      contract/i18n/pt.po
  40. 139
      contract/i18n/pt_BR.po
  41. 224
      contract/i18n/tr.po
  42. 139
      contract/i18n/tr_TR.po
  43. 6
      contract/i18n/zh_CN.po
  44. 1
      contract/models/__init__.py
  45. 66
      contract/models/account_analytic_account.py
  46. 2
      contract/models/account_analytic_contract.py
  47. 19
      contract/models/account_analytic_contract_line.py
  48. 49
      contract/models/account_analytic_invoice_line.py
  49. 12
      contract/report/contract_views.xml
  50. 74
      contract/report/report_contract.xml
  51. 2
      contract/security/ir.model.access.csv
  52. 141
      contract/tests/test_contract.py
  53. 28
      contract/views/account_analytic_account_view.xml
  54. 89
      contract_payment_auto/README.rst
  55. 5
      contract_payment_auto/__init__.py
  56. 27
      contract_payment_auto/__manifest__.py
  57. 19
      contract_payment_auto/data/ir_cron_data.xml
  58. 98
      contract_payment_auto/data/mail_template_data.xml
  59. 8
      contract_payment_auto/models/__init__.py
  60. 174
      contract_payment_auto/models/account_analytic_account.py
  61. 108
      contract_payment_auto/models/account_analytic_contract.py
  62. 12
      contract_payment_auto/models/account_invoice.py
  63. 18
      contract_payment_auto/models/res_partner.py
  64. 6
      contract_payment_auto/tests/__init__.py
  65. 303
      contract_payment_auto/tests/test_account_analytic_account.py
  66. 51
      contract_payment_auto/tests/test_account_analytic_contract.py
  67. 44
      contract_payment_auto/views/account_analytic_account_view.xml
  68. 36
      contract_payment_auto/views/account_analytic_contract_view.xml
  69. 22
      contract_payment_auto/views/res_partner_view.xml
  70. 69
      contract_payment_mode/README.rst
  71. 5
      contract_payment_mode/__init__.py
  72. 29
      contract_payment_mode/__manifest__.py
  73. 26
      contract_payment_mode/hooks.py
  74. 30
      contract_payment_mode/i18n/ca.po
  75. 29
      contract_payment_mode/i18n/de.po
  76. 28
      contract_payment_mode/i18n/el_GR.po
  77. 29
      contract_payment_mode/i18n/es.po
  78. 28
      contract_payment_mode/i18n/es_MX.po
  79. 29
      contract_payment_mode/i18n/fi.po
  80. 29
      contract_payment_mode/i18n/fr.po
  81. 30
      contract_payment_mode/i18n/gl.po
  82. 29
      contract_payment_mode/i18n/hi_IN.po
  83. 29
      contract_payment_mode/i18n/hr.po
  84. 30
      contract_payment_mode/i18n/hr_HR.po
  85. 29
      contract_payment_mode/i18n/hu.po
  86. 30
      contract_payment_mode/i18n/it.po
  87. 30
      contract_payment_mode/i18n/nl.po
  88. 30
      contract_payment_mode/i18n/pt.po
  89. 29
      contract_payment_mode/i18n/pt_BR.po
  90. 29
      contract_payment_mode/i18n/pt_PT.po
  91. 29
      contract_payment_mode/i18n/ro.po
  92. 28
      contract_payment_mode/i18n/sk_SK.po
  93. 29
      contract_payment_mode/i18n/sl.po
  94. 29
      contract_payment_mode/i18n/tr.po
  95. 29
      contract_payment_mode/i18n/tr_TR.po
  96. 29
      contract_payment_mode/i18n/zh_CN.po
  97. 2
      contract_payment_mode/models/__init__.py
  98. 27
      contract_payment_mode/models/contract.py
  99. 5
      contract_payment_mode/tests/__init__.py
  100. 90
      contract_payment_mode/tests/test_contract_payment.py

15
.travis.yml

@ -7,32 +7,31 @@ python:
addons:
apt:
# only add the two lines below if you need wkhtmltopdf for your tests
# sources:
# - pov-wkhtmltopdf
sources:
- pov-wkhtmltopdf
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
- python-simplejson
- python-serial
- python-yaml
# - wkhtmltopdf # only add if needed and check the before_install section below
- wkhtmltopdf
# set up an X server to run wkhtmltopdf.
#before_install:
# - "export DISPLAY=:910.0"
# - "sh -e /etc/init.d/xvfb start"
before_install:
- "export DISPLAY=:910.0"
- "sh -e /etc/init.d/xvfb start"
env:
global:
- VERSION="10.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
- TRANSIFEX_USER='transbot@odoo-community.org'
- WKHTMLTOPDF_VERSION="0.12.4"
- secure: ArnbVaF5+ry6zVysZ7HA9xcnQrodo8FsXXcon9yINTYRfDC9QEr+/mTLAPRl+lVLdtWV2GuGuX0vPYzBxFWpY3LR0BpKqXzx0G51s94zR2WWEmizYFzFhpAuIxoU4CYNckHFSUaPAQJhwB/pYx9+H/W6bMjG/VnZBq+AmBJ2Kh0=
matrix:
- LINT_CHECK="1"
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="odoo/odoo" UNIT_TEST="1"
- TESTS="1" ODOO_REPO="OCA/OCB"
- TRANSIFEX="1"

10
README.md

@ -21,9 +21,15 @@ Available addons
----------------
addon | version | summary
--- | --- | ---
[contract](contract/) | 10.0.1.0.1 | Contracts Management - Recurring
[agreement_account](agreement_account/) | 10.0.1.0.0 | Adds an agreement object linked to an invoice
[agreement_sale](agreement_sale/) | 10.0.1.0.0 | Link an agreement to a sale order and copy to invoice
[contract](contract/) | 10.0.2.1.0 | Contracts Management - Recurring
[contract_payment_auto](contract_payment_auto/) | 10.0.1.0.0 | Adds automatic payments to contracts.
[contract_payment_mode](contract_payment_mode/) | 10.0.1.0.1 | Payment mode in contracts and their invoices
[contract_sale_generation](contract_sale_generation/) | 10.0.1.0.0 | Contracts Management - Recurring Sales
[contract_show_invoice](contract_show_invoice/) | 10.0.1.0.0 | Button in contracts to show their invoices
[contract_variable_quantity](contract_variable_quantity/) | 10.0.1.0.0 | Variable quantity in contract recurrent invoicing
[contract_variable_quantity](contract_variable_quantity/) | 10.0.1.1.0 | Variable quantity in contract recurrent invoicing
[product_contract](product_contract/) | 10.0.1.0.0 | Product Contract
[website_portal_contract](website_portal_contract/) | 10.0.1.0.0 | Extends website portal with contracts.
[//]: # (end addons)

75
agreement_account/README.rst

@ -0,0 +1,75 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
===================
Agreement (Account)
===================
This module adds an *Agreement* object with the following properties:
* type (*Sale* or *Purchase*),
* link to a partner,
* name,
* code,
* signature date.
You can link an invoice to an agreement.
If you also install the module *agreement_sale*, you will be able to link a quotation/sale order to an agreement, and this information will be copied to the customer invoice.
An *Agreement* can be used for:
* Private business contracts
* Public markets
It will allow you to group all the orders and invoices related to the same agreement and display the references of this agreement on the documents where you have to display it. For example, the *code* property of the agreement is used in the module *account_invoice_factur-x* (from the `edi <https://github.com/OCA/edi>`_ project) in the XML tag */CrossIndustryInvoice/SupplyChainTradeTransaction/ApplicableHeaderTradeAgreement/ContractReferencedDocument/IssuerAssignedID*.
The main differences with the *Contract* object of Odoo:
* a contract is an analytic account; an agreement is not related to analytic accounting.
* on the invoice, the contract/analytic account is per-line; an agreement is attached to the invoice (not to the lines).
* an agreement is a very simple object with just a few basic fields; a contract has a lot of properties and a lot of related features.
Configuration
=============
Go to the menu *Accounting > Configuration > Management > Agreements* to create new agreements.
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/110/10.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/contract/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

3
agreement_account/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

22
agreement_account/__manifest__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': u'Agreement (Account)',
'summary': "Adds an agreement object linked to an invoice",
'version': '10.0.1.0.0',
'category': 'Contract',
'author': "Akretion,Odoo Community Association (OCA)",
'website': 'http://www.akretion.com',
'license': 'AGPL-3',
'depends': ['account'],
'data': [
'security/ir.model.access.csv',
'security/agreement_security.xml',
'views/agreement.xml',
'views/account_invoice.xml',
],
'demo': ['demo/demo.xml'],
'installable': True,
}

59
agreement_account/demo/demo.xml

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="market1" model="agreement">
<field name="code">C2C-IT0042</field>
<field name="name">Hardware IT</field>
<field name="partner_id" ref="base.res_partner_12"/>
<field name="agreement_type">sale</field>
<field name="signature_date">2017-09-10</field>
</record>
<record id="market2" model="agreement">
<field name="code">C2C-IT0043</field>
<field name="name">Fiber access office Lausanne</field>
<field name="partner_id" ref="base.res_partner_12"/>
<field name="agreement_type">sale</field>
<field name="signature_date" eval="time.strftime('%Y-01-01')"/>
</record>
<record id="market3" model="agreement">
<field name="code">AGR-VETO001</field>
<field name="name">Vétérinaire</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="agreement_type">sale</field>
<field name="signature_date">2017-08-01</field>
</record>
<record id="market4" model="agreement">
<field name="code">AGR-TEL001</field>
<field name="name">Wazo IPBX deployment and maintenance</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="agreement_type">sale</field>
<field name="signature_date">2017-05-05</field>
</record>
<record id="market5" model="agreement">
<field name="code">BUY-VOIP012</field>
<field name="name">SIP Phones supply</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="agreement_type">purchase</field>
<field name="signature_date" eval="time.strftime('%Y-01-01')"/>
</record>
<record id="market6" model="agreement">
<field name="code">BUY-VOIP013</field>
<field name="name">SIP-ISDN gateways</field>
<field name="partner_id" ref="base.res_partner_3"/>
<field name="agreement_type">purchase</field>
<field name="signature_date">2017-09-02</field>
</record>
</odoo>

4
agreement_account/models/__init__.py

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import agreement
from . import account_invoice

26
agreement_account/models/account_invoice.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
agreement_id = fields.Many2one(
'agreement', string='Agreement', ondelete='restrict',
readonly=True, states={'draft': [('readonly', False)]},
track_visibility='onchange')
@api.model
def _prepare_refund(
self, invoice, date_invoice=None, date=None, description=None,
journal_id=None):
values = super(AccountInvoice, self)._prepare_refund(
invoice, date_invoice=date_invoice, date=date,
description=description, journal_id=journal_id)
if invoice.agreement_id:
values['agreement_id'] = invoice.agreement_id.id
return values

48
agreement_account/models/agreement.py

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class Agreement(models.Model):
_name = 'agreement'
_description = 'Agreement'
code = fields.Char(required=True, copy=False)
name = fields.Char(required=True)
agreement_type = fields.Selection([
('sale', 'Sale'),
('purchase', 'Purchase'),
], string='Type', required=True)
partner_id = fields.Many2one(
'res.partner', string='Partner', ondelete='restrict', required=True,
domain=[('parent_id', '=', False)])
company_id = fields.Many2one(
'res.company', string='Company',
default=lambda self: self.env['res.company']._company_default_get(
'agreement'))
active = fields.Boolean(default=True)
signature_date = fields.Date()
out_invoice_ids = fields.One2many(
'account.invoice', 'agreement_id', string='Customer Invoices',
readonly=True, domain=[('type', 'in', ('out_invoice', 'out_refund'))])
in_invoice_ids = fields.One2many(
'account.invoice', 'agreement_id', string='Supplier Invoices',
readonly=True, domain=[('type', 'in', ('in_invoice', 'in_refund'))])
def name_get(self):
res = []
for agr in self:
name = agr.name
if agr.code:
name = u'[%s] %s' % (agr.code, agr.name)
res.append((agr.id, name))
return res
_sql_constraints = [(
'code_partner_company_unique',
'unique(code, partner_id, company_id)',
'This agreement code already exists for this partner!'
)]

17
agreement_account/security/agreement_security.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="agreement_rule" model="ir.rule">
<field name="name">Agreement multi-company</field>
<field name="model_id" ref="model_agreement"/>
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
</odoo>

3
agreement_account/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_agreement_read,Read access on agreement to Employees,model_agreement,base.group_user,1,0,0,0
access_agreement_full,Full access on agreement to Invoicing and Payment grp,model_agreement,account.group_account_invoice,1,1,1,1

51
agreement_account/views/account_invoice.xml

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="invoice_form" model="ir.ui.view">
<field name="name">agreement.customer.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//page/group/group/field[@name='name']" position="after">
<field name="agreement_id"
domain="[('partner_id', 'child_of', commercial_partner_id), ('agreement_type', '=', 'sale')]"
context="{'default_partner_id': commercial_partner_id, 'default_agreement_type': 'sale'}"/>
<field name="commercial_partner_id" invisible="1"/>
</xpath>
</field>
</record>
<record id="invoice_supplier_form" model="ir.ui.view">
<field name="name">agreement.supplier.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//page/group/group/field[@name='company_id']" position="after">
<field name="agreement_id"
domain="[('partner_id', 'child_of', commercial_partner_id), ('agreement_type', '=', 'purchase')]"
context="{'default_partner_id': commercial_partner_id, 'default_agreement_type': 'purchase'}"/>
<field name="commercial_partner_id" invisible="1"/>
</xpath>
</field>
</record>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">agreement.account.invoice.search</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<group expand="0" position="inside">
<filter string="Agreement" name="agreement_groupby"
context="{'group_by': 'agreement_id'}"/>
</group>
</field>
</record>
</odoo>

87
agreement_account/views/agreement.xml

@ -0,0 +1,87 @@
<?xml version="1.0"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="agreement_form" model="ir.ui.view">
<field name="name">agreement.form</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<form string="Agreement">
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<group name="main">
<field name="partner_id"/>
<field name="name"/>
<field name="code"/>
<field name="agreement_type"/>
<field name="signature_date"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group string="Customer Invoices" name="out_invoices" attrs="{'invisible': [('agreement_type', '!=', 'sale')]}">
<field name="out_invoice_ids" nolabel="1"/>
</group>
<group string="Supplier Invoices" name="in_invoices" attrs="{'invisible': [('agreement_type', '!=', 'purchase')]}">
<field name="in_invoice_ids" nolabel="1"/>
</group>
</form>
</field>
</record>
<record id="agreement_tree" model="ir.ui.view">
<field name="name">agreement.tree</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<tree string="Agreements">
<field name="partner_id"/>
<field name="code"/>
<field name="name"/>
<field name="agreement_type"/>
<field name="signature_date"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="agreement_search" model="ir.ui.view">
<field name="name">agreement.search</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<search string="Search Agreements">
<field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Name or Number"/>
<field name="partner_id"/>
<filter name="sale" string="Sale" domain="[('agreement_type', '=', 'sale')]"/>
<filter name="purchase" string="Purchase" domain="[('agreement_type', '=', 'purchase')]"/>
<separator/>
<filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
<group name="groupby">
<filter name="partner_groupby" string="Customer"
context="{'group_by': 'partner_id'}"/>
<filter name="signature_date_groupby" string="Signature Date"
context="{'group_by': 'signature_date'}"/>
<filter name="agreement_type_groupby" string="Type"
context="{'group_by': 'agreement_type'}"/>
</group>
</search>
</field>
</record>
<record id="agreement_action" model="ir.actions.act_window">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="agreement_menu" action="agreement_action"
parent="account.account_management_menu" sequence="100"/>
</odoo>

49
agreement_sale/README.rst

@ -0,0 +1,49 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
================
Agreement (Sale)
================
This module is an extension of the module *agreement_account* for sale orders.
With this module, you will be able to link a quotation/sale order to a sale agreement. Upon invoice creation, this information will be copied to the customer invoice.
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/110/10.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/contract/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

4
agreement_sale/__init__.py

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import models
from . import wizard

23
agreement_sale/__manifest__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': u'Agreement (Sale)',
'summary': "Link an agreement to a sale order and copy to invoice",
'version': '10.0.1.0.0',
'category': 'Contract',
'author': "Akretion,Odoo Community Association (OCA)",
'website': 'http://www.akretion.com',
'license': 'AGPL-3',
'depends': [
'agreement_account',
'sale_commercial_partner',
],
'data': [
'views/sale_order.xml',
'views/agreement.xml',
],
'installable': True,
'auto_install': True,
}

4
agreement_sale/models/__init__.py

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import sale_order
from . import agreement

14
agreement_sale/models/agreement.py

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class Agreement(models.Model):
_inherit = 'agreement'
sale_ids = fields.One2many(
'sale.order', 'agreement_id', string='Sale Orders', readonly=True,
domain=[('state', 'not in', ('draft', 'sent', 'cancel'))])

20
agreement_sale/models/sale_order.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
class SaleOrder(models.Model):
_inherit = 'sale.order'
agreement_id = fields.Many2one(
'agreement', string='Agreement', ondelete='restrict',
track_visibility='onchange', readonly=True,
states={'draft': [('readonly', False)], 'sent': [('readonly', False)]})
def _prepare_invoice(self):
vals = super(SaleOrder, self)._prepare_invoice()
vals['agreement_id'] = self.agreement_id.id or False
return vals

24
agreement_sale/views/agreement.xml

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="agreement_form" model="ir.ui.view">
<field name="name">agreement.form</field>
<field name="model">agreement</field>
<field name="inherit_id" ref="agreement_account.agreement_form"/>
<field name="arch" type="xml">
<group name="in_invoices" position="after">
<group name="sale_orders" string="Sales Orders" attrs="{'invisible': [('agreement_type', '!=', 'sale')]}">
<field name="sale_ids" nolabel="1"/>
</group>
</group>
</field>
</record>
</odoo>

35
agreement_sale/views/sale_order.xml

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_order_form" model="ir.ui.view">
<field name="name">agreement.sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_commercial_partner.view_order_form"/>
<field name="arch" type="xml">
<field name="client_order_ref" position="after">
<field name="agreement_id"
domain="[('partner_id', 'child_of', commercial_partner_id), ('agreement_type', '=', 'sale')]"
context="{'default_partner_id': commercial_partner_id, 'default_agreement_type': 'sale'}"/>
</field>
</field>
</record>
<record id="view_sales_order_filter" model="ir.ui.view">
<field name="name">agreement.sale.order.search</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
<field name="arch" type="xml">
<group expand="0" position="inside">
<filter string="Agreement" name="agreement_groupby" context="{'group_by': 'agreement_id'}"/>
</group>
</field>
</record>
</odoo>

3
agreement_sale/wizard/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import sale_make_invoice_advance

17
agreement_sale/wizard/sale_make_invoice_advance.py

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = 'sale.advance.payment.inv'
def _create_invoice(self, order, so_line, amount):
inv = super(SaleAdvancePaymentInv, self)._create_invoice(
order, so_line, amount)
if order.agreement_id:
inv.agreement_id = order.agreement_id.id
return inv

8
contract/README.rst

@ -7,8 +7,9 @@ Contracts for recurrent invoicing
=================================
This module forward-port to v10 the contracts management with recurring
invoicing functions. In upstream Odoo, this functionality was moved into the
Enterprise edition.
invoicing functions. Also you can print and send by email contract report.
In upstream Odoo, this functionality was moved into the Enterprise edition.
Configuration
=============
@ -40,6 +41,8 @@ To use this module, you need to:
click on *Create invoices* to force this action.
#. Click *Show recurring invoices* link to show all invoices created by the
contract.
#. Click on *Print > Contract* menu to print contract report.
#. Click on *Send by Email* button to send contract by email.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
@ -68,6 +71,7 @@ Contributors
* Carlos Dauden <carlos.dauden@tecnativa.com>
* Angel Moya <angel.moya@domatix.com>
* Dave Lasley <dave@laslabs.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
Maintainer
----------

13
contract/__manifest__.py

@ -1,11 +1,15 @@
# -*- coding: utf-8 -*-
# © 2004-2010 OpenERP SA
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2004-2010 OpenERP SA
# Copyright 2014-2017 Tecnativa - Pedro M. Baeza
# Copyright 2015 Domatix
# Copyright 2016 Tecnativa - Carlos Dauden
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2016-2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Contracts Management - Recurring',
'version': '10.0.1.0.1',
'version': '10.0.2.1.0',
'category': 'Contract Management',
'license': 'AGPL-3',
'author': "OpenERP SA, "
@ -16,7 +20,10 @@
'depends': ['base', 'account', 'analytic'],
'data': [
'security/ir.model.access.csv',
'report/report_contract.xml',
'report/contract_views.xml',
'data/contract_cron.xml',
'data/mail_template.xml',
'views/account_analytic_account_view.xml',
'views/account_analytic_contract_view.xml',
'views/account_invoice_view.xml',

64
contract/data/mail_template.xml

@ -0,0 +1,64 @@
<?xml version="1.0" ?>
<odoo noupdate="1">
<record id="email_contract_template" model="mail.template">
<field name="name">Email Contract Template</field>
<field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
<field name="subject">${object.company_id.name} Contract (Ref ${object.name or 'n/a'})</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="contract.model_account_analytic_account"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="contract.report_contract"/>
<field name="report_name">Contract</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello ${object.partner_id.name or ''},</p>
<p>A new contract has been created: </p>
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
&nbsp;&nbsp;<strong>REFERENCES</strong><br />
&nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />
% if object.date_start:
&nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />
% endif
% if object.user_id:
% if object.user_id.email:
&nbsp;&nbsp;Your Contact: <a href="mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}">${object.user_id.name}</a>
% else:
&nbsp;&nbsp;Your Contact: ${object.user_id.name}
% endif
% endif
</p>
<br/>
<p>If you have any questions, do not hesitate to contact us.</p>
<p>Thank you for choosing ${object.company_id.name or 'us'}!</p>
<br/>
<br/>
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;">
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
</div>
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">
<span style="color: #222; margin-bottom: 5px; display: block; ">
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}
</span>
% if object.company_id.phone:
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
Phone: ${object.company_id.phone}
</div>
% endif
% if object.company_id.website:
<div>
Web: <a href="${object.company_id.website}">${object.company_id.website}</a>
</div>
%endif
<p></p>
</div>
</div>
]]></field>
</record>
</odoo>

6
contract/i18n/ca.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"MIME-Version: 1.0\n"
@ -40,7 +40,7 @@ msgstr ""
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr ""
msgstr "Compte analític"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action

139
contract/i18n/de.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"MIME-Version: 1.0\n"
@ -18,6 +18,64 @@ msgstr ""
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -30,6 +88,56 @@ msgstr "<strong>#ENDE#</strong>: Enddatum der Abrechnungsperiode"
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#ANFANG#</strong>: Anfangsdatum der Abrechnungsperiode"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -53,7 +161,15 @@ msgid "Click to create a new contract."
msgstr "Klicken, um neuen Vertrag anzulegen."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Vertrag"
@ -239,7 +355,7 @@ msgid "Next Invoice"
msgstr "Nächste Rechnung"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr "Legen Sie bitte ein Verkaufsjournal für das Unternehmen '%s' fest."
@ -298,6 +414,16 @@ msgstr "Wiederholung je"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Wiederholung in (Tagen/Wochen/Monaten/Jahren)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -325,6 +451,11 @@ msgstr "Einzelpreis"
msgid "Unit of Measure"
msgstr "Mengeneinheit"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -338,7 +469,7 @@ msgid "Year(s)"
msgstr "Jahr(e)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr "Sie müssen zunächst einen Kunden für den Vertrag '%s' auswählen."

6
contract/i18n/el_GR.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n"
"MIME-Version: 1.0\n"
@ -40,7 +40,7 @@ msgstr ""
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr ""
msgstr "Αναλυτικός Λογαριασμός"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action

185
contract/i18n/es.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n"
@ -18,6 +18,110 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hola ${object.partner_id.name or ''},</p>\n"
" <p>Se ha creado un nuevo contrato: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCIAS</strong><br />\n"
" &nbsp;&nbsp;Contrato: <strong>${object.name}</strong><br />\n"
" &nbsp;&nbsp;Fecha de inicio del contrato: ${object.date_start or ''}<br />\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Contacto: <a href=\"mailto:${object.user_id.email or ''}?subject=Contrato%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Contacto: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>Si tiene cualquier pregunta, no dude en contactarnos.</p>\n"
" <p>Gracias por elegir ${object.company_id.name or 'nos'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Teléfono: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -30,6 +134,56 @@ msgstr "<strong>#END#</strong>: Fecha fin del periodo facturado"
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#START#</strong>: Fecha inicio del periodo facturado"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr "<strong>Descripción</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr "<strong>Empresa:</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr "<strong>Precio</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr "<strong>Cantidad</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr "<strong>Elementos recurrentes</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr "<strong>Total</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr "<strong>Precio unidad</strong>"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -53,7 +207,15 @@ msgid "Click to create a new contract."
msgstr "Pinche para crear un contrato nuevo. "
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr "Componer correo electrónico"
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Contrato"
@ -241,7 +403,7 @@ msgid "Next Invoice"
msgstr "Próxima factura"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr "Por favor define un diario de ventas para la compañía '%s'."
@ -300,6 +462,16 @@ msgstr "Repetir cada"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Repetir cada (días/semana/mes/año)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr "Responsable"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr "Enviar por correo electrónico"
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -328,6 +500,11 @@ msgstr "Precio unidad"
msgid "Unit of Measure"
msgstr "Unidad de medida"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr "NIF:"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -341,7 +518,7 @@ msgid "Year(s)"
msgstr "Año(s)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr "¡Seleccione un cliente para este contrato %s!"

6
contract/i18n/es_MX.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n"
"MIME-Version: 1.0\n"
@ -40,7 +40,7 @@ msgstr ""
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr ""
msgstr "Cuenta analítica"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action

139
contract/i18n/fr.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"MIME-Version: 1.0\n"
@ -18,6 +18,64 @@ msgstr ""
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -30,6 +88,56 @@ msgstr ""
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -53,7 +161,15 @@ msgid "Click to create a new contract."
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Contrat"
@ -238,7 +354,7 @@ msgid "Next Invoice"
msgstr "Prochaine facture"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
@ -297,6 +413,16 @@ msgstr "Répéter Chaque"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Répéter chaque (Jours/Semaine/Mois/Année)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -324,6 +450,11 @@ msgstr "Prix Unitaire"
msgid "Unit of Measure"
msgstr "Unité de Mesure"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -337,7 +468,7 @@ msgid "Year(s)"
msgstr "Année(s)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr ""

489
contract/i18n/hi_IN.po

@ -0,0 +1,489 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract
#
# Translators:
# Ashish Deshmukh <ashish.p.deshmukh@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: Ashish Deshmukh <ashish.p.deshmukh@gmail.com>, 2017\n"
"Language-Team: Hindi (India) (https://www.transifex.com/oca/teams/23907/hi_IN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hi_IN\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#END#</strong>: End date of the invoiced period"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Account Analytic Lines"
msgstr ""
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr "विश्लेषणात्मक खाता"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action
msgid "Click to create a new contract template."
msgstr ""
#. module: contract
#: model:ir.actions.act_window,help:contract.action_account_analytic_overdue_all
msgid "Click to create a new contract."
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "अनुबंध"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_contract_template_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Contract Template"
msgstr "अनुबंध टेम्पलेट"
#. module: contract
#: model:ir.actions.act_window,name:contract.account_analytic_contract_action
#: model:ir.ui.menu,name:contract.account_analytic_contract_menu
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_tree
msgid "Contract Templates"
msgstr ""
#. module: contract
#: model:ir.actions.act_window,name:contract.action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_config_contract
msgid "Contracts"
msgstr "अनुबंध"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Create invoices"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_create_uid
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_create_uid
msgid "Created by"
msgstr "द्वारा बनाया गया"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_create_date
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_create_date
msgid "Created on"
msgstr "को निर्मित"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_next_date
msgid "Date of Next Invoice"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_date_start
msgid "Date start"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Day(s)"
msgstr "दिन()"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_name
msgid "Description"
msgstr "विवरण"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_discount
msgid "Discount (%)"
msgstr "छूट (%)"
#. module: contract
#: code:addons/contract/models/account_analytic_invoice_line.py:56
#, python-format
msgid "Discount should be less or equal to 100"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_invoice_line_discount
msgid ""
"Discount that is applied in generated invoices. It should be less or equal "
"to 100"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_display_name
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_display_name
msgid "Display Name"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoices
msgid "Generate recurring invoices automatically"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Group By..."
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_id
msgid "ID"
msgstr "आईडी"
#. module: contract
#: model:ir.model,name:contract.model_account_invoice
msgid "Invoice"
msgstr "बीजक"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoice_line_ids
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoice_line_ids
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Invoice Lines"
msgstr ""
#. module: contract
#: model:ir.actions.act_window,name:contract.act_recurring_invoices
msgid "Invoices"
msgstr "चालान"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Invoicing Type"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Invoicing type"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_journal_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_journal_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Journal"
msgstr "पत्रिका"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract___last_update
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line___last_update
msgid "Last Modified on"
msgstr "अंतिम बार संशोधित"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_write_uid
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_write_uid
msgid "Last Updated by"
msgstr "द्वारा अंतिम अद्यतन"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_write_date
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_write_date
msgid "Last Updated on"
msgstr "अंतिम बार अद्यतन किया गया"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Legend (for the markers inside invoice lines description)"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s)"
msgstr "माह(महीने)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s) last day"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_name
msgid "Name"
msgstr "नाम"
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Next Invoice"
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
#: selection:account.analytic.contract,recurring_invoicing_type:0
msgid "Post-paid"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
#: selection:account.analytic.contract,recurring_invoicing_type:0
msgid "Pre-paid"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_pricelist_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_pricelist_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Pricelist"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_product_id
msgid "Product"
msgstr "प्रोडक्ट"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_quantity
msgid "Quantity"
msgstr "संख्या"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_rule_type
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Recurrence"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Recurring Invoices"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_interval
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_interval
msgid "Repeat Every"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_interval
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_interval
msgid "Repeat every (Days/Week/Month/Year)"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
msgid "Specify Interval for automatic invoice generation."
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Specify if process date is 'from' or 'to' invoicing date"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_subtotal
msgid "Sub Total"
msgstr "उप कुल"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_unit
msgid "Unit Price"
msgstr "यूनिट मूल्य"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_uom_id
msgid "Unit of Measure"
msgstr "माप की इकाई"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Week(s)"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Year(s)"
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr ""
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_contract
msgid "account.analytic.contract"
msgstr ""
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_invoice_line
msgid "account.analytic.invoice.line"
msgstr "account.analytic.invoice.line"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "⇒ Show recurring invoices"
msgstr ""

139
contract/i18n/hr.po

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"MIME-Version: 1.0\n"
@ -19,6 +19,64 @@ msgstr ""
"Language: hr\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -31,6 +89,56 @@ msgstr "<strong>#KRAJ#</strong>: Završni datum obračunatog perioda"
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#START#</strong>: Početni datum obračunatog perioda"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -54,7 +162,15 @@ msgid "Click to create a new contract."
msgstr "Kliknite za kreiranje novog ugovora."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Ugovor"
@ -241,7 +357,7 @@ msgid "Next Invoice"
msgstr "Sljedeći račun"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
@ -300,6 +416,16 @@ msgstr "Ponovi svakih"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -327,6 +453,11 @@ msgstr ""
msgid "Unit of Measure"
msgstr "Jedinica mjere"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -340,7 +471,7 @@ msgid "Year(s)"
msgstr "Godina(e)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr ""

144
contract/i18n/hr_HR.po

@ -4,14 +4,13 @@
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2016
# Bole <bole@dajmi5.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -19,6 +18,64 @@ msgstr ""
"Language: hr_HR\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -31,6 +88,56 @@ msgstr "<strong>#KRAJ#</strong>: Krajnji datum perioda računa"
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#POČETAK#</strong>: Početni datum perioda računa"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -54,7 +161,15 @@ msgid "Click to create a new contract."
msgstr "Kliknite za kreiranje novog ugovora."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Ugovor"
@ -241,7 +356,7 @@ msgid "Next Invoice"
msgstr "Sljedeći račun"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr "Molimo definirajte dnevnik prodaje za poduzeće '%s'."
@ -300,6 +415,16 @@ msgstr "Ponovi svakih"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Ponavljaj svakih (Dana/Tjedana/Mjesec/Godina)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -310,7 +435,7 @@ msgstr "Odredite interval za automatsko generiranje računa."
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Specify if process date is 'from' or 'to' invoicing date"
msgstr ""
msgstr "Navedite da li je datum obrade 'od' ili 'do' datuma računa"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_subtotal
@ -327,6 +452,11 @@ msgstr "Jedinična cijena"
msgid "Unit of Measure"
msgstr "Jedinica mjere"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -340,7 +470,7 @@ msgid "Year(s)"
msgstr "Godina(e)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr "Prvo morate odabrati partnera za Ugovor %s!"

139
contract/i18n/it.po

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>, 2017\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"MIME-Version: 1.0\n"
@ -19,6 +19,64 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -31,6 +89,56 @@ msgstr "<strong>#END#</strong>: Data di fine del periodo fatturato"
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#START#</strong>: Data di inizio del periodo fatturato"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -54,7 +162,15 @@ msgid "Click to create a new contract."
msgstr "Cliccare per creare un nuovo contratto"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Contratto"
@ -242,7 +358,7 @@ msgid "Next Invoice"
msgstr "Prossima fattura"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr "Definire un sezionale vendite per l'azienda '%s'."
@ -301,6 +417,16 @@ msgstr "Ripeti ogni"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Ripeti ogni (Giorni/settimane/mesi/anni)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -329,6 +455,11 @@ msgstr "Prezzo unitario"
msgid "Unit of Measure"
msgstr "Unità di misura"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -342,7 +473,7 @@ msgid "Year(s)"
msgstr "Anno(i)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr "Bisogna prima selezionare un cliente per il contratto %s!"

139
contract/i18n/nl.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"MIME-Version: 1.0\n"
@ -18,6 +18,64 @@ msgstr ""
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -30,6 +88,56 @@ msgstr "<strong>#END#</strong>: Einddatum van de facturatieperiode"
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#START#</strong>: Startdatum van de facturatie periode"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -53,7 +161,15 @@ msgid "Click to create a new contract."
msgstr "Klik voor het aanmaken van een nieuw contract"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Contract"
@ -240,7 +356,7 @@ msgid "Next Invoice"
msgstr "Volgende factuur"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr "U dient een verkoopboek te definiëren voor het bedrijf '%s'."
@ -299,6 +415,16 @@ msgstr "Herhaal elke:"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Herhaal elke (dag/week/maand/jaar)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -328,6 +454,11 @@ msgstr "Prijs per eenheid"
msgid "Unit of Measure"
msgstr "Maateenheid"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -341,7 +472,7 @@ msgid "Year(s)"
msgstr "Jaar"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr " Er moet eerst een klant worden ingesteld op contract %s!"

489
contract/i18n/nl_NL.po

@ -0,0 +1,489 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract
#
# Translators:
# Peter Hageman <hageman.p@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: nl_NL\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#END#</strong>: End date of the invoiced period"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Account Analytic Lines"
msgstr ""
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr ""
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action
msgid "Click to create a new contract template."
msgstr ""
#. module: contract
#: model:ir.actions.act_window,help:contract.action_account_analytic_overdue_all
msgid "Click to create a new contract."
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Contract"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_contract_template_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Contract Template"
msgstr "Contractsjabloon"
#. module: contract
#: model:ir.actions.act_window,name:contract.account_analytic_contract_action
#: model:ir.ui.menu,name:contract.account_analytic_contract_menu
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_tree
msgid "Contract Templates"
msgstr ""
#. module: contract
#: model:ir.actions.act_window,name:contract.action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_config_contract
msgid "Contracts"
msgstr "Contracten"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Create invoices"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_create_uid
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_create_uid
msgid "Created by"
msgstr "Aangemaakt door"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_create_date
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_create_date
msgid "Created on"
msgstr "Aangemaakt op"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_next_date
msgid "Date of Next Invoice"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_date_start
msgid "Date start"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Day(s)"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_name
msgid "Description"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_discount
msgid "Discount (%)"
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_invoice_line.py:56
#, python-format
msgid "Discount should be less or equal to 100"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_invoice_line_discount
msgid ""
"Discount that is applied in generated invoices. It should be less or equal "
"to 100"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_display_name
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_display_name
msgid "Display Name"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoices
msgid "Generate recurring invoices automatically"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Group By..."
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_id
msgid "ID"
msgstr "ID"
#. module: contract
#: model:ir.model,name:contract.model_account_invoice
msgid "Invoice"
msgstr "Factuur"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoice_line_ids
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoice_line_ids
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Invoice Lines"
msgstr ""
#. module: contract
#: model:ir.actions.act_window,name:contract.act_recurring_invoices
msgid "Invoices"
msgstr "Facturen"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Invoicing Type"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Invoicing type"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_journal_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_journal_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Journal"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract___last_update
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line___last_update
msgid "Last Modified on"
msgstr "Laatst aangepast op"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_write_uid
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_write_uid
msgid "Last Updated by"
msgstr "Laatst bijgewerkt door"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_write_date
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_write_date
msgid "Last Updated on"
msgstr "Laatst bijgewerkt op"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Legend (for the markers inside invoice lines description)"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s)"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s) last day"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_name
msgid "Name"
msgstr "Naam"
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Next Invoice"
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
#: selection:account.analytic.contract,recurring_invoicing_type:0
msgid "Post-paid"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
#: selection:account.analytic.contract,recurring_invoicing_type:0
msgid "Pre-paid"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_pricelist_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_pricelist_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Pricelist"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_product_id
msgid "Product"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_quantity
msgid "Quantity"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_rule_type
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Recurrence"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Recurring Invoices"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_interval
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_interval
msgid "Repeat Every"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_interval
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_interval
msgid "Repeat every (Days/Week/Month/Year)"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
msgid "Specify Interval for automatic invoice generation."
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Specify if process date is 'from' or 'to' invoicing date"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_subtotal
msgid "Sub Total"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_unit
msgid "Unit Price"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_uom_id
msgid "Unit of Measure"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Week(s)"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Year(s)"
msgstr ""
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr ""
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_contract
msgid "account.analytic.contract"
msgstr ""
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_invoice_line
msgid "account.analytic.invoice.line"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "⇒ Show recurring invoices"
msgstr ""

231
contract/i18n/pt.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n"
"MIME-Version: 1.0\n"
@ -18,23 +18,131 @@ msgstr ""
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#END#</strong>: End date of the invoiced period"
msgstr ""
msgstr "<strong>#END#</strong>: Data final do período de faturação"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#START#</strong>: Data inicial do período de faturação"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Account Analytic Lines"
msgstr ""
msgstr "Linhas de Conta Analítica"
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_account
@ -45,23 +153,31 @@ msgstr "Conta Analítica"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action
msgid "Click to create a new contract template."
msgstr ""
msgstr "Clique para criar um novo modelo de contrato."
#. module: contract
#: model:ir.actions.act_window,help:contract.action_account_analytic_overdue_all
msgid "Click to create a new contract."
msgstr "Clique para criar um novo contrato."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr ""
msgstr "Contrato"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_contract_template_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Contract Template"
msgstr ""
msgstr "Modelo de Contrato"
#. module: contract
#: model:ir.actions.act_window,name:contract.account_analytic_contract_action
@ -69,19 +185,19 @@ msgstr ""
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_tree
msgid "Contract Templates"
msgstr ""
msgstr "Modelos de Contratos"
#. module: contract
#: model:ir.actions.act_window,name:contract.action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_config_contract
msgid "Contracts"
msgstr ""
msgstr "Contratos"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Create invoices"
msgstr ""
msgstr "Criar faturas"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_create_uid
@ -98,34 +214,34 @@ msgstr "Criado em"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_next_date
msgid "Date of Next Invoice"
msgstr ""
msgstr "Data da Próxima Fatura"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_date_start
msgid "Date start"
msgstr ""
msgstr "Data de início"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Day(s)"
msgstr ""
msgstr "Dia(s)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_name
msgid "Description"
msgstr ""
msgstr "Descrição"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_discount
msgid "Discount (%)"
msgstr ""
msgstr "Desconto (%)"
#. module: contract
#: code:addons/contract/models/account_analytic_invoice_line.py:56
#, python-format
msgid "Discount should be less or equal to 100"
msgstr ""
msgstr "O desconto deve ser igual ou inferior a 100"
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_invoice_line_discount
@ -133,6 +249,8 @@ msgid ""
"Discount that is applied in generated invoices. It should be less or equal "
"to 100"
msgstr ""
"Desconto que é aplicado nas faturas geradas. Deve ser igual ou inferior a "
"100"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_display_name
@ -143,12 +261,12 @@ msgstr "Nome a Apresentar"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoices
msgid "Generate recurring invoices automatically"
msgstr ""
msgstr "Gerar faturas recorrentes automaticamente"
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Group By..."
msgstr ""
msgstr "Agrupar Por..."
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_id
@ -159,37 +277,37 @@ msgstr "ID"
#. module: contract
#: model:ir.model,name:contract.model_account_invoice
msgid "Invoice"
msgstr ""
msgstr "Fatura"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoice_line_ids
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoice_line_ids
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Invoice Lines"
msgstr ""
msgstr "Linha de Fatura"
#. module: contract
#: model:ir.actions.act_window,name:contract.act_recurring_invoices
msgid "Invoices"
msgstr ""
msgstr "Faturas"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Invoicing Type"
msgstr ""
msgstr "Tipo de Faturação"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Invoicing type"
msgstr ""
msgstr "Tipo de faturação"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_journal_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_journal_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Journal"
msgstr ""
msgstr "Diário"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract___last_update
@ -213,19 +331,19 @@ msgstr "Atualizado pela última vez em"
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Legend (for the markers inside invoice lines description)"
msgstr ""
msgstr "Legenda (para a descrição dos marcadores nas linhas de fatura)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s)"
msgstr ""
msgstr "Mes(es)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s) last day"
msgstr ""
msgstr "Último dia do(s) Mes(es)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_name
@ -235,124 +353,141 @@ msgstr "Nome"
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Next Invoice"
msgstr ""
msgstr "Próxima Fatura"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
msgstr "Por favor, defina um diário de vendas para a empresa '%s'."
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
#: selection:account.analytic.contract,recurring_invoicing_type:0
msgid "Post-paid"
msgstr ""
msgstr "Pós-pago"
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
#: selection:account.analytic.contract,recurring_invoicing_type:0
msgid "Pre-paid"
msgstr ""
msgstr "Pré-pago"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_pricelist_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_pricelist_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Pricelist"
msgstr ""
msgstr "Lista de Preços"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_product_id
msgid "Product"
msgstr ""
msgstr "Produto"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_quantity
msgid "Quantity"
msgstr ""
msgstr "Quantidade"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_rule_type
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Recurrence"
msgstr ""
msgstr "Recorrência"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Recurring Invoices"
msgstr ""
msgstr "Faturas Recorrentes"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_interval
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_interval
msgid "Repeat Every"
msgstr ""
msgstr "Repetir a cada"
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_interval
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_interval
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Repatir a cada (Dia/Semana/Mês/Ano)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
msgid "Specify Interval for automatic invoice generation."
msgstr ""
msgstr "Especifique o intervalo para a geração automática de faturas."
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Specify if process date is 'from' or 'to' invoicing date"
msgstr ""
"Especifique se a data de processamento é 'de' ou 'até' relativamente à data "
"da fatura"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_subtotal
msgid "Sub Total"
msgstr ""
msgstr "Subtotal"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_unit
msgid "Unit Price"
msgstr ""
msgstr "Preço Unitário"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_uom_id
msgid "Unit of Measure"
msgstr "Unidade de Medida"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Week(s)"
msgstr ""
msgstr "Semana(s)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Year(s)"
msgstr ""
msgstr "Ano(s)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr ""
msgstr "Deve primeiro selecionar um Cliente para o Contrato %s!"
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_contract
msgid "account.analytic.contract"
msgstr ""
msgstr "account.analytic.contract"
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_invoice_line
msgid "account.analytic.invoice.line"
msgstr ""
msgstr "account.analytic.invoice.line"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "⇒ Show recurring invoices"
msgstr ""
msgstr "⇒ Mostrar faturas recorrentes"

139
contract/i18n/pt_BR.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
"MIME-Version: 1.0\n"
@ -18,6 +18,64 @@ msgstr ""
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -30,6 +88,56 @@ msgstr ""
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -53,7 +161,15 @@ msgid "Click to create a new contract."
msgstr "Clique para criar um novo contrato."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Contrato"
@ -239,7 +355,7 @@ msgid "Next Invoice"
msgstr "Próxima fatura"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
@ -298,6 +414,16 @@ msgstr "Repete cada"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Repete cada (Dia/Semana/Mês/Ano)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -325,6 +451,11 @@ msgstr "Preço unitário"
msgid "Unit of Measure"
msgstr "Unidade de medida"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -338,7 +469,7 @@ msgid "Year(s)"
msgstr "Ano(s)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr "Primeiro você deve selecionar um Cliente para o contrato %s!"

224
contract/i18n/tr.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n"
"MIME-Version: 1.0\n"
@ -18,50 +18,166 @@ msgstr ""
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#END#</strong>: End date of the invoiced period"
msgstr ""
msgstr "<strong>#SON#</strong>: Faturalanmış dönemin bitiş tarihi"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr "<strong>#BAŞLAMA#</strong>: Faturalandırılan süre başlangıç tarihi"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Account Analytic Lines"
msgstr ""
msgstr "Analitik Hesap Satırı"
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr ""
msgstr "Analitik Hesap"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action
msgid "Click to create a new contract template."
msgstr ""
msgstr "Yeni bir sözleşme şablonu oluşturmak için tıklayın."
#. module: contract
#: model:ir.actions.act_window,help:contract.action_account_analytic_overdue_all
msgid "Click to create a new contract."
msgstr "Yeni bir sözleşme oluşturmak için tıklayın."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr ""
msgstr "Sözleşme"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_contract_template_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Contract Template"
msgstr ""
msgstr "Sözleşme Şablonu"
#. module: contract
#: model:ir.actions.act_window,name:contract.account_analytic_contract_action
@ -69,19 +185,19 @@ msgstr ""
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_tree
msgid "Contract Templates"
msgstr ""
msgstr "Sözleşme Şablonları"
#. module: contract
#: model:ir.actions.act_window,name:contract.action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_action_account_analytic_overdue_all
#: model:ir.ui.menu,name:contract.menu_config_contract
msgid "Contracts"
msgstr ""
msgstr "Sözleşmeler"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Create invoices"
msgstr ""
msgstr "Faturalar oluştur"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_create_uid
@ -98,18 +214,18 @@ msgstr "Oluşturuldu"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_next_date
msgid "Date of Next Invoice"
msgstr ""
msgstr "Sonraki Fatura Tarihi"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_date_start
msgid "Date start"
msgstr ""
msgstr "Başlanma Tarihi"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Day(s)"
msgstr ""
msgstr "Gün(ler)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_name
@ -119,13 +235,13 @@ msgstr "Açıklama"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_discount
msgid "Discount (%)"
msgstr ""
msgstr "İndirim (%)"
#. module: contract
#: code:addons/contract/models/account_analytic_invoice_line.py:56
#, python-format
msgid "Discount should be less or equal to 100"
msgstr ""
msgstr "İndirim 100'den az veya ona eşit olmalıdır"
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_invoice_line_discount
@ -133,22 +249,23 @@ msgid ""
"Discount that is applied in generated invoices. It should be less or equal "
"to 100"
msgstr ""
"Üretilen faturalarda uygulanan indirim. 100'den az veya ona eşit olmalıdır"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_display_name
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_display_name
msgid "Display Name"
msgstr ""
msgstr "Ad Görünümü"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoices
msgid "Generate recurring invoices automatically"
msgstr ""
msgstr "Otomatik olarak tekrarlanan faturalar oluştur"
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Group By..."
msgstr ""
msgstr "Grupla ..."
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_id
@ -159,73 +276,73 @@ msgstr "ID"
#. module: contract
#: model:ir.model,name:contract.model_account_invoice
msgid "Invoice"
msgstr ""
msgstr "Fatura"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoice_line_ids
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoice_line_ids
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Invoice Lines"
msgstr ""
msgstr "Fatura Satırları"
#. module: contract
#: model:ir.actions.act_window,name:contract.act_recurring_invoices
msgid "Invoices"
msgstr ""
msgstr "Faturalar"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Invoicing Type"
msgstr ""
msgstr "Fatura Türü"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_invoicing_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_invoicing_type
msgid "Invoicing type"
msgstr ""
msgstr "Fatura türü"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_journal_id
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_journal_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Journal"
msgstr ""
msgstr "Yevmiye"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract___last_update
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line___last_update
msgid "Last Modified on"
msgstr ""
msgstr "Son Değiştirilme"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_write_uid
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_write_uid
msgid "Last Updated by"
msgstr "Son güncelleyen"
msgstr "Son Güncelleyen"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_write_date
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_write_date
msgid "Last Updated on"
msgstr "Son güncelleme"
msgstr "Son Güncelleme"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
msgid "Legend (for the markers inside invoice lines description)"
msgstr ""
msgstr "Açıklamalar (fatura satırlarındaki tanımlayıcılar için)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s)"
msgstr ""
msgstr "Ay(lar)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Month(s) last day"
msgstr ""
msgstr "Ay(lar) son günü"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_name
@ -235,13 +352,13 @@ msgstr "Adı"
#. module: contract
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Next Invoice"
msgstr ""
msgstr "Sonraki Fatura"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr ""
msgstr "Lütfen '%s' firması için bir satış yevmiyesi tanımlayın."
#. module: contract
#: selection:account.analytic.account,recurring_invoicing_type:0
@ -260,30 +377,30 @@ msgstr ""
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_pricelist_id
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Pricelist"
msgstr ""
msgstr "Fiyat Listesi"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_product_id
msgid "Product"
msgstr ""
msgstr "Ürün"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_quantity
msgid "Quantity"
msgstr ""
msgstr "Miktar"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,field_description:contract.field_account_analytic_contract_recurring_rule_type
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_search
msgid "Recurrence"
msgstr ""
msgstr "Tekrarlayan"
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.view_account_analytic_account_contract_search
msgid "Recurring Invoices"
msgstr ""
msgstr "Tekrarlayan Faturalar"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_recurring_interval
@ -297,6 +414,16 @@ msgstr ""
msgid "Repeat every (Days/Week/Month/Year)"
msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -312,35 +439,40 @@ msgstr ""
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_subtotal
msgid "Sub Total"
msgstr ""
msgstr "Alt Toplam"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_price_unit
msgid "Unit Price"
msgstr ""
msgstr "Birim Fiyat"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_uom_id
msgid "Unit of Measure"
msgstr "Ölçü Birimi"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Week(s)"
msgstr ""
msgstr "Hafta(lar)"
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
msgid "Year(s)"
msgstr ""
msgstr "Yıl(lar)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr ""
msgstr "Önce Sözleşme %s için bir Müşteri seçmelisiniz!"
#. module: contract
#: model:ir.model,name:contract.model_account_analytic_contract
@ -355,4 +487,4 @@ msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "⇒ Show recurring invoices"
msgstr ""
msgstr "⇒ Tekrarlayan Faturalar Göster"

139
contract/i18n/tr_TR.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n"
"MIME-Version: 1.0\n"
@ -18,6 +18,64 @@ msgstr ""
"Language: tr_TR\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: contract
#: model:mail.template,body_html:contract.email_contract_template
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
" <p>Hello ${object.partner_id.name or ''},</p>\n"
" <p>A new contract has been created: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Contract: <strong>${object.name}</strong><br />\n"
" % if object.date_start:\n"
" &nbsp;&nbsp;Contract Date Start: ${object.date_start or ''}<br />\n"
" % endif\n"
"\n"
" % if object.user_id:\n"
" % if object.user_id.email:\n"
" &nbsp;&nbsp;Your Contact: <a href=\"mailto:${object.user_id.email or ''}?subject=Contract%20${object.name}\">${object.user_id.name}</a>\n"
" % else:\n"
" &nbsp;&nbsp;Your Contact: ${object.user_id.name}\n"
" % endif\n"
" % endif\n"
" </p>\n"
"\n"
" <br/>\n"
" <p>If you have any questions, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;\">\n"
" <strong style=\"text-transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">\n"
" Phone: ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web: <a href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
#. module: contract
#: model:mail.template,subject:contract.email_contract_template
msgid "${object.company_id.name} Contract (Ref ${object.name or 'n/a'})"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -31,6 +89,56 @@ msgid "<strong>#START#</strong>: Start date of the invoiced period"
msgstr ""
"<Strong> #Başlama # </ strong>: Faturalandırılan dönemin başlangıç tarihi"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Contract: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Date Start: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Description</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Partner:</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Recurring Items</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Responsible: </strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Total</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "<strong>Unit Price</strong>"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
#: model:ir.ui.view,arch_db:contract.account_analytic_contract_view_form
@ -54,7 +162,15 @@ msgid "Click to create a new contract."
msgstr "Yeni bir sözleşme oluşturmak için tıklayın."
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:216
#, python-format
msgid "Compose Email"
msgstr ""
#. module: contract
#: model:ir.actions.report.xml,name:contract.report_contract
#: model:ir.model.fields,field_description:contract.field_account_invoice_contract_id
#: model:mail.template,report_name:contract.email_contract_template
msgid "Contract"
msgstr "Sözleşme"
@ -240,7 +356,7 @@ msgid "Next Invoice"
msgstr "Sonraki Fatura"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:131
#: code:addons/contract/models/account_analytic_account.py:137
#, python-format
msgid "Please define a sale journal for the company '%s'."
msgstr "Lütfen '%s' şirketi için bir satış yevmiyesi tanımlayın."
@ -299,6 +415,16 @@ msgstr "Tekrarlama Sıklığı"
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Tekrarlama sıklığı(Gün /Hafta /Ay /Yıl)"
#. module: contract
#: model:ir.model.fields,field_description:contract.field_account_analytic_account_user_id
msgid "Responsible"
msgstr ""
#. module: contract
#: model:ir.ui.view,arch_db:contract.account_analytic_account_recurring_form_form
msgid "Send by Email"
msgstr ""
#. module: contract
#: model:ir.model.fields,help:contract.field_account_analytic_account_recurring_rule_type
#: model:ir.model.fields,help:contract.field_account_analytic_contract_recurring_rule_type
@ -326,6 +452,11 @@ msgstr "Birim Fiyat"
msgid "Unit of Measure"
msgstr "Ölçü Birimi"
#. module: contract
#: model:ir.ui.view,arch_db:contract.report_contract_document
msgid "VAT:"
msgstr ""
#. module: contract
#: selection:account.analytic.account,recurring_rule_type:0
#: selection:account.analytic.contract,recurring_rule_type:0
@ -339,7 +470,7 @@ msgid "Year(s)"
msgstr "Yıl(lar)"
#. module: contract
#: code:addons/contract/models/account_analytic_account.py:123
#: code:addons/contract/models/account_analytic_account.py:129
#, python-format
msgid "You must first select a Customer for Contract %s!"
msgstr "Önce bir Müşteri Sözleşmesi seçmelisiniz %s!"

6
contract/i18n/zh_CN.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27 02:40+0000\n"
"PO-Revision-Date: 2017-04-27 02:40+0000\n"
"POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n"
"MIME-Version: 1.0\n"
@ -40,7 +40,7 @@ msgstr ""
#: model:ir.model,name:contract.model_account_analytic_account
#: model:ir.model.fields,field_description:contract.field_account_analytic_invoice_line_analytic_account_id
msgid "Analytic Account"
msgstr ""
msgstr "核算科目"
#. module: contract
#: model:ir.actions.act_window,help:contract.account_analytic_contract_action

1
contract/models/__init__.py

@ -4,4 +4,5 @@
from . import account_analytic_contract
from . import account_analytic_account
from . import account_analytic_invoice_line
from . import account_analytic_contract_line
from . import account_invoice

66
contract/models/account_analytic_account.py

@ -23,6 +23,12 @@ class AccountAnalyticAccount(models.Model):
string='Contract Template',
comodel_name='account.analytic.contract',
)
recurring_invoice_line_ids = fields.One2many(
string='Invoice Lines',
comodel_name='account.analytic.invoice.line',
inverse_name='analytic_account_id',
copy=True,
)
date_start = fields.Date(default=fields.Date.context_today)
recurring_invoices = fields.Boolean(
string='Generate recurring invoices automatically',
@ -32,18 +38,36 @@ class AccountAnalyticAccount(models.Model):
copy=False,
string='Date of Next Invoice',
)
user_id = fields.Many2one(
comodel_name='res.users',
string='Responsible',
index=True,
default=lambda self: self.env.user,
)
@api.onchange('contract_template_id')
def _onchange_contract_template_id(self):
""" It updates contract fields with that of the template """
"""Update the contract fields with that of the template.
Take special consideration with the `recurring_invoice_line_ids`,
which must be created using the data from the contract lines. Cascade
deletion ensures that any errant lines that are created are also
deleted.
"""
contract = self.contract_template_id
for field_name, field in contract._fields.iteritems():
if any((
if field.name == 'recurring_invoice_line_ids':
lines = self._convert_contract_lines(contract)
self.recurring_invoice_line_ids = lines
elif not any((
field.compute, field.related, field.automatic,
field.readonly, field.company_dependent,
field.name in self.NO_SYNC,
)):
continue
self[field_name] = self.contract_template_id[field_name]
@api.onchange('recurring_invoices')
@ -55,6 +79,15 @@ class AccountAnalyticAccount(models.Model):
def _onchange_partner_id(self):
self.pricelist_id = self.partner_id.property_product_pricelist.id
@api.multi
def _convert_contract_lines(self, contract):
self.ensure_one()
new_lines = []
for contract_line in contract.recurring_invoice_line_ids:
vals = contract_line._convert_to_write(contract_line.read()[0])
new_lines.append((0, 0, vals))
return new_lines
@api.model
def get_relative_delta(self, recurring_rule_type, interval):
if recurring_rule_type == 'daily':
@ -190,3 +223,30 @@ class AccountAnalyticAccount(models.Model):
[('recurring_next_date', '<=', fields.date.today()),
('recurring_invoices', '=', True)])
return contracts.recurring_create_invoice()
@api.multi
def action_contract_send(self):
self.ensure_one()
template = self.env.ref(
'contract.email_contract_template',
False,
)
compose_form = self.env.ref('mail.email_compose_message_wizard_form')
ctx = dict(
default_model='account.analytic.account',
default_res_id=self.id,
default_use_template=bool(template),
default_template_id=template and template.id or False,
default_composition_mode='comment',
)
return {
'name': _('Compose Email'),
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'mail.compose.message',
'views': [(compose_form.id, 'form')],
'view_id': compose_form.id,
'target': 'new',
'context': ctx,
}

2
contract/models/account_analytic_contract.py

@ -25,7 +25,7 @@ class AccountAnalyticContract(models.Model):
string='Pricelist',
)
recurring_invoice_line_ids = fields.One2many(
comodel_name='account.analytic.invoice.line',
comodel_name='account.analytic.contract.line',
inverse_name='analytic_account_id',
copy=True,
string='Invoice Lines',

19
contract/models/account_analytic_contract_line.py

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountAnalyticContractLine(models.Model):
_name = 'account.analytic.contract.line'
_description = 'Contract Lines'
_inherit = 'account.analytic.invoice.line'
analytic_account_id = fields.Many2one(
string='Contract',
comodel_name='account.analytic.contract',
required=True,
ondelete='cascade',
)

49
contract/models/account_analytic_invoice_line.py

@ -3,7 +3,7 @@
# © 2014 Angel Moya <angel.moya@domatix.com>
# © 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2016 LasLabs Inc.
# Copyright 2016-2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
@ -16,23 +16,44 @@ class AccountAnalyticInvoiceLine(models.Model):
_name = 'account.analytic.invoice.line'
product_id = fields.Many2one(
'product.product', string='Product', required=True)
'product.product',
string='Product',
required=True,
)
analytic_account_id = fields.Many2one(
'account.analytic.account', string='Analytic Account')
name = fields.Text(string='Description', required=True)
quantity = fields.Float(default=1.0, required=True)
'account.analytic.account',
string='Analytic Account',
required=True,
ondelete='cascade',
)
name = fields.Text(
string='Description',
required=True,
)
quantity = fields.Float(
default=1.0,
required=True,
)
uom_id = fields.Many2one(
'product.uom', string='Unit of Measure', required=True)
price_unit = fields.Float('Unit Price', required=True)
'product.uom',
string='Unit of Measure',
required=True,
)
price_unit = fields.Float(
'Unit Price',
required=True,
)
price_subtotal = fields.Float(
compute='_compute_price_subtotal',
digits=dp.get_precision('Account'),
string='Sub Total')
string='Sub Total',
)
discount = fields.Float(
string='Discount (%)',
digits=dp.get_precision('Discount'),
help='Discount that is applied in generated invoices.'
' It should be less or equal to 100')
' It should be less or equal to 100',
)
@api.multi
@api.depends('quantity', 'price_unit', 'discount')
@ -68,14 +89,20 @@ class AccountAnalyticInvoiceLine(models.Model):
self.uom_id.category_id.id):
vals['uom_id'] = self.product_id.uom_id
if self.analytic_account_id._name == 'account.analytic.account':
date = (
self.analytic_account_id.recurring_next_date or
fields.Datetime.now()
)
partner = self.analytic_account_id.partner_id
else:
date = fields.Datetime.now()
partner = self.env.user.partner_id
product = self.product_id.with_context(
lang=self.analytic_account_id.partner_id.lang,
partner=self.analytic_account_id.partner_id.id,
lang=partner.lang,
partner=partner.id,
quantity=self.quantity,
date=date,
pricelist=self.analytic_account_id.pricelist_id.id,

12
contract/report/contract_views.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<report
id="report_contract"
model="account.analytic.account"
string="Contract"
report_type="qweb-pdf"
name="contract.report_contract_document"
file="contract.report_contract"/>
</odoo>

74
contract/report/report_contract.xml

@ -0,0 +1,74 @@
<?xml version="1.0" ?>
<odoo>
<template id="report_contract_document">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report.external_layout">
<div class="page">
<div class="oe_structure"/>
<div class="row" id="partner_info">
<div class="col-xs-5 col-xs-offset-7">
<p id="partner_info"><strong>Partner:</strong></p>
<div t-field="o.partner_id" t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "mobile", "fax", "email"], "no_marker": true, "phone_icons": true}'/>
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
</div>
</div>
<div class="row" id="header_info">
<div class="col-xs-3">
<strong>Date Start: </strong><p t-field="o.date_start"/>
<strong>Responsible: </strong><p t-field="o.user_id"/>
<strong>Contract: </strong><p t-field="o.code"/>
</div>
</div>
<div class="row" id="invoice_info">
<t t-set="total" t-value="0"/>
<div class="col-xs-12">
<t t-set="total" t-value="0"/>
<p id="services_info"><strong>Recurring Items</strong></p>
<table class="table table-condensed">
<thead>
<tr>
<th><strong>Description</strong></th>
<th class="text-right"><strong>Quantity</strong></th>
<th class="text-right"><strong>Unit Price</strong></th>
<th class="text-right"><strong>Price</strong></th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.recurring_invoice_line_ids" t-as="l">
<td>
<span t-field="l.name"/>
</td>
<td class="text-right">
<span t-field="l.quantity"/>
</td>
<td class="text-right">
<span t-field="l.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<t t-set="total" t-value="total + l.price_subtotal"/>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-esc="total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>

2
contract/security/ir.model.access.csv

@ -3,3 +3,5 @@
"account_analytic_contract_user","Recurring user","model_account_analytic_contract","account.group_account_user",1,0,0,0
"account_analytic_invoice_line_manager","Recurring manager","model_account_analytic_invoice_line","account.group_account_manager",1,1,1,1
"account_analytic_invoice_line_user","Recurring user","model_account_analytic_invoice_line","account.group_account_user",1,0,0,0
"account_analytic_contract_line_manager","Recurring manager","model_account_analytic_contract_line","account.group_account_manager",1,1,1,1
"account_analytic_contract_line_user","Recurring user","model_account_analytic_contract_line","account.group_account_user",1,0,0,0

141
contract/tests/test_contract.py

@ -1,55 +1,69 @@
# -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2016 Tecnativa - Carlos Dauden
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
from odoo.tests import common
class TestContract(TransactionCase):
# Use case : Prepare some data for current test case
def setUp(self):
super(TestContract, self).setUp()
self.partner = self.env.ref('base.res_partner_2')
self.product = self.env.ref('product.product_product_2')
self.product.taxes_id += self.env['account.tax'].search(
class TestContractBase(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestContractBase, cls).setUpClass()
cls.partner = cls.env.ref('base.res_partner_2')
cls.product = cls.env.ref('product.product_product_2')
cls.product.taxes_id += cls.env['account.tax'].search(
[('type_tax_use', '=', 'sale')], limit=1)
self.product.description_sale = 'Test description sale'
self.template_vals = {
cls.product.description_sale = 'Test description sale'
cls.template_vals = {
'recurring_rule_type': 'yearly',
'recurring_interval': 12345,
'name': 'Test Contract Template',
}
self.template = self.env['account.analytic.contract'].create(
self.template_vals,
cls.template = cls.env['account.analytic.contract'].create(
cls.template_vals,
)
self.contract = self.env['account.analytic.account'].create({
cls.contract = cls.env['account.analytic.account'].create({
'name': 'Test Contract',
'partner_id': self.partner.id,
'pricelist_id': self.partner.property_product_pricelist.id,
'partner_id': cls.partner.id,
'pricelist_id': cls.partner.property_product_pricelist.id,
'recurring_invoices': True,
'date_start': '2016-02-15',
'recurring_next_date': '2016-02-29',
})
self.contract_line = self.env['account.analytic.invoice.line'].create({
'analytic_account_id': self.contract.id,
'product_id': self.product.id,
cls.line_vals = {
'analytic_account_id': cls.contract.id,
'product_id': cls.product.id,
'name': 'Services from #START# to #END#',
'quantity': 1,
'uom_id': self.product.uom_id.id,
'uom_id': cls.product.uom_id.id,
'price_unit': 100,
'discount': 50,
})
}
cls.acct_line = cls.env['account.analytic.invoice.line'].create(
cls.line_vals,
)
class TestContract(TestContractBase):
def _add_template_line(self, overrides=None):
if overrides is None:
overrides = {}
vals = self.line_vals.copy()
vals['analytic_account_id'] = self.template.id
vals.update(overrides)
return self.env['account.analytic.contract.line'].create(vals)
def test_check_discount(self):
with self.assertRaises(ValidationError):
self.contract_line.write({'discount': 120})
self.acct_line.write({'discount': 120})
def test_contract(self):
self.assertAlmostEqual(self.contract_line.price_subtotal, 50.0)
res = self.contract_line._onchange_product_id()
self.assertAlmostEqual(self.acct_line.price_subtotal, 50.0)
res = self.acct_line._onchange_product_id()
self.assertIn('uom_id', res['domain'])
self.contract_line.price_unit = 100.0
self.acct_line.price_unit = 100.0
self.contract.partner_id = False
with self.assertRaises(ValidationError):
@ -122,10 +136,10 @@ class TestContract(TransactionCase):
def test_uom(self):
uom_litre = self.env.ref('product.product_uom_litre')
self.contract_line.uom_id = uom_litre.id
self.contract_line._onchange_product_id()
self.assertEqual(self.contract_line.uom_id,
self.contract_line.product_id.uom_id)
self.acct_line.uom_id = uom_litre.id
self.acct_line._onchange_product_id()
self.assertEqual(self.acct_line.uom_id,
self.acct_line.product_id.uom_id)
def test_onchange_product_id(self):
line = self.env['account.analytic.invoice.line'].new()
@ -134,8 +148,8 @@ class TestContract(TransactionCase):
def test_no_pricelist(self):
self.contract.pricelist_id = False
self.contract_line.quantity = 2
self.assertAlmostEqual(self.contract_line.price_subtotal, 100.0)
self.acct_line.quantity = 2
self.assertAlmostEqual(self.acct_line.price_subtotal, 100.0)
def test_check_journal(self):
contract_no_journal = self.contract.copy()
@ -146,7 +160,7 @@ class TestContract(TransactionCase):
contract_no_journal.recurring_create_invoice()
def test_onchange_contract_template_id(self):
""" It should change the contract values to match the template. """
"""It should change the contract values to match the template."""
self.contract.contract_template_id = self.template
self.contract._onchange_contract_template_id()
res = {
@ -155,3 +169,66 @@ class TestContract(TransactionCase):
}
del self.template_vals['name']
self.assertDictEqual(res, self.template_vals)
def test_onchange_contract_template_id_lines(self):
"""It should create invoice lines for the contract lines."""
self.acct_line.unlink()
self.line_vals['analytic_account_id'] = self.template.id
self.env['account.analytic.contract.line'].create(self.line_vals)
self.contract.contract_template_id = self.template
self.assertFalse(self.contract.recurring_invoice_line_ids,
'Recurring lines were not removed.')
self.contract._onchange_contract_template_id()
del self.line_vals['analytic_account_id']
self.assertEqual(len(self.contract.recurring_invoice_line_ids), 1)
for key, value in self.line_vals.items():
test_value = self.contract.recurring_invoice_line_ids[0][key]
try:
test_value = test_value.id
except AttributeError:
pass
self.assertEqual(test_value, value)
def test_send_mail_contract(self):
result = self.contract.action_contract_send()
self.assertEqual(result['res_model'], 'mail.compose.message')
def test_contract_onchange_product_id_domain_blank(self):
"""It should return a blank UoM domain when no product."""
line = self.env['account.analytic.contract.line'].new()
res = line._onchange_product_id()
self.assertFalse(res['domain']['uom_id'])
def test_contract_onchange_product_id_domain(self):
"""It should return UoM category domain."""
line = self._add_template_line()
res = line._onchange_product_id()
self.assertEqual(
res['domain']['uom_id'][0],
('category_id', '=', self.product.uom_id.category_id.id),
)
def test_contract_onchange_product_id_uom(self):
"""It should update the UoM for the line."""
line = self._add_template_line(
{'uom_id': self.env.ref('product.product_uom_litre').id}
)
line.product_id.uom_id = self.env.ref('product.product_uom_day').id
line._onchange_product_id()
self.assertEqual(line.uom_id,
line.product_id.uom_id)
def test_contract_onchange_product_id_name(self):
"""It should update the name for the line."""
line = self._add_template_line()
line.product_id.description_sale = 'Test'
line._onchange_product_id()
self.assertEqual(line.name,
'\n'.join([line.product_id.name,
line.product_id.description_sale,
]))

28
contract/views/account_analytic_account_view.xml

@ -2,11 +2,17 @@
<odoo>
<record id="account_analytic_account_recurring_form_form" model="ir.ui.view">
<field name="name">account.analytic.account.invoice.recurring.form.inherit</field>
<field name="name">Contract form</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="mode">primary</field>
<field name="priority" eval="9999"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']/.." position="before">
<header>
<button name="action_contract_send" type="object" string="Send by Email" groups="base.group_user"/>
</header>
</xpath>
<group name="main" position="after">
<separator string="Recurring Invoices"
attrs="{'invisible': [('recurring_invoices','!=',True)]}"
@ -74,9 +80,11 @@
<!-- Inherited Analytic Account list for contracts -->
<record id="view_account_analytic_account_journal_tree" model="ir.ui.view">
<field name="name">account.analytic.account.journal.list</field>
<field name="name">Contract list</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_list" />
<field name="mode">primary</field>
<field name="priority" eval="9999"/>
<field name="arch" type="xml">
<field name="partner_id" position="before">
<field name="journal_id" groups="account.group_account_user"/>
@ -89,7 +97,7 @@
<!-- Analytic Account search view for contract -->
<record id="view_account_analytic_account_contract_search" model="ir.ui.view">
<field name="name">account.analytic.account.contract.search</field>
<field name="name">Contract search</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_search"/>
<field name="arch" type="xml">
@ -125,6 +133,20 @@
</field>
</record>
<record id="action_account_analytic_overdue_all_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_account_analytic_account_journal_tree"/>
<field name="act_window_id" ref="action_account_analytic_overdue_all"/>
</record>
<record id="action_account_analytic_overdue_all_form" model="ir.actions.act_window.view">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_account_recurring_form_form"/>
<field name="act_window_id" ref="action_account_analytic_overdue_all"/>
</record>
<menuitem id="menu_action_account_analytic_overdue_all"
parent="account.menu_finance_receivables"
action="action_account_analytic_overdue_all"

89
contract_payment_auto/README.rst

@ -0,0 +1,89 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=====================
Contract Auto Payment
=====================
This module allows for the configuration of automatic payments on invoices that are created by a contract.
Usage
=====
Enable Automatic Payment
------------------------
* Navigate to a customer contract
* Check the `Auto Pay?` box to enable automatic payment
* Configure the options as desired
* Set the `Payment Token` to the payment token that should be used for automatic payment
Automatic Payment Settings
--------------------------
The following settings are available at both the contract and contract template level:
| Name | Description |
|------|-------------|
| Invoice Message | Message template that is used to send invoices to customers upon creation. |
| Payment Retry Message | Message template that is used to alert a customer that their automatic payment failed for some reason and will be retried. |
| Payment Fail Message | Message template that is used to alert a customer that their automatic payment failed and will no longer be retried. |
| Auto Pay Retries | Amount of times to attempt an automatic payment before discontinuing and removing the payment token from the contract/account payment method. |
| Auto Pay Retry Hours | Amount of hours that should lapse until retrying failed payments. |
Payment Token
-------------
A valid payment token is required to use this module. These tokens are typically created during the `website_sale` checkout process, but they can also be created manually at the acquirer.
A payment token can be defined in one of two areas:
* Contract - Defining a payment token in the contract will allow for the use of this token for automatic payments on this contract only.
* Partner - Defining a payment token in the partner will allow for the use of this token for automatic payments on all contracts for this partner that do not have a payment token defined.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/110/10.0
Known issues / Roadmap
======================
* None
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/contract/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Dave Lasley <dave@laslabs.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

5
contract_payment_auto/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

27
contract_payment_auto/__manifest__.py

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Contract - Auto Payment",
"summary": "Adds automatic payments to contracts.",
"version": "10.0.1.0.0",
"category": "Contract Management",
"license": "AGPL-3",
"author": "LasLabs, "
"Odoo Community Association (OCA)",
"website": "https://laslabs.com",
"depends": [
"contract",
"payment",
],
"data": [
"data/mail_template_data.xml",
"data/ir_cron_data.xml",
"views/account_analytic_account_view.xml",
"views/account_analytic_contract_view.xml",
"views/res_partner_view.xml",
],
"installable": True,
"application": False,
}

19
contract_payment_auto/data/ir_cron_data.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="1">
<record id="ir_cron_auto_pay" model="ir.cron">
<field name="name">Contract Automatic Payments</field>
<field name="interval_type">hours</field>
<field name="interval_number">1</field>
<field name="model">account.analytic.account</field>
<field name="function">cron_retry_auto_pay</field>
<field name="args">()</field>
</record>
</odoo>

98
contract_payment_auto/data/mail_template_data.xml

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="1">
<record id="mail_template_auto_pay_retry" model="mail.template">
<field name="name">Invoice - AutoPay To Retry</field>
<field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
<field name="subject">Automatic Payment Failure (Ref ${object.number or 'n/a'})</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="account.model_account_invoice"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="account.account_invoices"/>
<field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<p>
Hello ${object.partner_id.name}
% set access_action = object.get_access_action()
% set access_url = access_action['type'] == 'ir.actions.act_url' and access_action['url'] or '/report/pdf/account.report_invoice/' + str(object.id)
% if object.partner_id.parent_id:
(<i>${object.partner_id.parent_id.name}</i>)
% endif
,
</p>
<p>
The automatic payment for your invoice
<a href="${access_url}">
<strong>
${object.number}
</strong>
% if object.origin:
(with reference: ${object.origin} )
% endif
</a>
failed.
</p>
<p>
Please verify that your payment information is correct, and that funds are
available in the account.
</p>
]]>
</field>
</record>
<record id="mail_template_auto_pay_fail" model="mail.template">
<field name="name">Invoice - AutoPay Failed</field>
<field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
<field name="subject">Automatic Payment Failure (Ref ${object.number or 'n/a'})</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="account.model_account_invoice"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="account.account_invoices"/>
<field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<p>
Hello ${object.partner_id.name}
% set access_action = object.get_access_action()
% set access_url = access_action['type'] == 'ir.actions.act_url' and access_action['url'] or '/report/pdf/account.report_invoice/' + str(object.id)
% if object.partner_id.parent_id:
(<i>${object.partner_id.parent_id.name}</i>)
% endif
,
</p>
<p>
The automatic payment for your invoice
<a href="${access_url}">
<strong>
${object.number}
</strong>
% if object.origin:
(with reference: ${object.origin} )
% endif
</a>
failed.
</p>
<p>
Please verify that your payment information is correct, and that funds are
available in the account.
</p>
]]>
</field>
</record>
</odoo>

8
contract_payment_auto/models/__init__.py

@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import account_analytic_account
from . import account_analytic_contract
from . import account_invoice
from . import res_partner

174
contract_payment_auto/models/account_analytic_account.py

@ -0,0 +1,174 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from datetime import datetime, timedelta
from odoo import api, fields, models, _
_logger = logging.getLogger(__name__)
class AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
payment_token_id = fields.Many2one(
string='Payment Token',
comodel_name='payment.token',
domain="[('partner_id', '=', partner_id)]",
context="{'default_partner_id': partner_id}",
help='This is the payment token that will be used to automatically '
'reconcile debts against this account. If none is set, the '
'bill to partner\'s default token will be used.',
)
@api.multi
@api.onchange('partner_id')
def _onchange_partner_id_payment_token(self):
""" Clear the payment token when the partner is changed. """
self.payment_token_id = self.env['payment.token']
@api.model
def cron_retry_auto_pay(self):
""" Retry automatic payments for appropriate invoices. """
invoice_lines = self.env['account.invoice.line'].search([
('invoice_id.state', '=', 'open'),
('invoice_id.auto_pay_attempts', '>', 0),
('account_analytic_id.is_auto_pay', '=', True),
])
now = datetime.now()
for invoice_line in invoice_lines:
account = invoice_line.account_analytic_id
invoice = invoice_line.invoice_id
fail_time = fields.Datetime.from_string(invoice.auto_pay_failed)
retry_delta = timedelta(hours=account.auto_pay_retry_hours)
retry_time = fail_time + retry_delta
if retry_time < now:
account._do_auto_pay(invoice)
@api.multi
def _create_invoice(self):
""" If automatic payment is enabled, perform auto pay actions. """
invoice = super(AccountAnalyticAccount, self)._create_invoice()
if not self.is_auto_pay:
return invoice
self._do_auto_pay(invoice)
return invoice
@api.multi
def _do_auto_pay(self, invoice):
""" Perform all automatic payment operations on open invoices. """
self.ensure_one()
invoice.ensure_one()
invoice.action_invoice_open()
self._send_invoice_message(invoice)
self._pay_invoice(invoice)
@api.multi
def _pay_invoice(self, invoice):
""" Pay the invoice using the account or partner token. """
if invoice.state != 'open':
_logger.info('Cannot pay an invoice that is not in open state.')
return
if not invoice.residual:
_logger.debug('Cannot pay an invoice with no balance.')
return
token = self.payment_token_id or self.partner_id.payment_token_id
if not token:
_logger.debug(
'Cannot pay an invoice without defining a payment token',
)
return
transaction = self.env['payment.transaction'].create(
self._get_tx_vals(invoice),
)
valid_states = ['authorized', 'done']
try:
result = transaction.s2s_do_transaction()
if not result or transaction.state not in valid_states:
_logger.debug(
'Payment transaction failed (%s)',
transaction.state_message,
)
else:
# Success
return True
except Exception:
_logger.exception(
'Payment transaction (%s) generated a gateway error.',
transaction.id,
)
transaction.state = 'error'
invoice.write({
'auto_pay_attempts': invoice.auto_pay_attempts + 1,
'auto_pay_failed': fields.Datetime.now(),
})
if invoice.auto_pay_attempts >= self.auto_pay_retries:
template = self.pay_fail_mail_template_id
self.write({
'is_auto_pay': False,
'payment_token_id': False,
})
if token == self.partner_id.payment_token_id:
self.partner_id.payment_token_id = False
else:
template = self.pay_retry_mail_template_id
if template:
template.send_mail(invoice.id)
return
@api.multi
def _get_tx_vals(self, invoice):
""" Return values for create of payment.transaction for invoice."""
amount_due = invoice.residual
token = self.payment_token_id
partner = token.partner_id
reference = self.env['payment.transaction'].get_next_reference(
invoice.number,
)
return {
'reference': '%s' % reference,
'acquirer_id': token.acquirer_id.id,
'payment_token_id': token.id,
'amount': amount_due,
'state': 'draft',
'currency_id': invoice.currency_id.id,
'partner_id': partner.id,
'partner_country_id': partner.country_id.id,
'partner_city': partner.city,
'partner_zip': partner.zip,
'partner_email': partner.email,
}
@api.multi
def _send_invoice_message(self, invoice):
""" Send the appropriate emails for the invoices if needed. """
if invoice.sent:
return
if not self.invoice_mail_template_id:
return
_logger.info('Sending invoice %s, %s (template %s)',
invoice, invoice.number, self.invoice_mail_template_id)
mail_id = self.invoice_mail_template_id.send_mail(invoice.id)
invoice.with_context(mail_post_autofollow=True)
invoice.sent = True
invoice.message_post(body=_("Invoice sent"))
return self.env['mail.mail'].browse(mail_id)

108
contract_payment_auto/models/account_analytic_contract.py

@ -0,0 +1,108 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
def _context_mail_templates(env):
return env['account.analytic.contract']._context_mail_templates()
class AccountAnalyticContract(models.Model):
_inherit = 'account.analytic.contract'
invoice_mail_template_id = fields.Many2one(
string='Invoice Message',
comodel_name='mail.template',
default=lambda s: s._default_invoice_mail_template_id(),
domain="[('model', '=', 'account.invoice')]",
context=_context_mail_templates,
help="During the automatic payment process, an invoice will be "
"created and validated. If this template is selected, it will "
"automatically be sent to the customer during this process "
"using the defined template.",
)
pay_retry_mail_template_id = fields.Many2one(
string='Payment Retry Message',
comodel_name='mail.template',
default=lambda s: s._default_pay_retry_mail_template_id(),
domain="[('model', '=', 'account.invoice')]",
context=_context_mail_templates,
help="If automatic payment fails for some reason, but will be "
"re-attempted later, this message will be sent to the billed "
"partner.",
)
pay_fail_mail_template_id = fields.Many2one(
string='Payment Failed Message',
comodel_name='mail.template',
default=lambda s: s._default_pay_fail_mail_template_id(),
domain="[('model', '=', 'account.invoice')]",
context=_context_mail_templates,
help="If automatic payment fails for some reason, this message "
"will be sent to the billed partner.",
)
is_auto_pay = fields.Boolean(
string='Auto Pay?',
default=True,
help="Check this to enable automatic payment for invoices that are "
"created for this contract.",
)
auto_pay_retries = fields.Integer(
default=lambda s: s._default_auto_pay_retries(),
help="Amount times to retry failed/declined automatic payment "
"before giving up."
)
auto_pay_retry_hours = fields.Integer(
default=lambda s: s._default_auto_pay_retry_hours(),
help="Amount of hours that should lapse until a failed automatic "
"is retried.",
)
@api.model
def _default_invoice_mail_template_id(self):
return self.env.ref(
'account.email_template_edi_invoice',
raise_if_not_found=False,
)
@api.model
def _default_pay_retry_mail_template_id(self):
return self.env.ref(
'contract_payment_auto.mail_template_auto_pay_retry',
raise_if_not_found=False,
)
@api.model
def _default_pay_fail_mail_template_id(self):
return self.env.ref(
'contract_payment_auto.mail_template_auto_pay_fail',
raise_if_not_found=False,
)
@api.model
def _default_auto_pay_retries(self):
return 3
@api.model
def _default_auto_pay_retry_hours(self):
return 24
@api.model
def _context_mail_templates(self):
""" Return a context for use in mail templates. """
default_model = self.env.ref('account.model_account_invoice')
report_template = self.env.ref('account.account_invoices')
return {
'default_model_id': default_model.id,
'default_email_from': "${(object.user_id.email and '%s <%s>' % "
"(object.user_id.name, object.user_id.email)"
" or '')|safe}",
'default_partner_to': '${object.partner_id.id}',
'default_lang': '${object.partner_id.lang}',
'default_auto_delete': True,
'report_template': report_template.id,
'report_name': "Invoice_${(object.number or '').replace('/','_')}"
"_${object.state == 'draft' and 'draft' or ''}",
}

12
contract_payment_auto/models/account_invoice.py

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
auto_pay_attempts = fields.Integer()
auto_pay_failed = fields.Datetime()

18
contract_payment_auto/models/res_partner.py

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
payment_token_id = fields.Many2one(
string='Payment Token',
comodel_name='payment.token',
domain="[('id', 'in', payment_token_ids)]",
help='This is the payment token that will be used to automatically '
'reconcile debts for this partner, if there is not one already '
'set on the analytic account.',
)

6
contract_payment_auto/tests/__init__.py

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_account_analytic_account
from . import test_account_analytic_contract

303
contract_payment_auto/tests/test_account_analytic_account.py

@ -0,0 +1,303 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import mock
from contextlib import contextmanager
from odoo import fields
from odoo.tools import mute_logger
from odoo.tests.common import TransactionCase
from ..models import account_analytic_account
class TestAccountAnalyticAccount(TransactionCase):
def setUp(self):
super(TestAccountAnalyticAccount, self).setUp()
self.Model = self.env['account.analytic.account']
self.partner = self.env.ref('base.res_partner_2')
self.product = self.env.ref('product.product_product_2')
self.product.taxes_id += self.env['account.tax'].search(
[('type_tax_use', '=', 'sale')], limit=1)
self.product.description_sale = 'Test description sale'
self.template_vals = {
'recurring_rule_type': 'yearly',
'recurring_interval': 12345,
'name': 'Test Contract Template',
'is_auto_pay': True,
}
self.template = self.env['account.analytic.contract'].create(
self.template_vals,
)
self.acquirer = self.env['payment.acquirer'].create({
'name': 'Test Acquirer',
'provider': 'manual',
'view_template_id': self.env['ir.ui.view'].search([], limit=1).id,
})
self.payment_token = self.env['payment.token'].create({
'name': 'Test Token',
'partner_id': self.partner.id,
'active': True,
'acquirer_id': self.acquirer.id,
'acquirer_ref': 'Test',
})
self.contract = self.Model.create({
'name': 'Test Contract',
'partner_id': self.partner.id,
'pricelist_id': self.partner.property_product_pricelist.id,
'recurring_invoices': True,
'date_start': '2016-02-15',
'recurring_next_date': fields.Datetime.now(),
'payment_token_id': self.payment_token.id,
})
self.contract_line = self.env['account.analytic.invoice.line'].create({
'analytic_account_id': self.contract.id,
'product_id': self.product.id,
'name': 'Services from #START# to #END#',
'quantity': 1,
'uom_id': self.product.uom_id.id,
'price_unit': 100,
'discount': 50,
})
def _validate_invoice(self, invoice):
self.assertEqual(len(invoice), 1)
self.assertEqual(invoice._name, 'account.invoice')
def _create_invoice(self, open=False, sent=False):
self.contract.is_auto_pay = False
invoice = self.contract._create_invoice()
if open or sent:
invoice.action_invoice_open()
if sent:
invoice.sent = True
self.contract.is_auto_pay = True
return invoice
@contextmanager
def _mock_transaction(self, state='authorized', s2s_side_effect=None):
Transactions = self.contract.env['payment.transaction']
TransactionsCreate = Transactions.create
if not callable(s2s_side_effect):
s2s_side_effect = [s2s_side_effect]
s2s = mock.MagicMock()
s2s.side_effect = s2s_side_effect
def create(vals):
record = TransactionsCreate(vals)
record.state = state
return record
model_create = mock.MagicMock()
model_create.side_effect = create
Transactions._patch_method('create', model_create)
Transactions._patch_method('s2s_do_transaction', s2s)
try:
yield
finally:
Transactions._revert_method('create')
Transactions._revert_method('s2s_do_transaction')
def test_onchange_partner_id_payment_token(self):
""" It should clear the payment token. """
self.assertTrue(self.contract.payment_token_id)
self.contract._onchange_partner_id_payment_token()
self.assertFalse(self.contract.payment_token_id)
def test_create_invoice_no_autopay(self):
""" It should return the new invoice without calling autopay. """
self.contract.is_auto_pay = False
with mock.patch.object(self.contract, '_do_auto_pay') as method:
invoice = self.contract._create_invoice()
self._validate_invoice(invoice)
method.assert_not_called()
def test_create_invoice_autopay(self):
""" It should return the new invoice after calling autopay. """
with mock.patch.object(self.contract, '_do_auto_pay') as method:
invoice = self.contract._create_invoice()
self._validate_invoice(invoice)
method.assert_called_once_with(invoice)
def test_do_auto_pay_ensure_one(self):
""" It should ensure_one on self. """
with self.assertRaises(ValueError):
self.env['account.analytic.account']._do_auto_pay(
self._create_invoice(),
)
def test_do_auto_pay_invoice_ensure_one(self):
""" It should ensure_one on the invoice. """
with self.assertRaises(ValueError):
self.contract._do_auto_pay(
self.env['account.invoice'],
)
def test_do_auto_pay_open_invoice(self):
""" It should open the invoice. """
invoice = self._create_invoice()
self.contract._do_auto_pay(invoice)
self.assertEqual(invoice.state, 'open')
def test_do_auto_pay_sends_message(self):
""" It should call the send message method with the invoice. """
with mock.patch.object(self.contract, '_send_invoice_message') as m:
invoice = self._create_invoice()
self.contract._do_auto_pay(invoice)
m.assert_called_once_with(invoice)
def test_do_auto_pay_does_pay(self):
""" It should try to pay the invoice. """
with mock.patch.object(self.contract, '_pay_invoice') as m:
invoice = self._create_invoice()
self.contract._do_auto_pay(invoice)
m.assert_called_once_with(invoice)
def test_pay_invoice_not_open(self):
""" It should return None if the invoice isn't open. """
invoice = self._create_invoice()
res = self.contract._pay_invoice(invoice)
self.assertIs(res, None)
def test_pay_invoice_no_residual(self):
""" It should return None if no residual on the invoice. """
invoice = self._create_invoice()
invoice.state = 'open'
res = self.contract._pay_invoice(invoice)
self.assertIs(res, None)
def test_pay_invoice_no_token(self):
""" It should return None if no payment token. """
self.contract.payment_token_id = False
invoice = self._create_invoice(True)
res = self.contract._pay_invoice(invoice)
self.assertIs(res, None)
def test_pay_invoice_success(self):
""" It should return True on success. """
with self._mock_transaction(s2s_side_effect=True):
invoice = self._create_invoice(True)
res = self.contract._pay_invoice(invoice)
self.assertTrue(res)
@mute_logger(account_analytic_account.__name__)
def test_pay_invoice_exception(self):
""" It should catch exceptions. """
with self._mock_transaction(s2s_side_effect=Exception):
invoice = self._create_invoice(True)
res = self.contract._pay_invoice(invoice)
self.assertIs(res, None)
def test_pay_invoice_invalid_state(self):
""" It should return None on invalid state. """
with self._mock_transaction(s2s_side_effect=True):
invoice = self._create_invoice(True)
invoice.state = 'draft'
res = self.contract._pay_invoice(invoice)
self.assertIs(res, None)
@mute_logger(account_analytic_account.__name__)
def test_pay_invoice_increments_retries(self):
""" It should increment invoice retries on failure. """
with self._mock_transaction(s2s_side_effect=False):
invoice = self._create_invoice(True)
self.assertFalse(invoice.auto_pay_attempts)
self.contract._pay_invoice(invoice)
self.assertTrue(invoice.auto_pay_attempts)
def test_pay_invoice_updates_fail_date(self):
""" It should update the invoice auto pay fail date on failure. """
with self._mock_transaction(s2s_side_effect=False):
invoice = self._create_invoice(True)
self.assertFalse(invoice.auto_pay_failed)
self.contract._pay_invoice(invoice)
self.assertTrue(invoice.auto_pay_failed)
def test_pay_invoice_too_many_attempts(self):
""" It should clear autopay after too many attempts. """
with self._mock_transaction(s2s_side_effect=False):
invoice = self._create_invoice(True)
invoice.auto_pay_attempts = self.contract.auto_pay_retries - 1
self.contract._pay_invoice(invoice)
self.assertFalse(self.contract.is_auto_pay)
self.assertFalse(self.contract.payment_token_id)
def test_pay_invoice_too_many_attempts_partner_token(self):
""" It should clear the partner token when attempts were on it. """
self.partner.payment_token_id = self.contract.payment_token_id
with self._mock_transaction(s2s_side_effect=False):
invoice = self._create_invoice(True)
invoice.auto_pay_attempts = self.contract.auto_pay_retries
self.contract._pay_invoice(invoice)
self.assertFalse(self.partner.payment_token_id)
def test_get_tx_vals(self):
""" It should return a dict. """
self.assertIsInstance(
self.contract._get_tx_vals(self._create_invoice()),
dict,
)
def test_send_invoice_message_sent(self):
""" It should return None if the invoice has already been sent. """
invoice = self._create_invoice(sent=True)
res = self.contract._send_invoice_message(invoice)
self.assertIs(res, None)
def test_send_invoice_message_no_template(self):
""" It should return None if the invoice isn't sent. """
invoice = self._create_invoice(True)
self.contract.invoice_mail_template_id = False
res = self.contract._send_invoice_message(invoice)
self.assertIs(res, None)
def test_send_invoice_message_sets_invoice_state(self):
""" It should set the invoice to sent. """
invoice = self._create_invoice(True)
self.assertFalse(invoice.sent)
self.contract._send_invoice_message(invoice)
self.assertTrue(invoice.sent)
def test_send_invoice_message_returns_mail(self):
""" It should create and return the message. """
invoice = self._create_invoice(True)
res = self.contract._send_invoice_message(invoice)
self.assertEqual(res._name, 'mail.mail')
def test_cron_retry_auto_pay_needed(self):
""" It should auto-pay the correct invoice if needed. """
invoice = self._create_invoice(True)
invoice.write({
'auto_pay_attempts': 1,
'auto_pay_failed': '2015-01-01 00:00:00',
})
meth = mock.MagicMock()
self.contract._patch_method('_do_auto_pay', meth)
try:
self.contract.cron_retry_auto_pay()
finally:
self.contract._revert_method('_do_auto_pay')
meth.assert_called_once_with(invoice)
def test_cron_retry_auto_pay_skip(self):
""" It should skip invoices that don't need to be paid. """
invoice = self._create_invoice(True)
invoice.write({
'auto_pay_attempts': 1,
'auto_pay_failed': fields.Datetime.now(),
})
meth = mock.MagicMock()
self.contract._patch_method('_do_auto_pay', meth)
try:
self.contract.cron_retry_auto_pay()
finally:
self.contract._revert_method('_do_auto_pay')
meth.assert_not_called()

51
contract_payment_auto/tests/test_account_analytic_contract.py

@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestAccountAnalyticContract(TransactionCase):
def setUp(self):
super(TestAccountAnalyticContract, self).setUp()
self.Model = self.env['account.analytic.contract']
def test_default_invoice_mail_template_id(self):
""" It should return a mail template associated with invoice. """
res = self.Model._default_invoice_mail_template_id()
self.assertEqual(
res.model, 'account.invoice',
)
def test_default_pay_retry_mail_template_id(self):
""" It should return a mail template associated with invoice. """
res = self.Model._default_pay_retry_mail_template_id()
self.assertEqual(
res.model, 'account.invoice',
)
def test_default_pay_fail_mail_template_id(self):
""" It should return a mail template associated with invoice. """
res = self.Model._default_pay_fail_mail_template_id()
self.assertEqual(
res.model, 'account.invoice',
)
def test_default_auto_pay_retries(self):
""" It should return an int. """
self.assertIsInstance(
self.Model._default_auto_pay_retries(), int,
)
def test_default_auto_pay_retry_hours(self):
""" It should return an int. """
self.assertIsInstance(
self.Model._default_auto_pay_retry_hours(), int,
)
def test_context_mail_templates(self):
""" It should return a dict. """
self.assertIsInstance(
self.Model._context_mail_templates(), dict,
)

44
contract_payment_auto/views/account_analytic_account_view.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="account_analytic_account_recurring_form_form" model="ir.ui.view">
<field name="name">Contract Auto Pay</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='contract.act_recurring_invoices']" position="after">
<br attrs="{'invisible': [('recurring_invoices','!=',True)]}" />
<field name="is_auto_pay"
class="oe_inline"
attrs="{'invisible': [('recurring_invoices','!=',True)]}"
/>
<label for="is_auto_pay"
attrs="{'invisible': [('recurring_invoices','!=',True)]}"
/>
</xpath>
<xpath expr="//label[@for='recurring_invoice_line_ids']" position="before">
<group name="group_auto_pay"
attrs="{'invisible': [('is_auto_pay', '=', False)]}"
>
<group>
<field name="payment_token_id" />
<field name="invoice_mail_template_id" />
<field name="pay_retry_mail_template_id" />
</group>
<group>
<field name="pay_fail_mail_template_id" />
<field name="auto_pay_retries" />
<field name="auto_pay_retry_hours" />
</group>
</group>
</xpath>
</field>
</record>
</odoo>

36
contract_payment_auto/views/account_analytic_contract_view.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="account_analytic_contract_view_form" model="ir.ui.view">
<field name="name">Contract Template Auto Pay</field>
<field name="model">account.analytic.contract</field>
<field name="inherit_id" ref="contract.account_analytic_contract_view_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='group_main_right']" position="inside">
<field name="is_auto_pay" />
</xpath>
<xpath expr="//group[@name='group_main']" position="after">
<group name="group_auto_pay"
attrs="{'invisible': [('is_auto_pay', '=', False)]}"
>
<group>
<field name="invoice_mail_template_id" />
<field name="pay_retry_mail_template_id" />
<field name="auto_pay_retry_hours" />
</group>
<group>
<field name="pay_fail_mail_template_id" />
<field name="auto_pay_retries" />
</group>
</group>
</xpath>
</field>
</record>
</odoo>

22
contract_payment_auto/views/res_partner_view.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">Res Partner Auto Pay</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='sale']" position="inside">
<field name="payment_token_ids" invisible="1" />
<field name="payment_token_id" />
</xpath>
</field>
</record>
</odoo>

69
contract_payment_mode/README.rst

@ -0,0 +1,69 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=====================
Contract Payment Mode
=====================
This module allows to set a payment mode on contract for creating the invoices
with this payment mode.
Configuration
=============
Your user should be a Sales Manager or Accountant.
Usage
=====
#. Go to *Accounting > Sales > Contracts*.
#. Create one.
#. Select a partner to which invoice.
#. If the partner has a payment mode, this payment mode is selected here.
#. If not, or if you want another payment mode, you can change it in the
corresponding field.
#. Click on **Generate recurring invoices automatically** checkbox.
#. Add a product to invoice.
#. If you create an invoice, new invoice will have the selected payment mode.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/110/10.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Ángel Moya <angel.moya@domatix.com>
* Antonio Espinosa <antonioea@antiun.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
* David Vidal <david.vidal@tecnativa.com>
* Carlos Dauden <carlos.dauden@tecnativa.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

5
contract_payment_mode/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
from .hooks import post_init_hook

29
contract_payment_mode/__manifest__.py

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Domatix (<www.domatix.com>)
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2017 Tecnativa - Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Contract Payment Mode',
'summary': 'Payment mode in contracts and their invoices',
'version': '10.0.1.0.1',
'author': 'Domatix, '
'Tecnativa, '
'Odoo Community Association (OCA)',
'website': 'http://www.domatix.com',
'depends': [
'contract',
'account_payment_partner'
],
'category': 'Sales Management',
'license': 'AGPL-3',
'data': [
'views/contract_view.xml',
],
'post_init_hook': 'post_init_hook',
'installable': True,
'auto_install': True,
}

26
contract_payment_mode/hooks.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, SUPERUSER_ID
import logging
_logger = logging.getLogger(__name__)
def post_init_hook(cr, registry):
"""Copy payment mode from partner to the new field at contract."""
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
m_contract = env['account.analytic.account']
contracts = m_contract.search([
('payment_mode_id', '=', False),
])
if contracts:
_logger.info('Setting payment mode: %d contracts' %
len(contracts))
for contract in contracts:
payment_mode = contract.partner_id.customer_payment_mode_id
if payment_mode:
contract.payment_mode_id = payment_mode.id
_logger.info('Setting payment mode: Done')

30
contract_payment_mode/i18n/ca.po

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Compte analític"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Forma de pagament "

29
contract_payment_mode/i18n/de.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Kostenstelle"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Zahlweise"

28
contract_payment_mode/i18n/el_GR.po

@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: contract (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-07 03:42+0000\n"
"PO-Revision-Date: 2015-11-07 12:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-contract-8-0/language/el_GR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: el_GR\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Αναλυτικός Λογαριασμός"
#. module: contract_payment_mode
#: field:account.analytic.account,payment_mode_id:0
msgid "Payment Mode"
msgstr ""

29
contract_payment_mode/i18n/es.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Cuenta analítica"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Modo de pago"

28
contract_payment_mode/i18n/es_MX.po

@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: contract (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-03 01:11+0000\n"
"PO-Revision-Date: 2015-11-07 12:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (Mexico) (http://www.transifex.com/oca/OCA-contract-8-0/language/es_MX/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es_MX\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Cuenta analítica"
#. module: contract_payment_mode
#: field:account.analytic.account,payment_mode_id:0
msgid "Payment Mode"
msgstr ""

29
contract_payment_mode/i18n/fi.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fi\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analyyttinen tili"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Maksutapa"

29
contract_payment_mode/i18n/fr.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Compte analytique"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Mode de paiement"

30
contract_payment_mode/i18n/gl.po

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# César Castro Cruz <ulmroan@gmail.com>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: gl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Conta analítica"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Modo de pagamento"

29
contract_payment_mode/i18n/hi_IN.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# Ashish Deshmukh <ashish.p.deshmukh@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-17 01:05+0000\n"
"PO-Revision-Date: 2017-08-17 01:05+0000\n"
"Last-Translator: Ashish Deshmukh <ashish.p.deshmukh@gmail.com>, 2017\n"
"Language-Team: Hindi (India) (https://www.transifex.com/oca/teams/23907/hi_IN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hi_IN\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "विश्लेषणात्मक खाता"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "भुगतान का प्रकार"

29
contract_payment_mode/i18n/hr.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# Bole <bole@dajmi5.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analitički konto"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr ""

30
contract_payment_mode/i18n/hr_HR.po

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Bole <bole@dajmi5.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-17 01:39+0000\n"
"PO-Revision-Date: 2017-06-17 01:39+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr_HR\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Konto analitike"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Način plaćanja"

29
contract_payment_mode/i18n/hu.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analitikus gyűjtőkód könyvelés"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr ""

30
contract_payment_mode/i18n/it.po

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# Nicola Malcontenti <nicola.malcontenti@gmail.com>, 2017
# Stefano <stefano.sforzi@agilebg.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: Stefano <stefano.sforzi@agilebg.com>, 2017\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Conto Analitico"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Modo di pagamento"

30
contract_payment_mode/i18n/nl.po

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Erwin van der Ploeg <erwin@odooexperts.nl>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: Erwin van der Ploeg <erwin@odooexperts.nl>, 2017\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Kostenplaats"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Betaalmode"

30
contract_payment_mode/i18n/pt.po

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Pedro Castro Silva <pedrocs@sossia.pt>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-15 01:24+0000\n"
"PO-Revision-Date: 2017-07-15 01:24+0000\n"
"Last-Translator: Pedro Castro Silva <pedrocs@sossia.pt>, 2017\n"
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Conta Analítica"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Modo de Pagamento"

29
contract_payment_mode/i18n/pt_BR.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Conta Analítica"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Modo de pagamento"

29
contract_payment_mode/i18n/pt_PT.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# Daniel Reis <dreis.pt@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: Daniel Reis <dreis.pt@gmail.com>, 2017\n"
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Conta Analítica"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr ""

29
contract_payment_mode/i18n/ro.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ro\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Cont analitic"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr ""

28
contract_payment_mode/i18n/sk_SK.po

@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: contract (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-21 10:53+0000\n"
"PO-Revision-Date: 2015-11-07 12:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: Slovak (Slovakia) (http://www.transifex.com/oca/OCA-contract-8-0/language/sk_SK/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sk_SK\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analytický účet"
#. module: contract_payment_mode
#: field:account.analytic.account,payment_mode_id:0
msgid "Payment Mode"
msgstr ""

29
contract_payment_mode/i18n/sl.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analitični konto"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "Način plačila"

29
contract_payment_mode/i18n/tr.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# Ediz Duman <neps1192@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n"
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analitik Hesap"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr ""

29
contract_payment_mode/i18n/tr_TR.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# Ediz Duman <neps1192@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-13 02:40+0000\n"
"PO-Revision-Date: 2017-06-13 02:40+0000\n"
"Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n"
"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: tr_TR\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analitik Hesap"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr ""

29
contract_payment_mode/i18n/zh_CN.po

@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# ITGeeker <alanljj@qq.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-01 02:46+0000\n"
"PO-Revision-Date: 2017-04-01 02:46+0000\n"
"Last-Translator: ITGeeker <alanljj@qq.com>, 2017\n"
"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_account_analytic_account
msgid "Analytic Account"
msgstr "核算科目"
#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_account_analytic_account_payment_mode_id
msgid "Payment Mode"
msgstr "支付方式"

2
contract_payment_mode/models/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import contract

27
contract_payment_mode/models/contract.py

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
class AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
payment_mode_id = fields.Many2one(
comodel_name='account.payment.mode',
string='Payment Mode',
domain=[('payment_type', '=', 'inbound')],
)
@api.onchange('partner_id')
def on_change_partner_id(self):
if self.partner_id.customer_payment_mode_id:
self.payment_mode_id = self.partner_id.customer_payment_mode_id.id
@api.multi
def _prepare_invoice(self):
invoice_vals = super(AccountAnalyticAccount, self)._prepare_invoice()
if self.payment_mode_id:
invoice_vals['payment_mode_id'] = self.payment_mode_id.id
invoice = self.env['account.invoice'].new(invoice_vals)
invoice.payment_mode_id_change()
invoice_vals = invoice._convert_to_write(invoice._cache)
return invoice_vals

5
contract_payment_mode/tests/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_contract_payment

90
contract_payment_mode/tests/test_contract_payment.py

@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
from ..hooks import post_init_hook
class TestContractPaymentInit(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestContractPaymentInit, cls).setUpClass()
cls.payment_method = cls.env['account.payment.method'].create({
'name': 'Test Payment Method',
'code': 'Test',
'payment_type': 'inbound',
})
cls.payment_mode = cls.env['account.payment.mode'].create({
'name': 'Test payment mode',
'active': True,
'payment_method_id': cls.payment_method.id,
'bank_account_link': 'variable',
})
cls.partner = cls.env['res.partner'].create({
'name': 'Test contract partner',
'customer_payment_mode_id': cls.payment_mode,
})
cls.product = cls.env['product.product'].create({
'name': 'Custom Service',
'type': 'service',
'uom_id': cls.env.ref('product.product_uom_hour').id,
'uom_po_id': cls.env.ref('product.product_uom_hour').id,
'sale_ok': True,
})
cls.contract = cls.env['account.analytic.account'].create({
'name': 'Maintenance of Servers',
})
company = cls.env.ref('base.main_company')
cls.journal = cls.env['account.journal'].create({
'name': 'Sale Journal - Test',
'code': 'HRTSJ',
'type': 'sale',
'company_id': company.id})
def test_post_init_hook(self):
contract = self.env['account.analytic.account'].create({
'name': 'Test contract',
'partner_id': self.partner.id,
'payment_mode_id': self.payment_mode.id,
})
self.assertEqual(contract.payment_mode_id,
self.payment_mode)
contract.payment_mode_id = False
self.assertEqual(contract.payment_mode_id.id, False)
post_init_hook(self.cr, self.env)
self.assertEqual(contract.payment_mode_id,
self.payment_mode)
def test_contract_and_invoices(self):
self.contract.write({'partner_id': self.partner.id})
self.contract.on_change_partner_id()
self.assertEqual(self.contract.payment_mode_id,
self.contract.partner_id.customer_payment_mode_id)
self.contract.write({
'recurring_invoices': True,
'recurring_interval': 1,
'recurring_invoice_line_ids': [(0, 0, {
'quantity': 2.0,
'price_unit': 200.0,
'name': 'Database Administration 25',
'product_id': self.product.id,
'uom_id': self.product.uom_id.id,
})]
})
self.contract.recurring_create_invoice()
new_invoice = self.env['account.invoice'].search([
('contract_id', '=', self.contract.id)
])
self.assertEqual(new_invoice.partner_id, self.contract.partner_id)
self.assertEqual(new_invoice.payment_mode_id,
self.contract.payment_mode_id)
self.assertEqual(len(new_invoice.ids), 1)
self.contract.recurring_create_invoice()
self.assertEqual(self.contract.payment_mode_id,
new_invoice.payment_mode_id)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save