前言

阅读(664) 最后更新: 2019年3月22日 04:32

上一页 Odoo 12 Development Essentials 中文版 | 第一章:使用Odoo开发者模式快速入门 下一页

翻译进度 100%

自助翻译

Odoo是一个功能齐全的开放源码平台,用于构建应用程序,基于这个核心框架,构建了一套集成应用程序,涵盖了从客户关系管理(CRM)、销售到股票和会计等所有业务领域。
Odoo is a fully-featured open source platform for building applications.Based on this core framework, a suite of integrated applications was built, covering all business areas from CRM and sales to stocks and accounting.
除了这些即插即用的特性之外,Odoo的框架是在思想上具有可扩展性的基础上构建的,修改可以作为扩展模块来实现,可以作为正在更改的现有模块之上的一个层来应用,而不需要实际更改原始代码。
Beyond these out-of-the-box features, Odoo's framework was built with extensibility in mind.Modifications can be implemented as extension modules, to be applied as a layer on top on the existing modules being changed, without actually changing the original code.
这提供了一个干净和易于控制的定制方法。
This provides a clean and easy-to-control customization approach.
这种将多个模块组合成功能丰富的应用程序的能力,以及odoo的开源特性,可能是Odoo周围社区发展的重要因素,实际上,Odoo拥有数千个社区模块,涵盖了几乎所有的主题,而且参与的人数每年都在稳步增长。
This capability to combine several modules into feature-rich applications, along with the open source nature of Odoo, are probably important factors in the growth of the community around Odoo.In fact, there are thousands of community modules available for Odoo covering virtually every topic, and the number of people getting involved has been steadily growing every year.
OdoO 12开发要点为Odoo开发提供了一个逐步的指南,允许读者快速爬升学习曲线,并在Odoo应用程序平台上变得富有成效。同时,它试图提供良好的参考资料,每次您与Odoo一起工作时,都要保持在身边。
Odoo 12 Development Essentials provides a step-by-step guide to Odoo development, allowing readers to quickly climb the learning curve and become productive in the Odoo application platform.At the same time, it tries to provide good reference materials, to be kept close to hand every time you are working with Odoo.
#这本书是谁的?
##who-this-book-is-for
熟悉Odoo的有经验的开发人员也应该从这本书中受益,它不仅使他们能够巩固他们的知识,而且还提供了一个简单的方法来更新OdoO 12.0所改变的所有细节。事实上,特别注意的是,自8.0以来,不同Odoo版本之间的所有相关更改都得到了特别的注意。
Experienced developers who are already familiar with Odoo should also benefit from this book.Not only does it allow them to consolidate their knowledge, but it also provides an easy way to get up to date with all the details that changed with Odoo 12.0.In fact, special care was taken to highlight all the relevant changes between the different Odoo versions since 8.0.
最后,这本书应该提供一个可靠的参考资料,供新手和有经验的开发人员使用。对于同时使用不同Odoo版本的开发人员或正在将模块移植到其他版本的开发人员来说,有关几个Odoo版本之间相关差异的文档也应该是一个很好的资源。
Finally, this book should provide a solid reference to be used daily, both by newcomers and experienced developers.The documentation of the relevant differences between the several Odoo versions should also be a good resource for any developer working with different Odoo versions at the same time or who is porting modules to other versions.
这本书包含14章,分为五个部分:导言、模型、业务逻辑、视图和部署。
This books contains 14 chapters, organized into five parts: introduction, models, business logic, views, and deployment.
第二章“开发环境的准备”,介绍了如何从源代码中安装Odoo,以及如何设置整个书中使用的开发环境,我们选择在Ubuntu环境中安装Odoo,在Windows 10环境下,我们可以使用Windows Subsystem for Linux(WSL)来实现这一点。
Chapter 2, Preparing the Development Environment, explains how to install Odoo from source code and how to set up the development environment to be used throughout the book.We choose to install Odoo in an Ubuntu environment, and, with Windows 10, we can use the Windows Subsystem for Linux (WSL) to achieve this.
第三章,您的第一个odoo应用程序,提供了关于创建我们的第一个odoo模块的一步的指南,这是一个库应用程序的图书目录,虽然示例很简单,但它涵盖了Odoo应用程序中可能涉及的所有不同层和组件:模型、业务逻辑、后端视图和Web前端视图。
Chapter 3, Your First Odoo Application, provides a step-by-step guide to the creation of our first Odoo module, a book catalog for a Library app.While the example is simple, it covers all the different layers and components that can be involved in an Odoo application: models, business logic, backend views, and web frontend views.
第4章,扩展模块,解释了可用的继承机制,以及如何使用它们来创建扩展模块,添加或修改其他现有附加模块的特性。
Chapter 4, Extending Modules, explains the available inheritance mechanisms and how to use them to create extension modules, adding or modifying features from other existing add-on modules.
本书的第二部分介绍了负责构建应用程序所围绕的数据模型结构的模型:第五章,导入、导出和模块数据,讨论了Odoo中数据文件的使用及其在模块中的作用,以将数据和配置加载到数据库。它涵盖了XML和CSV数据文件格式,这是外部标识符的概念,如何在模块中使用数据文件,以及数据导入/导出操作。
The second part of the book introduces the models responsible for the data model structures around which the application is built: Chapter 5, Import, Export, and Module Data, addresses the usage of data files in Odoo and their role in modules to load data and configurations to the database.It covers the XML and CSV data file formats, the external identifier concept, how to use data file in modules, and data import/export operations.
第6章,应用程序数据的结构,详细讨论了模型层,介绍了框架的对象-关系映射(ORM)、可用模型的不同类型以及字段类型,包括关系字段和计算字段。
Chapter 6, Models – Structuring the Application Data, discusses the model layer in detail, introducing the framework's Object-Relational Mapping (ORM), the different types of models available, and the field types, including relational and computed fields.
在第三部分中,我们将解释如何在模型(体系结构的控制器组件)之上编写业务逻辑层,其中包括用于操纵模型中数据的内置ORM函数,以及用于消息和通知的社会特性:第7章,记录集-使用模型数据,介绍了ORM的概念和特性,如何查询和准备从模型读取数据,如何操作记录集,以及如何在模型数据上写入更改。
In the third part, we explain how to write the business logic layer on top of the models—the controller component of the architecture.This includes the built-in ORM functions, used to manipulate the data in the models, and social features used for messages and notifications: Chapter 7, Recordsets – Working with Model Data, introduces the concepts and features of ORMs, how to query and ready to read data from models, how to manipulate recordsets, and how to write changes on model data.
第8章,业务逻辑-支持业务流程,探讨在服务器端编程业务逻辑以操作数据和实现特定的业务规则,还解释了如何使用向导进行更复杂的用户交互,并讨论了内置的社交功能、消息、聊天、追随者和通道,以及测试和调试技术。
Chapter 8, Business Logic – Supporting Business Processes, explores programming business logic on the server side to manipulate data and implement specific business rules.It also explains how to use wizards for more sophisticated user interaction.The built-in social features, messages, chatter, followers, and channels, are addressed, as well as testing and debugging techniques.
第9章,外部API与其他系统的集成,展示了如何通过实现与我们的Odoo服务器交互的命令行客户机来实现外部Odoo应用程序。
Chapter 9, External API – Integrating with Other Systems, shows how to implement external Odoo applications by implementing a command-line client that interacts with our Odoo server.There are several alternative client programming libraries available, which are introduced and used to implement our showcase client utility.
第四部分探讨了视图层和几种可用于用户界面的技术:第10章,后端视图-设计用户界面,涵盖Web客户端的视图层,详细解释了几种视图类型以及所有可用于创建动态和直观的用户界面的元素。
The fourth part explores the view layer and the several technologies that can be used for the user interface: Chapter 10, Backend Views – Design the User Interface, covers the web client's view layer, explaining the several types of views in detail and all the elements that can be used to create dynamic and intuitive user interfaces.
第11章,看板视图和客户端QWeb,继续与Web客户端一起工作,但介绍了看板视图,并解释了用于设计看板元素的QWeb模板。
Chapter 11, Kanban Views and Client-Side QWeb, keeps working with the web client, but introduces Kanban views and explains the QWeb templates used to design the Kanban board elements.
第12章,报表和服务器端QWeb,讨论了使用基于QWeb的报表引擎和生成对打印机友好的PDF报表所需的一切。
Chapter 12, Reports and Server-Side QWeb, discusses using the QWeb-based report engine and everything needed to generate printer-friendly PDF reports.
第13章,创建网站前端特性,介绍Odoo网站的开发,包括Web控制器的实现和使用QWeb模板来构建前端网页。
Chapter 13, Creating Website Frontend Features, introduces Odoo website development, including web controller implementations and using QWeb templates to build frontend web pages.
在这本书的末尾,读者应该对Odoo应用程序开发周期所涉及的所有步骤和组件有一个扎实的了解,从绘图板到这些应用程序的生产、部署和维护。
By the end of the book, the reader should have a solid understanding of all the steps and components involved in the Odoo application development cycle, from the drawing board to the production, deployment, and maintenance of these applications.
Odoo是使用Python编程语言构建的,所以很好地了解它,我们还选择在Ubuntu主机上运行Odoo,并在命令行上做一些工作,因此熟悉Odoo会有所帮助。
Odoo is built using the Python programming language, so it is a good idea to have a good knowledge of it.We also choose to run Odoo in an Ubuntu host, and will do some work on the command line, so it will help to be familiar with it.
为了充分利用这本书,我们建议您对Python编程语言、Ubuntu/Debian Linux操作系统和PostgreSQL数据库进行一些补充性的阅读。
To get the most out of this book, we recommend that you do some complementary reading on the Python programming language, the Ubuntu/Debian Linux operating system, and the PostgreSQL database.
虽然我们将在Ubuntu主机(一种流行的云托管选项)中运行Odoo,但我们将提供有关如何使用Windows for Linux子系统(WSL)在Windows系统中设置我们的开发环境的指导,该系统在最近的Windows 10版本中可用。当然,使用Ubuntu/Debian本机系统也是一个不错的选择。
While we will run Odoo in an Ubuntu host (a popular cloud hosting option), we will provide guidance on how to set up our development environment in a Windows system using the Windows for Linux Subsystem (WSL), available in recent Windows 10 builds.Of course, working from an Ubuntu/Debian native system is also a good choice.
所有所需的软件都是免费提供的,并将给出在哪里找到它的说明。
All the required software is freely available, and the instructions on where to find it will be given.
您可以从您的帐户下载这本书的示例代码文件,网址是www.Packt.com.如果您在别处购买了这本书,您可以访问www.Packt.com/Support并注册,以便将这些文件直接通过电子邮件发送给您。
You can download the example code files for this book from your account at www.packt.com.If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
您可以通过以下步骤下载代码文件:登录或注册www.Packt.com.1。
You can download the code files by following these steps: Log in or register at www.packt.com.1.
选择支持表2。
Select the SUPPORT tab.2.
点击代码下载&Errata.3。
Click on Code Downloads & Errata.3.
在“搜索”框中输入书名,然后按照“屏幕4”操作。
Enter the name of the book in the Search box and follow the onscreen4.
指示。
instructions.
一旦文件被下载,请确保使用以下最新版本解压缩或解压缩文件夹:WinRar/7-Zip for Windows Zipeg/iZip/UnRarX for Mac 7-Zip/PeaZip for Linux这本书的代码包也托管在GitHub上:https:/github.com/PacktPublission/Odoo-12-Development-Ess-Four-Editio n。我们也有其他的代码包,从我们丰富的图书和视频目录,可在https://github.com/PacktPublishing/.Check推出!
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of: WinRAR/7-Zip for Windows Zipeg/iZip/UnRarX for Mac 7-Zip/PeaZip for Linux The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Odoo-12-Development-Essentials-Fourth-Editio n. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/.Check them out!
我们还提供了一个PDF文件,其中包含本书中使用的屏幕截图/图表的彩色图像,您可以在这里下载它:https://www.packtpub.com/sites/default/files/下载/9781789532470_ColeImages.pdf。
We also provide a PDF file that has color images of the screenshots/diagrams used in this book.You can download it here: https://www.packtpub.com/sites/default/files/ downloads/9781789532470_ColorImages.pdf.
在这本书中使用了许多文本约定。
There are a number of text conventions used throughout this book.
小贴士和花招似乎是这样的。
Tips and tricks appear like this.
欢迎读者反馈。
Feedback from our readers is always welcome.
一般反馈:发电子邮件给customercare@Packtpub.com,并在你的留言中提到书名。如果你对这本书的任何方面有疑问,请发电子邮件给我们:customercare@pactpub.com。
General feedback: Email customercare@packtpub.com and mention the book title in the subject of your message.If you have questions about any aspect of this book, please email us at customercare@packtpub.com.
尽管我们已经尽力确保内容的准确性,但错误确实会发生。如果你在这本书中发现了错误,我们将非常感谢你向我们报告。请访问www.Packt.com/Submit-errata,选择您的书,点击Errata提交表单链接,并输入详细信息。
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen.If you have found a mistake in this book, we would be grateful if you would report this to us.Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
盗版:如果您在互联网上遇到我们作品的任何非法拷贝,如果您能提供我们的位置、地址或网站名称,我们将不胜感激。
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name.
请与我们联系,在版权@Packt.com获得该材料的链接。
Please contact us at copyright@packt.com with a link to the material.
如果你有兴趣成为一名作家:如果有一个你有专长的话题,并且你有兴趣写一本书或为一本书做贡献,请访问Authors.Packt.com。
If you are interested in becoming an author: If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit authors.packt.com.
请留下评论。一旦你阅读和使用了这本书,为什么不在你购买这本书的网站上留下评论呢?潜在的读者可以看到并使用你的不偏不倚的观点来做出购买决定,我们在Packt可以理解你对我们的产品的看法,我们的作者可以在他们的书上看到你的反馈。谢谢!关于Packt的更多信息,请访问Packt.com。
Please leave a review.Once you have read and used this book, why not leave a review on the site that you purchased it from?Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book.Thank you!For more information about Packt, please visit packt.com.
#下载-示例-代码-文件
###download-the-example-code-files
#这本书中最受欢迎的#
##to-get-the-most-out-of-this-book
#下载-彩色-图片
###download-the-color-images
#惯例-使用
###conventions-used
最后,第五部分介绍了部署和维护实践。在为生产使用部署时,需要考虑一些与开发环境无关的特殊事项:第14章(部署和维护生产实例)向我们展示了如何为生产使用准备服务器,解释了应该处理哪些配置,以及如何配置Nginx反向代理,以提高安全性和可伸缩性。
Finally, the fifth part covers deployment and maintenance practices.Some special considerations, not relevant to development environments, need to be taken into account when deploying for production use: Chapter 14, Deploying and Maintaining Production Instances, shows us how to prepare a server for production use, explaining what configuration should be taken care of and how to configure an NGINX reverse proxy for improved security and scalability.
这本书是为编程知识最少但有很强学习意愿的开发人员编写的。我们经常使用Python语言,解释如何在Ubuntu/Debian系统中运行Odoo,但以前对它们了解很少。代码示例保持简单明了,并附有适当的解释。
This book was written for developers with minimal programming knowledge but a strong will to learn.We will often use the Python language and explain how to run Odoo in an Ubuntu/Debian system, but little previous knowledge of them is assumed.The code examples are kept simple and clear, and they are accompanied by appropriate explanations.
#什么-这本书-封面
##what-this-book-covers
第一部分介绍了Odoo框架,解释了如何设置您的开发环境,并提供了一个教程,包括一步地创建一个新的Odoo模块:第1章,“快速使用开发人员模式”,通过直接从用户界面创建Odoo应用程序,直观地介绍Odoo开发概念,一个简单的跟踪应用程序.Instructions用于在我们的工作站中设置Odoo,但是可以使用现有的Odoo安装程序或odo.com实例,因此不需要本地设置。
The first part introduces the Odoo framework, explains how to set up your development environment, and provides a tutorial including a thorough, step-by-step creation of a new Odoo module: Chapter 1, Quick Start Using the Developer Mode, visually introduces the Odoo development concepts by walking through the creation of an Odoo application directly from the user interface, a simple to-do tracking application.Instructions are given to set up Odoo in our workstation, but an existing Odoo installation, or an Odoo.com instance, can be used, so no local setup is required.
CodeInText:以文本、数据库表名、文件夹名、文件扩展名、路径名、虚拟URL、用户输入和Twitter手柄表示代码。下面是一个示例:“~符号是用户主目录的快捷方式,代码块设置如下:String=“NotDone”Domain=“[(‘x_is_Done’,‘=’,false)]”/>当我们希望提请您注意代码块的特定部分时,相关行或项以粗体设置:String=“NotDone”Domain=“[(x_is_Done‘,’=‘,false)]”/>任何命令行输入或输出如下所示:$createdb mydb$createdb-Template=MyDB MyDB2Bold:表示一个新术语,一个重要单词,或者在屏幕上看到的单词。例如,菜单或对话框中的单词出现在文本中。下面是一个示例:“单击调试图标并选择”编辑操作“选项,这将打开用于打开当前视图的窗口操作。”警告或重要说明如下。
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles.Here is an example: "The ~ symbol is a shortcut for the user's home directory, such as /home/daniel."A block of code is set as follows: string="Not Done" domain="[('x_is_done', '=', False)]" /> When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold: string="Not Done" domain="[('x_is_done', '=', False)]" /> Any command-line input or output is written as follows: $ createdb MyDB $ createdb --template=MyDB MyDB2 Bold: Indicates a new term, an important word, or words that you see on screen.For example, words in menus or dialog boxes appear in the text like this.Here is an example: "Click on the debug icon and select the Edit Action option.This will open the Window Actions used to open the current Views."Warnings or important notes appear like this.
#接触#
##get-in-touch
#评论
###reviews

odoo技术交流2 群号 625337975

http://www.odoogo.com/post/58/Odoo开发视频教程

文档不断更新中,添加微信odoogo,获取最新视频课程和模块

留言提问