{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/vertical-association/pulls/comments/89061716","pull_request_review_id":9612128,"id":89061716,"diff_hunk":"@@ -0,0 +1,79 @@\n+# -*- coding: utf-8 -*-\n+# Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>\n+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n+\n+from datetime import timedelta\n+from openerp import models, fields, api, _\n+from openerp.exceptions import Warning as UserError\n+from openerp.addons.membership.membership import STATE\n+\n+\n+class MembershipLine(models.Model):\n+    _inherit = \"membership.membership_line\"\n+    _order = 'date_to desc, id desc'\n+\n+    category_id = fields.Many2one(\n+        string=\"Category\", comodel_name='membership.membership_category',\n+        related=\"membership_id.membership_category_id\", readonly=True)\n+    date_from = fields.Date(readonly=False)\n+    date_to = fields.Date(readonly=False)\n+    state = fields.Selection(\n+        selection=STATE, string=\"Membership Status\", readonly=False,\n+        compute='_compute_state', inverse=\"_inverse_state\",\n+        help=\"\"\"It indicates the membership status.\n+        - Non Member: A member who has not applied for any membership.\n+        - Cancelled Member: A member who has cancelled his membership.\n+        - Old Member: A member whose membership date has expired.\n+        - Waiting Member: A member who has applied for the membership and\n+                          whose invoice is going to be created.\n+        - Invoiced Member: A member whose invoice has been created.\n+        - Paid Member: A member who has paid the membership amount.\"\"\"\n+    )\n+\n+    def __init__(self, pool, cr):","path":"membership_extension/models/membership_line.py","position":33,"original_position":33,"commit_id":"2511f2fa06c2896b26ff047467cec380c19bc48c","original_commit_id":"2511f2fa06c2896b26ff047467cec380c19bc48c","user":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"body":"Why not?","created_at":"2016-11-22T08:19:39Z","updated_at":"2016-11-22T08:19:39Z","html_url":"https://github.com/OCA/vertical-association/pull/21#discussion_r89061716","pull_request_url":"https://api.github.com/repos/OCA/vertical-association/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/OCA/vertical-association/pulls/comments/89061716"},"html":{"href":"https://github.com/OCA/vertical-association/pull/21#discussion_r89061716"},"pull_request":{"href":"https://api.github.com/repos/OCA/vertical-association/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/vertical-association/pulls/21","id":94417243,"html_url":"https://github.com/OCA/vertical-association/pull/21","diff_url":"https://github.com/OCA/vertical-association/pull/21.diff","patch_url":"https://github.com/OCA/vertical-association/pull/21.patch","issue_url":"https://api.github.com/repos/OCA/vertical-association/issues/21","number":21,"state":"open","locked":false,"title":"[ADD] membership_extension","user":{"login":"antespi","id":1881111,"avatar_url":"https://avatars.githubusercontent.com/u/1881111?v=3","gravatar_id":"","url":"https://api.github.com/users/antespi","html_url":"https://github.com/antespi","followers_url":"https://api.github.com/users/antespi/followers","following_url":"https://api.github.com/users/antespi/following{/other_user}","gists_url":"https://api.github.com/users/antespi/gists{/gist_id}","starred_url":"https://api.github.com/users/antespi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antespi/subscriptions","organizations_url":"https://api.github.com/users/antespi/orgs","repos_url":"https://api.github.com/users/antespi/repos","events_url":"https://api.github.com/users/antespi/events{/privacy}","received_events_url":"https://api.github.com/users/antespi/received_events","type":"User","site_admin":false},"body":"WIP, just for testing in runbot","created_at":"2016-11-18T18:58:35Z","updated_at":"2016-11-22T08:19:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a1aa8ecf10e84c2496a1fe4b32bac925663e4fd","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OCA/vertical-association/milestones/2","html_url":"https://github.com/OCA/vertical-association/milestones/8.0","labels_url":"https://api.github.com/repos/OCA/vertical-association/milestones/2/labels","id":1581905,"number":2,"title":"8.0","description":"","creator":{"login":"antespi","id":1881111,"avatar_url":"https://avatars.githubusercontent.com/u/1881111?v=3","gravatar_id":"","url":"https://api.github.com/users/antespi","html_url":"https://github.com/antespi","followers_url":"https://api.github.com/users/antespi/followers","following_url":"https://api.github.com/users/antespi/following{/other_user}","gists_url":"https://api.github.com/users/antespi/gists{/gist_id}","starred_url":"https://api.github.com/users/antespi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antespi/subscriptions","organizations_url":"https://api.github.com/users/antespi/orgs","repos_url":"https://api.github.com/users/antespi/repos","events_url":"https://api.github.com/users/antespi/events{/privacy}","received_events_url":"https://api.github.com/users/antespi/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":2,"state":"open","created_at":"2016-02-14T13:35:37Z","updated_at":"2016-11-18T18:58:44Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/vertical-association/pulls/21/commits","review_comments_url":"https://api.github.com/repos/OCA/vertical-association/pulls/21/comments","review_comment_url":"https://api.github.com/repos/OCA/vertical-association/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/vertical-association/issues/21/comments","statuses_url":"https://api.github.com/repos/OCA/vertical-association/statuses/2511f2fa06c2896b26ff047467cec380c19bc48c","head":{"label":"Tecnativa:8.0-membership_extension","ref":"8.0-membership_extension","sha":"2511f2fa06c2896b26ff047467cec380c19bc48c","user":{"login":"Tecnativa","id":18120193,"avatar_url":"https://avatars.githubusercontent.com/u/18120193?v=3","gravatar_id":"","url":"https://api.github.com/users/Tecnativa","html_url":"https://github.com/Tecnativa","followers_url":"https://api.github.com/users/Tecnativa/followers","following_url":"https://api.github.com/users/Tecnativa/following{/other_user}","gists_url":"https://api.github.com/users/Tecnativa/gists{/gist_id}","starred_url":"https://api.github.com/users/Tecnativa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tecnativa/subscriptions","organizations_url":"https://api.github.com/users/Tecnativa/orgs","repos_url":"https://api.github.com/users/Tecnativa/repos","events_url":"https://api.github.com/users/Tecnativa/events{/privacy}","received_events_url":"https://api.github.com/users/Tecnativa/received_events","type":"Organization","site_admin":false},"repo":{"id":73722781,"name":"vertical-association","full_name":"Tecnativa/vertical-association","owner":{"login":"Tecnativa","id":18120193,"avatar_url":"https://avatars.githubusercontent.com/u/18120193?v=3","gravatar_id":"","url":"https://api.github.com/users/Tecnativa","html_url":"https://github.com/Tecnativa","followers_url":"https://api.github.com/users/Tecnativa/followers","following_url":"https://api.github.com/users/Tecnativa/following{/other_user}","gists_url":"https://api.github.com/users/Tecnativa/gists{/gist_id}","starred_url":"https://api.github.com/users/Tecnativa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tecnativa/subscriptions","organizations_url":"https://api.github.com/users/Tecnativa/orgs","repos_url":"https://api.github.com/users/Tecnativa/repos","events_url":"https://api.github.com/users/Tecnativa/events{/privacy}","received_events_url":"https://api.github.com/users/Tecnativa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tecnativa/vertical-association","description":"Odoo addons for membership related tasks","fork":true,"url":"https://api.github.com/repos/Tecnativa/vertical-association","forks_url":"https://api.github.com/repos/Tecnativa/vertical-association/forks","keys_url":"https://api.github.com/repos/Tecnativa/vertical-association/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tecnativa/vertical-association/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tecnativa/vertical-association/teams","hooks_url":"https://api.github.com/repos/Tecnativa/vertical-association/hooks","issue_events_url":"https://api.github.com/repos/Tecnativa/vertical-association/issues/events{/number}","events_url":"https://api.github.com/repos/Tecnativa/vertical-association/events","assignees_url":"https://api.github.com/repos/Tecnativa/vertical-association/assignees{/user}","branches_url":"https://api.github.com/repos/Tecnativa/vertical-association/branches{/branch}","tags_url":"https://api.github.com/repos/Tecnativa/vertical-association/tags","blobs_url":"https://api.github.com/repos/Tecnativa/vertical-association/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tecnativa/vertical-association/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tecnativa/vertical-association/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tecnativa/vertical-association/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tecnativa/vertical-association/statuses/{sha}","languages_url":"https://api.github.com/repos/Tecnativa/vertical-association/languages","stargazers_url":"https://api.github.com/repos/Tecnativa/vertical-association/stargazers","contributors_url":"https://api.github.com/repos/Tecnativa/vertical-association/contributors","subscribers_url":"https://api.github.com/repos/Tecnativa/vertical-association/subscribers","subscription_url":"https://api.github.com/repos/Tecnativa/vertical-association/subscription","commits_url":"https://api.github.com/repos/Tecnativa/vertical-association/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tecnativa/vertical-association/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tecnativa/vertical-association/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tecnativa/vertical-association/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tecnativa/vertical-association/contents/{+path}","compare_url":"https://api.github.com/repos/Tecnativa/vertical-association/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tecnativa/vertical-association/merges","archive_url":"https://api.github.com/repos/Tecnativa/vertical-association/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tecnativa/vertical-association/downloads","issues_url":"https://api.github.com/repos/Tecnativa/vertical-association/issues{/number}","pulls_url":"https://api.github.com/repos/Tecnativa/vertical-association/pulls{/number}","milestones_url":"https://api.github.com/repos/Tecnativa/vertical-association/milestones{/number}","notifications_url":"https://api.github.com/repos/Tecnativa/vertical-association/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tecnativa/vertical-association/labels{/name}","releases_url":"https://api.github.com/repos/Tecnativa/vertical-association/releases{/id}","deployments_url":"https://api.github.com/repos/Tecnativa/vertical-association/deployments","created_at":"2016-11-14T16:07:52Z","updated_at":"2016-11-14T16:07:53Z","pushed_at":"2016-11-21T17:33:20Z","git_url":"git://github.com/Tecnativa/vertical-association.git","ssh_url":"git@github.com:Tecnativa/vertical-association.git","clone_url":"https://github.com/Tecnativa/vertical-association.git","svn_url":"https://github.com/Tecnativa/vertical-association","homepage":null,"size":209,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"10.0"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"636199fb7111edd0aa2e3148e289034c229af347","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":41769590,"name":"vertical-association","full_name":"OCA/vertical-association","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/vertical-association","description":"Odoo addons for membership related tasks","fork":false,"url":"https://api.github.com/repos/OCA/vertical-association","forks_url":"https://api.github.com/repos/OCA/vertical-association/forks","keys_url":"https://api.github.com/repos/OCA/vertical-association/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/vertical-association/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/vertical-association/teams","hooks_url":"https://api.github.com/repos/OCA/vertical-association/hooks","issue_events_url":"https://api.github.com/repos/OCA/vertical-association/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/vertical-association/events","assignees_url":"https://api.github.com/repos/OCA/vertical-association/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/vertical-association/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/vertical-association/tags","blobs_url":"https://api.github.com/repos/OCA/vertical-association/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/vertical-association/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/vertical-association/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/vertical-association/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/vertical-association/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/vertical-association/languages","stargazers_url":"https://api.github.com/repos/OCA/vertical-association/stargazers","contributors_url":"https://api.github.com/repos/OCA/vertical-association/contributors","subscribers_url":"https://api.github.com/repos/OCA/vertical-association/subscribers","subscription_url":"https://api.github.com/repos/OCA/vertical-association/subscription","commits_url":"https://api.github.com/repos/OCA/vertical-association/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/vertical-association/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/vertical-association/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/vertical-association/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/vertical-association/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/vertical-association/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/vertical-association/merges","archive_url":"https://api.github.com/repos/OCA/vertical-association/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/vertical-association/downloads","issues_url":"https://api.github.com/repos/OCA/vertical-association/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/vertical-association/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/vertical-association/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/vertical-association/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/vertical-association/labels{/name}","releases_url":"https://api.github.com/repos/OCA/vertical-association/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/vertical-association/deployments","created_at":"2015-09-02T00:00:15Z","updated_at":"2016-11-01T18:50:59Z","pushed_at":"2016-11-21T17:33:20Z","git_url":"git://github.com/OCA/vertical-association.git","ssh_url":"git@github.com:OCA/vertical-association.git","clone_url":"https://github.com/OCA/vertical-association.git","svn_url":"https://github.com/OCA/vertical-association","homepage":null,"size":238,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":8,"forks":21,"open_issues":8,"watchers":6,"default_branch":"10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/vertical-association/pulls/21"},"html":{"href":"https://github.com/OCA/vertical-association/pull/21"},"issue":{"href":"https://api.github.com/repos/OCA/vertical-association/issues/21"},"comments":{"href":"https://api.github.com/repos/OCA/vertical-association/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/vertical-association/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/vertical-association/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/vertical-association/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/vertical-association/statuses/2511f2fa06c2896b26ff047467cec380c19bc48c"}}}}
{"actor":{"display_login":"pedrobaeza"}}