cubells
8 years ago
committed by
mostafaala2
10 changed files with 101 additions and 113 deletions
-
16base_partner_sequence/README.rst
-
7base_partner_sequence/__init__.py
-
38base_partner_sequence/__openerp__.py
-
26base_partner_sequence/data/partner_sequence.xml
-
21base_partner_sequence/i18n/base_partner_sequence.pot
-
5base_partner_sequence/models/__init__.py
-
42base_partner_sequence/models/partner.py
-
5base_partner_sequence/tests/__init__.py
-
28base_partner_sequence/tests/test_base_partner_sequence.py
-
26base_partner_sequence/views/partner_view.xml
@ -1,3 +1,8 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>). |
||||
|
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>). |
||||
|
# Copyright 2016 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
from . import models |
from . import models |
||||
from . import tests |
from . import tests |
@ -1,38 +1,26 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# OpenERP, Open Source Management Solution |
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). |
|
||||
# Copyright (C) 2013 initOS GmbH & Co. KG (<http://www.initos.com>). |
|
||||
# Author Thomas Rehn <thomas.rehn at initos.com> |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# This program is distributed in the hope that it will be useful, |
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
# GNU Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>). |
||||
|
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>). |
||||
|
# Copyright 2016 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
{ |
{ |
||||
"name": "Add a sequence on customers' code", |
"name": "Add a sequence on customers' code", |
||||
"version": "8.0.1.1.1", |
|
||||
|
"version": "9.0.0.1.0", |
||||
"author": "Tiny/initOS GmbH & Co. KG," |
"author": "Tiny/initOS GmbH & Co. KG," |
||||
"ACSONE SA/NV," |
"ACSONE SA/NV," |
||||
|
"Tecnativa, " |
||||
"Odoo Community Association (OCA)", |
"Odoo Community Association (OCA)", |
||||
"category": "Generic Modules/Base", |
"category": "Generic Modules/Base", |
||||
"website": "http://www.initos.com", |
"website": "http://www.initos.com", |
||||
|
"depends": [ |
||||
|
'base', |
||||
|
], |
||||
"summary": "Sets customer's code from a sequence", |
"summary": "Sets customer's code from a sequence", |
||||
"data": [ |
"data": [ |
||||
'data/partner_sequence.xml', |
'data/partner_sequence.xml', |
||||
'views/partner_view.xml', |
'views/partner_view.xml', |
||||
], |
], |
||||
"active": False, |
|
||||
"installable": True |
|
||||
|
"installable": True, |
||||
|
"license": "AGPL-3", |
||||
} |
} |
@ -1,21 +1,11 @@ |
|||||
<?xml version="1.0"?> |
<?xml version="1.0"?> |
||||
<openerp> |
|
||||
<data noupdate="1"> |
|
||||
|
<odoo noupdate="1"> |
||||
|
|
||||
# |
|
||||
# Sequences for res.partner |
|
||||
# |
|
||||
|
<record model="ir.sequence" id="seq_res_partner"> |
||||
|
<field name="name">Partner code</field> |
||||
|
<field name="code">res.partner</field> |
||||
|
<field name="prefix">P/</field> |
||||
|
<field name="padding">5</field> |
||||
|
</record> |
||||
|
|
||||
<record model="ir.sequence.type" id="seq_type_res_partner"> |
|
||||
<field name="name">Partner code</field> |
|
||||
<field name="code">res.partner</field> |
|
||||
</record> |
|
||||
<record model="ir.sequence" id="seq_res_partner"> |
|
||||
<field name="name">Partner code</field> |
|
||||
<field name="code">res.partner</field> |
|
||||
<field name="prefix">P/</field> |
|
||||
<field name="padding">5</field> |
|
||||
</record> |
|
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</odoo> |
@ -1,21 +0,0 @@ |
|||||
# Translation of OpenERP Server. |
|
||||
# This file contains the translation of the following modules: |
|
||||
# |
|
||||
msgid "" |
|
||||
msgstr "" |
|
||||
"Project-Id-Version: OpenERP Server 7.0-20131013-231025\n" |
|
||||
"Report-Msgid-Bugs-To: \n" |
|
||||
"POT-Creation-Date: 2013-11-13 13:47+0000\n" |
|
||||
"PO-Revision-Date: 2013-11-13 13:47+0000\n" |
|
||||
"Last-Translator: <>\n" |
|
||||
"Language-Team: \n" |
|
||||
"MIME-Version: 1.0\n" |
|
||||
"Content-Type: text/plain; charset=UTF-8\n" |
|
||||
"Content-Transfer-Encoding: \n" |
|
||||
"Plural-Forms: \n" |
|
||||
|
|
||||
#. module: base_partner_sequence |
|
||||
#: model:ir.model,name:base_partner_sequence.model_res_partner |
|
||||
msgid "Partner" |
|
||||
msgstr "" |
|
||||
|
|
@ -1,2 +1,7 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>). |
||||
|
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>). |
||||
|
# Copyright 2016 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
from . import partner |
from . import partner |
@ -1,2 +1,7 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>). |
||||
|
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>). |
||||
|
# Copyright 2016 Tecnativa - Vicent Cubells |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
from . import test_base_partner_sequence |
from . import test_base_partner_sequence |
@ -1,20 +1,16 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
|
<odoo> |
||||
|
|
||||
<record id="view_partner_form" model="ir.ui.view"> |
|
||||
<field name="name">Make partner reference readonly when non-commercial</field> |
|
||||
<field name="model">res.partner</field> |
|
||||
<field name="inherit_id" ref="base.view_partner_form"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<field name="ref" position="attributes"> |
|
||||
<attribute name="attrs">{ |
|
||||
'readonly': [('is_company', '=', False), |
|
||||
('parent_id', '!=', False)]}</attribute> |
|
||||
</field> |
|
||||
|
<record id="view_partner_form" model="ir.ui.view"> |
||||
|
<field name="name">Make partner reference readonly when non-commercial</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="ref" position="attributes"> |
||||
|
<attribute name="attrs">{'readonly': [('is_company', '=', False), ('parent_id', '!=', False)]}</attribute> |
||||
</field> |
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
</record> |
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</odoo> |
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue